25 lines
412 B
NASM
25 lines
412 B
NASM
; hello.asm - single-object demo.
|
|
; Prints "Hello, World!" through the memory-mapped terminal at $F001,
|
|
; then writes to the halt register at $F003.
|
|
|
|
.export start
|
|
.org $0600
|
|
|
|
jmp start
|
|
|
|
msg:
|
|
.asciiz "Hello, World!"
|
|
|
|
start:
|
|
ldx #0
|
|
loop:
|
|
lda msg,x
|
|
beq done
|
|
sta $F001
|
|
inx
|
|
jmp loop
|
|
done:
|
|
lda #$00
|
|
sta $F003
|
|
rts
|