Advertisement
ph0xii

lmao

Mar 25th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. INP – Gets a number to put into the accumulator
  2. STA NUM – Stores that number in a variable (NUM)
  3.  
  4. LOOPTOP LDA COUNT – Begins a loop and loads
  5. LDA SECOND – Loads another variable (SECOND) into the accumulator
  6. STA FIRST – Stores another number from the accumulator into the variable
  7. LDA FIB – Loads the "FIB" variable into the accumulator
  8. STA SECOND -
  9. LDA FIRST -
  10. ADD SECOND -
  11. STA FIB -
  12. OUT -
  13. LDA COUNT -
  14. ADD ONE -
  15. STA COUNT -
  16. SUB NUM -
  17. BRZ ENDLOOP -
  18. BRA LOOPTOP -
  19. ENDLOOP HLT -
  20.  
  21. NUM DAT -
  22. FIRST DAT 000 -
  23. FIB DAT 000 -
  24. SECOND DAT 001 -
  25. COUNT DAT -
  26. ONE DAT 001 -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement