4cade/src/cartoons/cartoon3.s

53 lines
704 B
ArmAsm
Raw Normal View History

2019-06-29 00:59:46 +00:00
!cpu 65c02
!to "cartoon.3#0602d0",plain
*=$2d0
cartoon=3
load=$2700
buffer=$2000
jsr $bf00
!byte $c8 ;open file
!word c8_parms ;->bd5d
; lda c8_parms+5
; sta ca_parms+1
jsr $bf00
!byte $ca ;read file
!word ca_parms
jsr $bf00
!byte $cc ;close
!word cc_parms
lda #>callback
sta $277a
lda #<callback-1
sta $277d
jmp $2700
callback:
lda #cartoon-1
sta $19c7
lda #$4c
sta $1832
jsr $2000
jmp $100
c8_parms ;bd5d
!byte 3
!word filename
!word buffer ;somewhere
!byte 0
ca_parms ;bd68
!byte 4
cc_parms ;bd70
!byte 1
!word $2700
!word $ffff
!word $ffff
filename
!byte (filename_e-filename)-1
!text "SPARE.CHANGE"
filename_e