Skip to content

Latest commit

 

History

History
72 lines (64 loc) · 6.35 KB

instructions.rst

File metadata and controls

72 lines (64 loc) · 6.35 KB

Instruction Set and Binaries

NAVIGATIONS: Navigation Page | World Summary | Compiler Summary

Gibberish Binary Official Code Binary
ALU instructions
add(R#,to:R#) 1000#1#2 ADD RA, RB 1000xxxx
shiftRight(on:R#) 1001#1#1 SHR RA, RB 1001xxxx
shiftRight(R#,to:R#) 1001#1#2
shiftLeft(on:R#) 1010#1#1 SHL RA, RB 1010xxxx
shiftLeft(R#,to:R#) 1010#1#2
not(on:R#) 1011#1#1 NOT RA, RB 1011xxxx
not(R#,to:R#) 1011#1#2
and(R#,to:R#) 1100#1#2 AND RA, RB 1100xxxx
or(R#,to:R#) 1101#1#1 OR RA, RB 1101xxxx
xor(R#,to:R#) 1110#1#2 XOR RA, RB 1110xxxx
zeroOut(R#) 1110#1#1
compare(R#,R#) 1111#1#2 CMP RA, RB 1111xxxx
clearFlag 01100000 CLF 01100000
RAM instructions
load(N#,to:R#) 001000#2 #1 DATA RB, Addr 001000xx
load(addressIn:R#,to:R#) 0000#1#2 LD RA, RB 0000xxxx
store(R#,toAddressIn:R#) 0001#2#1 ST RA, RB 0001xxxx
Flow instructions
jumpTo(address:N#) 01000000 #1 JMP Addr 01000000
jumpTo(@#) 1011#1#2
jumpTo(addressIn:R#) 001100#1 JMPR RB 001100xx
jumpOnFlag(C:B#,A:B#,E:B#,Z:B#,to:@#) 0101#1#2#3#4 #5 JCAEZ Addr 0101caez
IO instructions Note: IO works differently in this MCPE computer, thus the compiler is different.
ioReadData(to:R#) 011100#1 IN Data, RB 011100xx
ioWriteData(in:R#) 011110#1 OUT Data, RB 011110xx
ioSetAddress(in:R#) 011111#1 OUT Addr, RB 011111xx
ioUpdate 01110100 IN Addr, RB 011101xx