Advertisement
atm959

Tiny Computer Moving Pixel

Jul 23rd, 2018
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. !@xPos m32 !
  2. !@yPos m33 !
  3. !@buttonTemp m34 !
  4. !@temp m35 !
  5.  
  6. sub @xPos @xPos @xPos
  7. sub @yPos @yPos @yPos
  8. sub @buttonTemp @buttonTemp @buttonTemp
  9.  
  10. Loop:
  11. add 0 0 @temp
  12. ClearScreenLoop:
  13. add 0 0 *@temp
  14. add @temp 1 @temp
  15. bne @temp 32 ClearScreenLoop
  16.  
  17. add 0 b0 @buttonTemp
  18. and 128 @buttonTemp @buttonTemp
  19. bne 128 @buttonTemp SkipRight
  20. add @xPos 1 @xPos
  21. SkipRight:
  22.  
  23. add 0 b0 @buttonTemp
  24. and 32 @buttonTemp @buttonTemp
  25. bne 32 @buttonTemp SkipLeft
  26. sub @xPos 1 @xPos
  27. SkipLeft:
  28.  
  29. add 0 b0 @buttonTemp
  30. and 16 @buttonTemp @buttonTemp
  31. bne 16 @buttonTemp SkipUp
  32. sub @yPos 1 @yPos
  33. SkipUp:
  34.  
  35. add 0 b0 @buttonTemp
  36. and 64 @buttonTemp @buttonTemp
  37. bne 64 @buttonTemp SkipDown
  38. add @yPos 1 @yPos
  39. SkipDown:
  40.  
  41. bne @xPos -1 SkipResetXLow
  42. add 0 0 @xPos
  43. SkipResetXLow:
  44.  
  45. bne @yPos -1 SkipResetYLow
  46. add 0 0 @yPos
  47. SkipResetYLow:
  48.  
  49. bne @xPos 32 SkipResetXHigh
  50. add 0 31 @xPos
  51. SkipResetXHigh:
  52.  
  53. bne @yPos 32 SkipResetYHigh
  54. add 0 31 @yPos
  55. SkipResetYHigh:
  56.  
  57. ls 1 @xPos *@yPos
  58.  
  59. vsync
  60. jmp Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement