Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INP – Gets a number to put into the accumulator
- STA NUM – Stores that number in a variable (NUM)
- LOOPTOP LDA COUNT – Begins a loop and loads
- LDA SECOND – Loads another variable (SECOND) into the accumulator
- STA FIRST – Stores another number from the accumulator into the variable
- LDA FIB – Loads the "FIB" variable into the accumulator
- STA SECOND -
- LDA FIRST -
- ADD SECOND -
- STA FIB -
- OUT -
- LDA COUNT -
- ADD ONE -
- STA COUNT -
- SUB NUM -
- BRZ ENDLOOP -
- BRA LOOPTOP -
- ENDLOOP HLT -
- NUM DAT -
- FIRST DAT 000 -
- FIB DAT 000 -
- SECOND DAT 001 -
- COUNT DAT -
- ONE DAT 001 -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement