Advertisement
framillo

asm for all challenge

Apr 13th, 2020
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. * = $c000
  2. colmemst=$d800
  3. scrmemst=$0400
  4. const4=$3000
  5. ;fill the screen
  6. lda #<scrmemst
  7. sta $fb
  8. ldx #>scrmemst
  9. stx $fc
  10. ldy #$00
  11. lda #81
  12.  
  13. loopfill
  14. sta ($fb),y
  15. iny
  16. bne loopfill
  17. inc $fc
  18. dex
  19. bne loopfill
  20.  
  21. ;end filling screen
  22. ;start color proc
  23. lda #<colmemst
  24. sta $fb
  25. lda #>colmemst
  26. sta $fc
  27. lda #39
  28. sta $fe
  29. ldy #$00
  30. sty $fd
  31. lda #4
  32. sta const4
  33. lda #0
  34. ldx #0
  35. loopcolor
  36. sta ($fb),y
  37. inx
  38. txa ;a=x
  39. clc
  40. adc $fd ;a=x+$fd
  41. dec $fe ;check if
  42. bne samerow ;iteration=40
  43. ldx #39
  44. stx $fe
  45. ldx #0
  46. samerow
  47. iny
  48. bne loopcolor
  49. inc $fc
  50. dec const4
  51. bne loopcolor
  52.  
  53. ;start of infinite loop of colouring. defining stuff
  54. psychedelic
  55. lda #<colmemst
  56. sta $fb
  57. lda #>colmemst
  58. sta $fc
  59. ldy #$00
  60. lda #4
  61. sta $fe
  62. infiniteloop
  63. lda ($fb),y
  64. tax
  65. inx
  66. txa
  67. sta ($fb),y
  68. iny
  69. bne infiniteloop
  70. inc $fc
  71. dec $fe
  72. bne infiniteloop
  73. jmp psychedelic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement