Forums - Open Redstone Engineers
msis2416-0 Instruction Set - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: ORE General (https://forum.openredstone.org/forum-39.html)
+--- Forum: Projects & Inventions (https://forum.openredstone.org/forum-19.html)
+---- Forum: Completed Projects (https://forum.openredstone.org/forum-21.html)
+---- Thread: msis2416-0 Instruction Set (/thread-3176.html)



msis2416-0 Instruction Set - Konstacon - 04-19-2014

I give you... the msis2416-0, or Magazorb Snuggly Instruction Set 24 bit 16 bit CPU Revision 0.

So... this baby has 4 bit OPCODE and 11 bit Immediate. Shall we see the commands?

0000 : add : 0000 3 bit r1 3 bit r2 3 bit r3 : r1=r2+r3
0001 : addi : 0001 3 bit r1 3 bit r2 14 bit Imm : r1=r2+Imm
0010 : sw : 0010 3 bit r1 3 bit r2 : r1=r2
0011 : swi : 0011 3 bit r1 0 16 bit Imm : r1=Imm
0100 : swe : 0100 3 bit r1 3 bit r2 : word at RAM address r2 = r1
0101 : lwe : 0101 3 bit r1 3 bit r2 : r1 = word at RAM address r2
0110 : bnc : 0110 000 0 16 bit Imm : PC=PC+1+Imm
0111 : bnra : 0111 r1 : PC=r1
1000 : beq : 1000 r1 r2 r3 : if r1=r2, bnra r3, otherwise, skip line
1001 : bi : 1001 r1 r2 : r1=!r2
1010 : bx : 1010 r1 r2 r3 : r1 = r2 XOR r3
1011 : bs : 1011 r1 r2 : r1=r2/2
1100 : scf : null : carry flag = 1
1101 : halt : null : halt all CPU operations

Here is a sample program i wrote that counts to 19.
Code:
swi    ax,1        ; Number counting to 19 starts out as 1
swi    bx,19        ; Number to count to is 19
swi    cx,4        ; The line to branch to if the counting number has not reached to 19
swi    dx,8        ; The line to branch to if the counting number has reached 19
beq    ax,bx,dx    ; Checks if counting number is 19, if it is, go to line 8
addi    ax,ax,1        ; Add 1 to the counting number
bnra    bx        ; Start the loop over again and check
halt            ; Stop all CPU processes.

-Snargy Tongue


RE: msis2416-0 Instruction Set - greatgamer34 - 04-20-2014

Snug, i just made a superpowerful 16 bit IS! Ill post it!


RE: msis2416-0 Instruction Set - Magazorb - 04-20-2014

Yer i'm working on my own IS as well hehe Big Grin


RE: msis2416-0 Instruction Set - Konstacon - 04-20-2014

@GG34, What size opcode?


RE: msis2416-0 Instruction Set - greatgamer34 - 04-20-2014

(04-20-2014, 09:23 PM)snugglycreeper9 Wrote: @GG34, What size opcode?

5 bit Op, 16 bit IS!


RE: msis2416-0 Instruction Set - LordDecapo - 04-25-2014

I has one too. But im still tweaking it xD


RE: msis2416-0 Instruction Set - Nickster258 - 04-27-2014

(04-20-2014, 04:42 PM)Magazorb Wrote: Yer i'm working on my own IS as well hehe Big Grin

The one that is sort of an expansion off of mine?