**** COMMODORE 64 BASIC V2 ****
64K RAM SYSTEM 38911 BASIC BYTES FREE
READY.
POKE 53280,0:POKE 53281,0
READY.
SYS 49152
MONITOR V1.0
.A 1000
.
.org $1000 ; Program start address
start:
ldx #0 ; Initialize X register as string index (for first character)
print_line:
lda message,x ; Load the character from the message
beq done ; If the character is 0 (end of the string), stop
jsr $ffd2 ; Call CHROUT to print the character
inx ; Move to the next character
jmp print_line ; Repeat for the next character
done:
rts ; Return from the program (end)
; Message data section
message:
.byte "************************", $0D, $0A
.byte "MESS WITH THE BEST", $0D, $0A
.byte "DEBUG LIKE THE REST", $0D, $0A
.byte "************************", $0D, $0A
.byte 0 ; Null terminator for the message
.
1000 A2 00 LDX #$00
1002 BD 12 10 LDA $1012,X
1005 F0 06 BEQ $100D
1007 20 D2 FF JSR $FFD2
100A E8 INX
100B 4C 02 10 JMP $1002
100E 60 RTS
.
.X
READY.
SYS 4096
************************
MESS WITH THE BEST
DEBUG LIKE THE REST
************************
READY.
_