Skip to content

Instantly share code, notes, and snippets.

@florentmorin
Last active July 12, 2020 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florentmorin/7bbe59d6f85a68cce274bd6ffb0378b1 to your computer and use it in GitHub Desktop.
Save florentmorin/7bbe59d6f85a68cce274bd6ffb0378b1 to your computer and use it in GitHub Desktop.
Hello world Apple II
10 PRINT "Hello World!"
begin
write ('Hello World!');
readln;
end.
; Extracted from https://github.com/mogorman/appleii-helloworld
.import __STARTUP_LOAD__, __BSS_LOAD__ ; Linker generated
.segment "EXEHDR"
.addr __STARTUP_LOAD__ ; Start address
.word __BSS_LOAD__ - __STARTUP_LOAD__ ; Size
.segment "RODATA"
MSG: .ASCIIZ "Hello world!"
.segment "STARTUP"
LDA #$8D ; next line
JSR $FDED
LDX #0
LDA MSG,X ; load initial char
@LP: ORA #$80
JSR $FDED ; cout
INX
LDA MSG,X
BNE @LP
LDA #$8D ; next line
JSR $FDED
JMP $03D0 ; warm start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment