SCAMP Instruction Set Cheatsheet

_0_1_2_3_4_5_6_7_8_9_a_b_c_d_e_f
0_
add x, r +^
add x, i16 +^
add x, (i16) +^
add x, (r) +^
add x, (r++) +^
add x, (r--) +^
add x, i8l +^
add x, i8h +^
add r, x +^
add (i16), x +^
add (i16), i8l +!^
add (r), x +^
add r, i16 +!^
add (r), i16 +!^
add r, (i16) +!^
1_
sub x, r +^
sub x, i16 +^
sub x, (i16) +^
sub x, (r) +^
sub x, (r++) +^
sub x, (r--) +^
sub x, i8l +^
sub x, i8h +^
sub r, x +^
sub (i16), x +^
sub (i16), i8l +!^
sub (r), x +^
sub r, i16 +!^
sub (r), i16 +!^
sub r, (i16) +!^
2_
and x, r +^
and x, i16 +^
and x, (i16) +^
and x, (r) +^
and x, (r++) +^
and x, (r--) +^
and x, i8l +^
and x, i8h +^
and r, x +^
and (i16), x +^
and (i16), i8l +!^
and (r), x +^
and r, i16 +!^
and (r), i16 +!^
and r, (i16) +!^
3_
or x, r +^
or x, i16 +^
or x, (i16) +^
or x, (r) +^
or x, (r++) +^
or x, (r--) +^
or x, i8l +^
or x, i8h +^
or r, x +^
or (i16), x +^
or (i16), i8l +!^
or (r), x +^
or r, i16 +!^
or (r), i16 +!^
or r, (i16) +!^
4_
nand x, r +^
nand x, i16 +^
nand x, (i16) +^
nand x, (r) +^
nand x, (r++) +^
nand x, (r--) +^
nand x, i8l +^
nand x, i8h +^
nand r, x +^
nand (i16), x +^
nand (i16), i8l +!^
nand (r), x +^
nand r, i16 +!^
nand (r), i16 +!^
nand r, (i16) +!^
5_
nor x, r +^
nor x, i16 +^
nor x, (i16) +^
nor x, (r) +^
nor x, (r++) +^
nor x, (r--) +^
nor x, i8l +^
nor x, i8h +^
nor r, x +^
nor (i16), x +^
nor (i16), i8l +!^
nor (r), x +^
nor r, i16 +!^
nor (r), i16 +!^
nor r, (i16) +!^
6_
xor x, y +*^
xor x, i8l +*^
xor x, i8h +*^
shl x +^
shl2 x +^
shl3 x +^
shl r +!^
shl2 r +!^
tbsz r, i16 +!^
sb r254, i8l +!^
ld x, i8l(x) +^
ld x, i8h(x) +^
ld x, i8h(sp) +^
7_
ld x, r
ld x, i16
ld x, (i16)
ld x, (r)
ld x, (r++) +^
ld x, (r--) +^
ld x, i8l
ld x, i8h
ld r, x +
ld (i16), x +
ld (i16), i8l
ld (r), x +
ld x, ++r +
ld x, --r +
ld x, r++ +
ld x, r-- +
8_
ld x, ++(i16) +
ld x, --(i16) +
ld x, (i16)++ +
ld x, (i16)-- +
ld x, (++r) +
ld x, (--r) +
ld x, ((i16))
ld x, i8l(sp) +^
ld r, 1(sp) +^
ld 1(sp), r +!^
ld 1(sp), i8l +^
ld r, (x) +^
ld r, i16(x) +^
ld ((i16)), x +
ld (++r), x +^
9_
ld (--r), x +^
ld (r++), x +^
ld (r--), x +^
ld r, (i16) +^
ld (i16), r +^
ld r, i16 +^
ld (r), i16 +^
ld (x), i16 +^
ld (x), r +^
ld (x), (r) +^
ld (x), (i16) +^
ld x, (x) +
ld y, x +
ld y, r
ld y, i16
a_
jmp x +
jz x +
jnz x +
jgt x +
jlt x +
jge x +
jle x +
jr+ i8l +!^
jr- i8l +!^
jr+ r +!^
jr- r +!^
inc x +
inc r +^
inc (x) +^
inc (r) +^
inc (i16) +^
b_
jmp i16
jz i16
jnz i16
jgt i16
jlt i16
jge i16
jle i16
push x +^
push i8l +^
push i8h +^
pop x +
dec x +
dec r +^
dec (x) +^
dec (r) +^
dec (i16) +^
c_
jmp (i16)
jz (i16)
jnz (i16)
jgt (i16)
jlt (i16)
jge (i16)
jle (i16)
call i16 +*^
call (i16) +*^
ret +
ret i8l +!^
neg x +
neg r +^
neg (x) +^
neg (r) +^
neg (i16) +^
d_
call x +*
call (x) +*
not x +
not r +^
not (x) +^
not (r) +^
not (i16) +^
e_
in x, r
in x, i16
in x, (i16)
in x, (r)
in x, i8l
in x, i8h
in r, x +^
in (i16), x +^
in (r), x +^
in r, i16 +^
in (r), i16 +^
test x +
test r +^
test (x) +^
test (r) +^
test (i16) +^
f_
out x, r +^
out i16, (x) +^
out x, (i16) +^
out x, (r) +^
out x, i8l +
out x, i8h +
out r, x +
out (i16), x +
out (r), x +
out i8l, x +
out i8h, x +
out i16, x +
out i16, r +^
out i16, (r) +^
nop
slownop
+ sets flags
! clobbers x
* clobbers r254
^ clobbers y