Created
May 19, 2016 23:08
-
-
Save Endika/453653fc1e0280971eb79d14ce8ae215 to your computer and use it in GitHub Desktop.
Simple assembly note
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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