bf17

NoRAl assembly listings

Sep 10th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. # sample NoRAL assembly listings
  2.  
  3. # partial Fibonacci sequence loaded into the stack
  4. sto 0300 00
  5. sto 0301 01
  6. sto 03ff 16
  7. psh 0300
  8. psh 0300
  9. add 0300 0301
  10. pop 0301
  11. dec 03ff
  12. jpz 0223
  13. psh ffff
  14. jmp 020c
  15. brk
  16.  
  17. ================================================
  18. #self- modifying code
  19.  
  20. sto 0300 1a
  21. sto 0100 41
  22. inc 0206
  23. inc 0207
  24. dec 0300
  25. jpz 0218
  26. jmp 0204
  27. brk
  28.  
  29.  
  30. output:
  31.  
  32. Program Counter: 0219
  33. Zero Flag: 01
  34. Carry Flag: 00
  35. Stack Pointer: 00
  36.  
  37. +--------Screen Display----------+
  38. |ABCDEFGHIJKLMNOPQRSTUVWXYZ |
  39. | |
  40. | |
  41. | |
  42. | |
  43. | |
  44. | |
  45. | |
  46. +--------------------------------+
  47.  
  48. ================================================
  49. #simulated indirect addressing using self-modifying code
  50.  
  51. sto 0209 a1
  52. sto 020a 04
  53. inc ffff
Advertisement
Add Comment
Please, Sign In to add comment