43 lines
609 B
ArmAsm
43 lines
609 B
ArmAsm
.word $0801 ; prg untz untz
|
|
|
|
.org $801 ; basic bootstrap
|
|
.byte $0c, $08, $0a, $00, $9e, $20
|
|
.byte $34, $30, $39, $36, $00, $00
|
|
.byte $00
|
|
|
|
.res $1000-*
|
|
.org $1000 ; actual progrem startshere
|
|
|
|
ldx #$08 ; Screen colours
|
|
stx $d020
|
|
ldx #$00
|
|
stx $d021
|
|
|
|
jsr $e544 ; clear screen
|
|
jsr print_string
|
|
|
|
loop:
|
|
lda $dc01 ; Scans the keyboard buffer
|
|
cmp #$ef ; If user presses Space ($ef) then quit
|
|
bne loop
|
|
|
|
rts
|
|
|
|
.proc print_string
|
|
ldx #$00
|
|
|
|
loop:
|
|
lda message, x
|
|
|
|
cmp #$0 ; return on null terminator
|
|
beq :+
|
|
|
|
sta $0428, x
|
|
inx
|
|
jmp loop
|
|
|
|
: rts
|
|
.endproc
|
|
|
|
message: .byte "welcome to scat os", $00
|