1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-29 11:31:42 +00:00
8bitworkshop/presets/c64/hello.dasm
2022-10-04 10:01:40 -05:00

43 lines
898 B
Plaintext

include "cartheader.dasm"
; program start
Temp equ $03
Start
jsr $FF81 ; CINT (clear screen)
sei ; turn off interrupts
ldy #0
sty $d020 ; reset border color
Loop
lda Message,y ; load message byte
beq EOM ; 0 = end of string
clc
adc #$c0 ; + 192
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
lsr
clc
adc Temp
sta $d020 ; set border color
lda $d011 ; get status bits
bpl Wait2 ; repeat until line >= 256
sty $d020 ; reset border color
dec Temp ; scroll colors
jmp Wait1 ; endless loop
Message
; PETSCII - http://sta.c64.org/cbm64pet.html
byte "HELLO`WORLDa"
byte 0