mirror of
https://github.com/smartykit/apple1.git
synced 2024-12-26 05:32:26 +00:00
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:
parent
8afda06b7a
commit
7c0f9d0477
25
helloworld-wozos.asm
Normal file
25
helloworld-wozos.asm
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user