è ô "osfile"ò[OPT Passü%.OsArgs  \ Return file system no.   Cpy #0   Bne args2   Cmp #0$   Bne next_args.   Lda #our_fs_no8
   RtsB.next_argsL   Cmp #1V   Bne args2`   Lda clinej   Sta &0,Xt   Lda cline+1~   Sta &1,Xˆ   Lda #0’   Sta &2,Xœ   Sta &3,X¦   Lda #1°
   Rtsº
.args2Ä   Cpy #2Î   Bne args3Ø
   Phaâ;   Lda #05  \ **************** File length !!!!!!!!!!!!ì   Sta &0,Xö   Lda #0    Sta &1,X
   Sta &2,X   Sta &2,X
   Pla(
.args32
   Rts< F.attributesP!   Lda zp0: Pha: Lda zp1: PhaZ   Ldy #0: Lda (zp0),Y: Taxd    Iny: Lda (zp0),Y: Sta zp1n   Stx zp0x-   \ zp0,1 now points to file name string‚   Ldy #—("F")Œ>   Jsr transact   \ zp0,1 should point to string !!!!!!!!!–   Pla: Sta zp1    Pla: Sta zp0ª   Jsr verify´2   Jsr GetLoadAddr \ reads 16 bytes, reads esc¾.sneaky_fixupÈ   Ldy #2Ò
.attr1Ü+   Lda info_block-2+4,Y    \ load, execæ   Sta (zp0),Yð
   Inyú   Cpy #8+2   Bne attr1
.attr2"   lda info_block-2-8,Y  \ len"   Sta (zp0),Y,
   Iny6   Cpy #12+2@   Bne attr2J
.attr3T#   Lda info_block-2,Y  \ attr  ^   Sta (zp0),Yh
   Inyr   Cpy #16+2|   Bne attr3†   Ldx zp0�   Ldy zp1š   Lda #1¤
   Rts® ¸.GetLoadAddrÂ   \ Expect 16 bytes in hexÌ0   \ Store in private workspace (info_block)Ö   Lda #0à   Sta work1ê.next_infoô   Jsr GetHexþ   Ldy work1   Sta info_block,Y   Inc work1   Cpy #15&   Bne next_info0   Jsr verify:
   RtsD N.starloadX1   \ zp 0,1 point to control block for OSFILEb   Ldy #6l   Lda (zp0),Yv   Beq use_CB€   Jsr dobrkŠ/   EQUB &FF: EQUS "No load address": EQUB 0”.use_CBž!   Lda zp0: Pha: Lda zp1: Pha¨   Ldy #0: Lda (zp0),Y: Tax²    Iny: Lda (zp0),Y: Sta zp1¼   Stx zp0Æ-   \ zp0,1 now points to file name stringÐ   Ldy #—("L")Ú   Jsr transactä   Jsr verifyî   Jsr GetLoadAddrø   Lda #27   Jsr SendCom   Pla: Sta zp1   Pla: Sta zp0 &   \ zp 0,1 now ppoint at CB again*   Lda #24
   Clc>$   Adc zp0  \ Load address blockH   Sta scratch0R   Lda zp1\   Adc #0f   Sta scratch1p   Jsr initloadz   Ldy #0„   Lda (scratch0),YŽ
   Pha˜
   Iny¢   Lda (scratch0),Y¬   Sta scratch1¶
   PlaÀ   Sta scratch0Ê\   Lda scratch1:\ PhaÔD\   Lda scratch0:\ Pha  \ Save start addr for working out lengthÞ.load_loopè   Jsr GetHexò   Bcs load_doneü   Jsr putbyte	   Inc scratch0	   BNE ncy2	   Inc scratch1	$	.ncy2	.   Jmp load_loop	8.load_done	B   Jsr reltub	L   Jsr sneaky_fixup	V\   Ldy #&0A	`\   Pla:\ Sta work1	jC\   Lda scratch0:\ Sec:\ Sbc work1   \ Might be a byte too long	t\   Sta (zp0),Y  \ Y<-&A	~\   Pla:\ Sta work1	ˆ \   Lda scratch1:\ Sbc work1	’\   Iny	œ\   Sta (zp0),Y  \ Y<-&B	¦\   Iny	°\   Lda #0	º\   Sta (zp0),Y	Ä\   Iny	Î\   Sta (zp0),Y	Ø$   Lda #1  \ type code for file.	â   Ldx zp0	ì   Ldy zp1	ö
   Rts
 .starsave

1   \ zp 0,1 point to control block for OSFILE
!   Lda zp0: Pha: Lda zp1: Pha
   Ldy #0: Lda (zp0),Y: Tax
(    Iny: Lda (zp0),Y: Sta zp1
2   Stx zp0
<-   \ zp0,1 now points to file name string
F   Ldy #—("S")
P   Jsr transact
Z  Jsr verify
d  Pla: Sta zp1
n1   Pla: Sta zp0 \zp 0,1 now point to CB again
x   Lda #&0A
‚
   Clc
Œ   Adc zp0
–   Sta scratch0
    Lda zp1
ª   Adc #0
´   Sta scratch1
¾   Jsr initsave
È   Ldy #0
Ò   Lda (scratch0),Y
Ü
   Pha
æ
   Iny
ð   Lda (scratch0),Y
ú   Sta scratch1
   Pla   Sta scratch0   Lda #0"   Sta work3,.next_save6   Ldy #&0E: Lda (zp0),Y@   Cmp scratch0J   bne notendT   Iny: Lda (zp0),Y^   Cmp scratch1h   bne notendr   Jmp save_done|.notend†   Jsr getbyte�
   Phaš   Lsr A:Lsr A:Lsr A:Lsr A¤   CLC: ADC #—("0")®   Jsr SendCom¸
   PlaÂ   And #&0FÌ   CLC: ADC #—("0")Ö   Jsr SendComà   Inc scratch0ê   BNE ncy3ô   inc scratch1þ	.ncy3   Inc work3   Lda work3:And #15:Tay   Bne next_save   Jsr verify&   Jmp next_save0.save_done:   Jsr reltubD   Lda #27: jsr SendComN   jsr verifyX   Ldx zp0b   ldy zp1l   Lda #0v
   rts€]Šøÿ