Das war's!!
Klasse, es läuft!
Vielen Dank an alle Beteiligten. 15 Minuten und die Sache war gelöst - kann mit kein besseres Forum vorstellen.
Hier nochmal der lauffähige Code falls später mal jemand ein ähnliches Problem hat:
Code
!cpu 6502
!to "build/loader.prg",cbm ; output file
* = $0801
!byte $0d,$08,$00,$00,$9e,$20,$34,$39,$31,$35,$32
* = $c000
dec $d021
dec $d020
lda #fnameend-fname
ldx #<fname
ldy #>fname
jsr $FFBD ; call SETNAM
lda #$01
ldx $BA ; last used device number
bne skip
ldx #$08 ; default to device 8
skip ldy #$01 ; not $01 means: load to address stored in file
jsr $FFBA ; call SETLFS
lda #$00 ; $00 means: load to memory (not verify)
jsr $FFD5 ; call LOAD
bcs error ; if carry set, a load error has happened
stx $2d ; Neu!
sty $2e ; Neu!
jsr $e453 ; prepare BASIC pointers for RUN
jsr $a660 ;
jsr $a68e ; RUN
jmp $a7ae ;
error
; Accumulator contains BASIC error code
; most likely errors:
; A = $05 (DEVICE NOT PRESENT)
; A = $04 (FILE NOT FOUND)
; A = $1D (LOAD ERROR)
; A = $00 (BREAK, RUN/STOP has been pressed during loading)
dec $d020
sta $0401 ; error code ausgeben
fname
!scr "ABSPANN"
fnameend
Alles anzeigen