pr.asm 831 B

123456789101112131415161718192021222324
  1. *= $0801 "Basic Upstart"
  2. BasicUpstart(start) // 10 sys$0810
  3. *= $0810 "Program"
  4. start: ldx #$00
  5. stx $d020 // Border color register
  6. stx $d021 // Background color
  7. clear: lda #$20 // spacebar screen code
  8. sta $0400,x // fill four areas of screen with 256 spacebar characters
  9. sta $0500,x
  10. sta $0600,x
  11. sta $06e8,x
  12. lda #$00 // set foreground to black in Color Ram
  13. sta $d800,x
  14. sta $d900,x
  15. sta $da00,x
  16. sta $dae8,x
  17. inx
  18. bne clear // bne = branch on not equal
  19. // did x turn to zero already?
  20. // if yes -> stop loop
  21. // if no -> continue loop
  22. rts