Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LAI x (01XX)
load accumulator immediate
acc = x
LAM x (02XX)
load accumulator memory
acc = mem[x]
LAI x (0300)
load accumulator memory indirect
acc = mem[mem[0]]
SAM x (04XX)
store accumulator memory
mem[x] = acc
SAI x (0500)
store accumulator memory indirect
mem[mem[0]] = acc
SAO (0600)
store accumulator output
output = acc
JMP (11XX)
jump
ip = x
JZ (12XX)
jump if accumulator zero
ip = acc == 0 ? x : ip + 1
JNZ (13XX)
jump if accumulator not zero
ip = acc != 0 ? x : ip + 1
ADDI x (21XX)
add immediate
acc += x
ADDM x (22XX)
add memory
acc += mem[x]
SUBI x (23XX)
subtract immediate
acc -= x
SUBM x (24XX)
subtract memory
acc -= mem[x]
MODI x (25XX)
modulo immediate
acc %= x
MODM x (26XX)
modulo memory
acc %= mem[x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.