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.
This commit is contained in:
Computer construction kit SmartyKit 2022-05-02 20:07:14 +03:00 committed by GitHub
parent 8afda06b7a
commit 7c0f9d0477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

25
helloworld-wozos.asm Normal file
View File

@ -0,0 +1,25 @@
;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