I'm using Aart Bik's 6502 cross assembler:
http://www.aartbik.com/MISC/c64.html
I got my first hello world running by changing his C64 example to an unexpanded VIC available memory location (Yay!).
Code: Select all
chrout .equ $ffd2 ; kernal addresss
main .org $1200 ; start at free RAM
ldx #0
loop lda text,x
jsr chrout
inx
cpx #11
bne loop
rts
text .byte "HELLO WORLD"
Start at $1200 is a rather random place I chose, for lack of knowledge of efficient memory usage.
Now I'd like to have a basic line with:
10 sys[whatever the closest address is after this line]
Aart gives an example for the C64:
Code: Select all
;
; encode SYS 2064 line in BASIC program space
;
.org $0800
.byte $00 $0c $08 $0a $00 $9e $20 $32
.byte $30 $36 $34 $00 $00 $00 $00 $00
lab2064 jmp main
I've tried .org at $1000 and $1001, with the number after 'sys' changed to #4112. And some other combinations. But I get a screwed-up basic line.
What should it be?