apple1/helloworld-wozos.asm
Computer construction kit SmartyKit 7c0f9d0477
Added demo of 6502 'Hello, World!' for a runtime
Text pointer with 'Hello, World!' string is located at RAM and string could be changed during the runtime. Uses functions ECHO and RESET of Woz OS from Apple-1, so could be easily run in emulator.
2022-05-02 20:07:14 +03:00

26 lines
439 B
NASM

;printing 'Hello, World!' at a runtime demo
;More about 'Hello, World!' program: https://en.wikipedia.org/wiki/%22Hello,_World!%22_program
RESET = $FF00
ECHO = $FFEF
TXTPTR = $1000
.org $1000
.byte $0d
.ASCII "Hello, World!"
.byte $0d
.byte $00
.org $2000
LDX #00
PRINT_CHAR:
LDA TXTPTR,X
BEQ END_PRINT ;end printing at the end of the string (\n=0)
JSR ECHO
INX
JMP PRINT_CHAR
END_PRINT:
JMP RESET ;return to Woz Monitor