Skip to content

Instantly share code, notes, and snippets.

@niconii
Last active November 25, 2016 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niconii/d92304b361e9948176db8b3e970e044f to your computer and use it in GitHub Desktop.
Save niconii/d92304b361e9948176db8b3e970e044f to your computer and use it in GitHub Desktop.
Name Stack effect Operation Operation after a b ? Operation after a 0? ASM
if ( -- ) if zero flag = 0 if a != b if a beq ...
=if ( -- ) if zero flag = 1 if a == b if !a bne ...
+if ( -- ) if negative flag = 0 if (i16)a - (i16)b >= 0 if (i16)a >= 0 bmi ...
-if ( -- ) if negative flag = 1 if (i16)a - (i16)b < 0 if (i16)a < 0 bpl ...
vif ( -- ) if overflow flag = 0 n/a n/a bvs ...
^if ( -- ) if overflow flag = 1 n/a n/a bvc ...
<if ( -- ) if carry flag = 0 if (u16)a < (u16)b if false bcs ...
>if ( -- ) if carry flag = 1 if (u16)a >= (u16)b if true bcc ...
Name Stack effect Operation ASM
? ( a b -- a b ) Compares a and b, setting processor flags
0? ( a -- a ) Compares a and 0, setting processor flags cmp #0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment