mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-22 14:33:51 +00:00
43 lines
829 B
Plaintext
43 lines
829 B
Plaintext
|
|
||
|
!src "cartheader.acme"
|
||
|
|
||
|
!address {
|
||
|
Temp = $02
|
||
|
}
|
||
|
|
||
|
Start:
|
||
|
sei ; turn off interrupts
|
||
|
ldy #0
|
||
|
Loop:
|
||
|
lda Message,y ; load message byte
|
||
|
beq EOM ; 0 = end of string
|
||
|
clc
|
||
|
adc #$40
|
||
|
sta $400+41,y ; store to screen
|
||
|
iny
|
||
|
bne Loop ; next character
|
||
|
EOM:
|
||
|
|
||
|
Wait1:
|
||
|
lda $d011
|
||
|
bmi Wait1 ; wait for line < 256
|
||
|
Wait2:
|
||
|
lda $d012 ; get current scanline
|
||
|
Wait3:
|
||
|
cmp $d012
|
||
|
beq Wait3 ; wait for scanline to change
|
||
|
lsr ; divide by 2
|
||
|
lsr ; divide by 2
|
||
|
clc
|
||
|
adc Temp ; add to frame counter
|
||
|
sta $d020 ; set border color
|
||
|
lda $d011 ; get status bits
|
||
|
bpl Wait2 ; repeat until line >= 256
|
||
|
sty $d020 ; reset border color
|
||
|
dec Temp ; change frame counter
|
||
|
jmp Wait1 ; endless loop
|
||
|
|
||
|
Message:
|
||
|
!scr "HELLO WORLD", 0
|
||
|
|