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) +!^
add y, i8l +!
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) +!^
call (i16) +*^
2_
cmp x, r +^
cmp x, i16 +^
cmp x, (i16) +^
cmp x, (r) +^
cmp x, (r++) +^
cmp x, (r--) +^
cmp x, i8l +^
cmp x, i8h +^
cmp r, x +^
cmp (i16), x +^
cmp (i16), i8l +!^
cmp (r), x +^
cmp r, i16 +!^
cmp (r), i16 +!^
cmp r, (i16) +!^
call x +*
3_
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) +!^
call (x) +*
4_
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) +!^
call i16 +*^
5_
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 +!^
push x +^
push i8l +^
push i8h +^
pop x +
ld x, i8l(x) +^
ld x, i8h(x) +^
6_
ld x, i8h(sp) +^
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++ +
7_
ld x, r-- +
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 +^
8_
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
ld y, i8l+sp +!
9_
ld (y), x +
ld (y), i8l +
ld (y), i16 +!
ret +
ret i8l +!^
zero r +
one r +
a_
inc x +
inc r +^
inc (x) +^
inc (r) +^
inc (i16) +^
jr+ i8l +!^
jr- i8l +!^
jr+ r +!^
jmp (x) +
jmp x +
jz x +
jnz x +
jgt x +
jlt x +
jge x +
jle x +
b_
dec x +
dec r +^
dec (x) +^
dec (r) +^
dec (i16) +^
in x, r +
in x, i16 +
in x, (i16) +
in x, (r)
jmp i16
jz i16
jnz i16
jgt i16
jlt i16
jge i16
jle i16
c_
neg x +
neg r +^
neg (x) +^
neg (r) +^
neg (i16) +^
in x, i8l +
in x, i8h +
in r, x +^
in (i16), x +^
jmp (i16)
jz (i16)
jnz (i16)
jgt (i16)
jlt (i16)
jge (i16)
jle (i16)
d_
not x +
not r +^
not (x) +^
not (r) +^
not (i16) +^
in (r), x +^
in r, i16 +^
in (r), i16 +^
in (x++), i16 +^
out x, r +^
out x, i16 +^
out i16, (x) +^
out x, (i16) +^
out x, (r) +^
out x, i8l +
out x, i8h +
e_
test x +
test r +^
test (x) +^
test (r) +^
test (i16) +^
out r, x +
out (i16), x +
out (r), x +
out i8l, x +
out i8h, x +
out i16, x +
out i16, r +^
out i16, (r) +^
out i16, (x++) +^
jmp i8l(x) +^
nop
f_
+ sets flags
! clobbers x
* clobbers r254
^ clobbers y