I am trying to learn 6510 assembly and since I am running Debian xa65 is the assembler I want to use.
I have so far written a piece of code that looks like so:
*=$0801
.byte $0c, $08, $0a, $00, $9e, $20
.byte $34, $30, $39, $36, $00, $00
.byte $00
*=$1000
INC 53280
INC 53281
JMP $1000
Now, the first .byte section are suposed to "autostart" the program once loaded. This is something I found from a tutorial and as far as I can understand it will only run SYS 4096 making the CPU start executing the code at address $1000
The rest of the code should simply start flickering the outer and inner border of the C64 and repeat forever.
When assembling this I simply run the following:
xa test.s -o test.prg
and then I try to load test.prg into VICE to test it. with LOAD "TEST.PRG",8,1: and even if the file loads it does not autostart, nothing happens if i type RUN: and the same if I type LIST: - the only result is the famous READY. and the cursor flashing very happily like usual.
I tried to remove the autostart stuff and assembled only the code starting from *=$1000 but I got the same results. Trying to start with SYS 4096 also results in READY and nothing more.
I am sure I am not using the xa assembler right, but I can't figure out how I do create a proper PRG file for the C64 to use. What am I doing wrong?
$34, $30, $39, $36
is simply the ASCII (PETSCII) encoding for4096
If you want to load your machine code somewhere else, you can just change that. The$9E
is the Basic token forSYS
. The$0a $00
is the line number (10). The$0c, $08
is the address of the start of the next line. – Venusian