Last active
January 3, 2024 02:29
-
-
Save jac18281828/f9c7ee945ca3545b4194d444d49e39e5 to your computer and use it in GitHub Desktop.
Simple LOOP in MIX
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
* MIX AL PROGRAM | |
* example of a simple loop | |
* count from 0 to 1000 | |
ORIG 1000 | |
START STJ EXIT | |
LOOP LDA COUNT | |
INCA 1 | |
STA COUNT | |
CMPA MAX | |
JL LOOP | |
EXIT HLT | |
COUNT CON 0 | |
MAX CON 1000 | |
END START |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment