Skip to content

Instantly share code, notes, and snippets.

@biomood
Created May 29, 2011 11:06
Show Gist options
  • Save biomood/997654 to your computer and use it in GitHub Desktop.
Save biomood/997654 to your computer and use it in GitHub Desktop.
Hello World for the C64 using .BYTE, CHROUT and loops
;*********************************************************
;* HELLOWORLD using .BYTE, CHROUT and loops *
;*********************************************************
processor 6502
org $C000
;set up some helpful labels
CLEAR = $E544
CHROUT = $FFD2
JSR CLEAR ;clear the screen
LDX #0 ;put 0 in X
READ LDA MSG,X ;put MSG[X] in A
CMP #35 ;compare A with #
BEQ END ;end if true
JSR CHROUT ;output A
INX
JMP READ ;loop
END RTS
MSG .BYTE "HELLO WORLD#"
.END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment