Skip to content

Instantly share code, notes, and snippets.

@Endika
Created May 19, 2016 23:08
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 Endika/453653fc1e0280971eb79d14ce8ae215 to your computer and use it in GitHub Desktop.
Save Endika/453653fc1e0280971eb79d14ce8ae215 to your computer and use it in GitHub Desktop.
Simple assembly note
# MOV
MOV UP DOWN
MOV UP ACC
MOV UP LEFT
MOV UP RIGHT
MOV LEFT ACC
MOV RIGHT DOWN
MOV LEFT RIGHT
...
# JMP
START:
...
JMP START
# CONDITIONS
JEZ # IF VALUE IS 0
JNZ # IF VALUE IS NOT 0
JGZ # IF VALUE GREATER THAN 0
JLZ # IF VALUE LESS THAN 0
# NEG
MOV UP ACC # EXAMLE ACC VALUE 10
NEG # NOW ACC VALUES IS -10
# SAVE AND SWP
MOV UP ACC # EXAMPLE ACC VALUE IS 20
SAVE # ACC VALUE IS 0 BUT BAK VALUE IS 20
SWP # ACC VALUE IS 20 BUT BAK VALUE IS 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment