43 lines
974 B
NASM
43 lines
974 B
NASM
KERNAL_CLEAR_SCREEN = $e544 ; KERNAL ROM routine.
|
|
VICSCN = $0400 ; VIC-II Screen Video Matrix, 1024 (int).
|
|
* = $8000
|
|
|
|
.word coldstart ; coldstart vector
|
|
.word warmstart ; warmstart vector
|
|
.byte $C3,$C2,$CD,$38,$30 ; "CBM8O". Autostart string
|
|
|
|
coldstart
|
|
sei
|
|
stx $d016
|
|
jsr $fda3 ;Prepare IRQ
|
|
jsr $fd50 ;Init memory. Rewrite this routine to speed up boot process.
|
|
jsr $fd15 ;Init I/O
|
|
jsr $ff5b ;Init video
|
|
cli
|
|
|
|
warmstart
|
|
; Insert your code here
|
|
jsr KERNAL_CLEAR_SCREEN
|
|
|
|
; read string by byte into vram until null byte
|
|
ldx #0
|
|
loop
|
|
lda my_string,x
|
|
cmp #$00
|
|
beq bail
|
|
sta VICSCN,x
|
|
inx
|
|
jmp loop
|
|
bail
|
|
; pretty colors
|
|
inc $d020
|
|
jmp *-3
|
|
|
|
; macro to convert ASCII text here to native screen codes
|
|
.enc "screen"
|
|
my_string .null "HELLO WORLD!"
|
|
.enc "none"
|
|
|
|
* = $9fff ; fill up to 8k or cartconv will fail
|
|
.byte 0
|