JSR ile atladığım rutinden geri geri dönemiyorum. Hatayı izole etmek için kodu basitleştirdim.
Beklentim programın çerçeve rengini değiştirip sonsuz döngüye girip beklemesi. Ama çerçeve rengini değiştirdikten sonra
?SYNTAX ERROR IN 239
READY
yazıp BASIC'e dönüyor.
!cpu 6510
!to "../build/test.prg",cbm ; output file
;--------------------------------------------------------------------
* = $0801 ; BASIC start address (#2049)
!byte $0d,$08,$dc,$07,$9e,$20,$34,$39 ; BASIC loader to start at $c000...
!byte $31,$35,$32,$00,$00,$00 ; puts BASIC line 2012 SYS 49152
* = $c000 ; start address for 6502 code
;--------------------------------------------------------------------
jmp clear_screen
loop_forever
jmp loop_forever
clear_screen
lda #$03
sta $d020
rts
Acme'nin compile log'u da aşağıda.
En sondaki '?'ni anlamamam dışında sorun yok görünüyor.

Compiling 6502 code with Input file /Users/gokhan/C64Proje/racersBeta/code/test.asm to test.prg
crunching test.prg
Load address 0x0801=2049, Last byte 0xc00b=49163
Exec address 0xc000=49152
New load address 0x0801=2049
Interrupts enabled and memory config set to $37 after decompression
Runnable on Commodore 64
0
2048
4096
6144
8192
10240
12288
14336
16384
18432
20480
22528
24576
26624
28672
30720
32768
34816
36864
38912
40960
43008
45056
47104
Checked: 47115
Selecting the number of escape bits.. Selected 3-bit escapes
Optimizing LZ77 and RLE lengths...
Selecting LZPOS LO length.. Selected 8-bit LZPOS LO part
Note: Using option -m6 you may get better results.
In: 47115, out: 325, ratio: 0.69% (0.06[0.01] b/B), gained: 99.32%
Gained RLE: 47086 (S+L:0+47086), LZ: 0, Esc: 0, Decompressor: -295
Times RLE: 1 (0+1), LZ: 0, Esc: 0 (normal: 23), 3 escape bits
Saving C64
../build/test.prg uses the memory $2d/$2e, $f7-$1b6, $200-$234, and $0801-$c016.
Compressed 47115 bytes in 0.00 seconds (19806.60 kB/sec)
loading /Users/gokhan/C64Proje/racersBeta/code/../build/test.prg
loop_forever =$c003
clear_screen =$c006; ?