mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-09-29 06:55:37 +00:00
50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
|
|
||
|
processor 6502
|
||
|
org $7ffe
|
||
|
word $8000 ; load address
|
||
|
; cartridge header (http://swut.net/c64cart-howto.html)
|
||
|
.byte $09, $80, $25, $80
|
||
|
.byte $c3, $c2, $cd, $38, $30
|
||
|
.byte $8e, $16, $d0, $20, $a3, $fd, $20
|
||
|
.byte $50, $fd, $20, $15, $fd, $20, $5b
|
||
|
.byte $ff, $58
|
||
|
.byte $ea, $ea, $ea, $ea, $ea, $ea, $ea
|
||
|
.byte $ea, $ea, $ea, $ea, $ea
|
||
|
; program start
|
||
|
Temp equ $00
|
||
|
Start
|
||
|
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
|