Created
May 29, 2011 11:06
-
-
Save biomood/997654 to your computer and use it in GitHub Desktop.
Hello World for the C64 using .BYTE, CHROUT and loops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;********************************************************* | |
;* 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