8bitlenser/lenser/viewer/loaddata.i
2026-07-03 19:35:35 -07:00

20 lines
746 B
OpenEdge ABL

; Separate-binary prologue. When SEPARATE=1 the picture is NOT appended to this
; viewer; it lives in its own disk file "data" (load address $2000). Pull it in
; with the KERNAL before displaying. When SEPARATE=0 this is nothing, and the
; data was appended after the viewer instead.
#if SEPARATE == 1
lda #4
ldx #<cv_dataname
ldy #>cv_dataname
jsr $ffbd ; SETNAM
lda #1
ldx #8
ldy #1
jsr $ffba ; SETLFS (secondary 1 = load to file's address)
lda #0
jsr $ffd5 ; LOAD "data" -> $2000
jmp cv_loaded
cv_dataname:
.byte $44,$41,$54,$41 ; "DATA" in PETSCII (the c1541 "data" file)
cv_loaded:
#endif