Qwerty0

Gob's program

Apr 10th, 2012
49
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :start
  2. set j, 0 ; Global cursor location
  3. set b, 0x2000 ; Default colour is green on black
  4. set a, gob
  5. jsr printstring
  6. set a, flashblock
  7. jsr printstring
  8. :wait
  9. ife [0x9000], 0 ; If they press ANYTHING
  10. set PC, wait
  11. set a, [0x9000]
  12. ife a, 0x59 ; If it isn't y then just end
  13. set PC, proceed
  14. ife a, 0x79
  15. set PC, proceed
  16. set PC, crash
  17. :proceed
  18. sub j, 1 ; move cursor back
  19. set a, yes ; Print Y
  20. jsr printstring
  21. set j, 32 ; Set cursor to next line
  22. set i, 0 ; And print penus a bunch
  23. :penusloop
  24. set a, penus
  25. jsr printstring
  26. add i, 1
  27. ifg 60, i
  28. set PC, penusloop
  29. set PC, crash
  30. :printstring
  31.  
  32. :printchar
  33. set c, [a]
  34. ife c, 0
  35. set PC, endprint
  36. bor c, b
  37. set [0x8000+j], c
  38. add a, 1
  39. add j, 1
  40. set PC, printchar
  41. :endprint
  42. set PC, POP
  43.  
  44. :crash
  45. sub PC, 1
  46. :data
  47. :gob
  48. dat "Gob's Program: Y/N? ", 0x0000
  49. :yes
  50. dat "Y", 0x0000
  51. :penus
  52. dat "Penus ", 0x0000
  53. :flashblock
  54. dat 0x00Df, 0x0000
RAW Paste Data