2018-02-07 14:05:24 +00:00
|
|
|
;license:MIT
|
|
|
|
;(c) 2017-8 by 4am
|
2018-02-05 15:04:35 +00:00
|
|
|
;
|
2018-02-07 14:05:24 +00:00
|
|
|
; ProDOS and file routines
|
|
|
|
;
|
|
|
|
; Public functions
|
|
|
|
; - LoadFile
|
2018-02-21 21:00:31 +00:00
|
|
|
; - LoadDHRFile
|
2018-02-07 14:05:24 +00:00
|
|
|
; - SaveFile
|
2018-02-07 21:02:14 +00:00
|
|
|
; - SetPrefix
|
2018-02-07 14:05:24 +00:00
|
|
|
; - QuitToProDOS
|
2018-02-05 15:04:35 +00:00
|
|
|
;
|
|
|
|
|
2018-02-01 00:07:35 +00:00
|
|
|
; MLI command codes
|
|
|
|
CMD_QUIT = $65 ; quit to ProDOS
|
|
|
|
CMD_CREATE = $C0 ; create new file
|
|
|
|
CMD_DESTROY = $C1 ; delete a file
|
2018-02-07 21:02:14 +00:00
|
|
|
CMD_SETPREFIX= $C6 ; change default pathname prefix
|
2018-02-01 00:07:35 +00:00
|
|
|
CMD_OPEN = $C8 ; open a file
|
|
|
|
CMD_READ = $CA ; read an open file
|
|
|
|
CMD_WRITE = $CB ; write to an open file
|
|
|
|
CMD_CLOSE = $CC ; close an open file
|
|
|
|
|
|
|
|
; MLI parameter counts
|
|
|
|
PC_QUIT = $04
|
|
|
|
PC_CREATE = $07
|
|
|
|
PC_DESTROY = $01
|
2018-02-07 21:02:14 +00:00
|
|
|
PC_SETPREFIX = $01
|
2018-02-01 00:07:35 +00:00
|
|
|
PC_OPEN = $03
|
|
|
|
PC_READ = $04
|
|
|
|
PC_WRITE = $04
|
|
|
|
PC_CLOSE = $01
|
|
|
|
|
|
|
|
PRODOSMLI = $BF00 ; [callable] MLI entry point
|
|
|
|
|
|
|
|
;-------------------------------
|
2018-02-05 15:04:35 +00:00
|
|
|
; LoadFile
|
|
|
|
; load a file into memory all at once, using ProDOS MLI calls
|
2018-02-01 00:07:35 +00:00
|
|
|
;
|
2018-03-30 17:19:14 +00:00
|
|
|
; in: stack contains 6 bytes of parameters:
|
2018-02-01 00:07:35 +00:00
|
|
|
; +1 address of pathname
|
2018-02-05 15:04:35 +00:00
|
|
|
; +3 address of data buffer (to receive file contents)
|
2018-03-30 17:19:14 +00:00
|
|
|
; +5 address of ProDOS file buffer
|
2018-02-05 15:04:35 +00:00
|
|
|
; out: if C set, load failed and A contains error code
|
|
|
|
; from open or read
|
|
|
|
; if C clear, load succeeded and ($02) contains
|
|
|
|
; data loaded from file
|
2018-02-01 00:07:35 +00:00
|
|
|
; all other flags clobbered
|
|
|
|
; all registers clobbered
|
|
|
|
; stack set to next instruction after parameters
|
|
|
|
;-------------------------------
|
|
|
|
!zone {
|
2018-02-05 15:04:35 +00:00
|
|
|
LoadFile
|
2018-03-30 17:19:14 +00:00
|
|
|
+PARAMS_ON_STACK 6
|
2018-02-01 00:07:35 +00:00
|
|
|
|
|
|
|
ldy #$01
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo byte of pathname
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+1
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi byte of pathname
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+2
|
2018-03-30 17:19:14 +00:00
|
|
|
ldy #$05
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo byte of ProDOS file buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+3
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi byte of ProDOS file buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+4
|
2018-02-05 15:04:35 +00:00
|
|
|
|
|
|
|
jsr _openfile
|
|
|
|
bcs .exit ; C set on error
|
2018-02-01 00:07:35 +00:00
|
|
|
|
|
|
|
pha ; push file reference number
|
2018-02-05 15:04:35 +00:00
|
|
|
ldy #$03
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo address of data buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+2
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi address of data buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+3
|
2018-03-30 17:19:14 +00:00
|
|
|
lda #$FF
|
|
|
|
sta mliparam+4 ; max data length (unlimited, YOLO)
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+5
|
|
|
|
pla ; pull file reference number
|
2018-02-05 15:04:35 +00:00
|
|
|
jsr _readfile
|
|
|
|
php ; save flags from readfile
|
2018-02-01 00:07:35 +00:00
|
|
|
pha
|
2018-02-05 15:04:35 +00:00
|
|
|
jsr _closefile ; always close whether read worked or not
|
2018-02-01 00:07:35 +00:00
|
|
|
pla
|
2018-02-05 15:04:35 +00:00
|
|
|
plp ; restore flags from readfile
|
|
|
|
; (so caller gets codes from read attempt,
|
2018-02-01 00:07:35 +00:00
|
|
|
; not close)
|
2018-02-05 15:04:35 +00:00
|
|
|
.exit
|
2018-02-01 00:07:35 +00:00
|
|
|
rts
|
|
|
|
}
|
|
|
|
|
2018-02-21 21:00:31 +00:00
|
|
|
;-------------------------------
|
|
|
|
; LoadDHRFile
|
|
|
|
; load uncompressed DHR file into memory from .A2FC file
|
|
|
|
; 1. load first half ($2000 bytes)
|
|
|
|
; 2. copy to auxmem
|
|
|
|
; 3. load second half ($2000 bytes)
|
|
|
|
;
|
|
|
|
; always loads into graphics page 1 ($2000/main and $2000/aux)
|
|
|
|
;
|
|
|
|
; in: stack contains 4 bytes of parameters:
|
|
|
|
; +1 address of pathname
|
|
|
|
; +3 address of ProDOS file buffer
|
|
|
|
; out: if C set, load failed
|
|
|
|
; if C clear, load succeeded
|
|
|
|
; all other flags clobbered
|
|
|
|
; all registers clobbered
|
|
|
|
; stack set to next instruction after parameters
|
|
|
|
;-------------------------------
|
|
|
|
!zone {
|
|
|
|
LoadDHRFile
|
2018-03-24 19:28:55 +00:00
|
|
|
+PARAMS_ON_STACK 4
|
2018-02-21 21:00:31 +00:00
|
|
|
|
|
|
|
ldy #$04
|
2018-03-24 19:28:55 +00:00
|
|
|
- lda (PARAM),y
|
2018-02-21 21:00:31 +00:00
|
|
|
sta mliparam,y
|
|
|
|
dey
|
|
|
|
bne -
|
|
|
|
|
|
|
|
jsr _openfile
|
|
|
|
bcs .exit ; C set on error
|
|
|
|
sta .saverefnum+1 ; store file refnum
|
|
|
|
|
|
|
|
ldy #$20
|
2018-02-21 21:14:56 +00:00
|
|
|
stz mliparam+2 ; read into $2000 in main mem
|
2018-02-21 21:00:31 +00:00
|
|
|
sty mliparam+3
|
2018-02-21 21:14:56 +00:00
|
|
|
stz mliparam+4 ; read length = $2000 bytes (first half of file)
|
2018-02-21 21:00:31 +00:00
|
|
|
sty mliparam+5
|
|
|
|
|
|
|
|
jsr _readfile
|
|
|
|
bcs .close
|
|
|
|
|
|
|
|
sta $C000
|
|
|
|
ldx #$20 ; copy $2000 bytes to auxmem
|
|
|
|
stx .copya+2
|
|
|
|
stx .copyb+2
|
|
|
|
ldy #$00
|
|
|
|
.writeToAux
|
|
|
|
sta $C005
|
|
|
|
.copya lda $FF00, y
|
|
|
|
.copyb sta $FF00, y
|
|
|
|
iny
|
|
|
|
bne .copya
|
|
|
|
sta $C004
|
|
|
|
inc .copya+2
|
|
|
|
inc .copyb+2
|
|
|
|
dex
|
|
|
|
bne .writeToAux
|
|
|
|
|
|
|
|
lda .saverefnum+1
|
2018-02-21 21:14:56 +00:00
|
|
|
jsr _readfile ; read another $2000 bytes into $2000 (stays in main mem)
|
2018-02-21 21:00:31 +00:00
|
|
|
|
|
|
|
.close
|
|
|
|
php ; save flags from readfile
|
|
|
|
.saverefnum
|
|
|
|
lda #$d1 ; file refnum (set above)
|
|
|
|
jsr _closefile
|
|
|
|
plp ; restore flags from readfile
|
|
|
|
.exit
|
|
|
|
rts
|
|
|
|
}
|
|
|
|
|
2018-02-01 00:07:35 +00:00
|
|
|
;-------------------------------
|
2018-02-05 15:04:35 +00:00
|
|
|
; SaveFile
|
|
|
|
; save a file to disk all at once, using ProDOS MLI calls
|
2018-02-01 00:07:35 +00:00
|
|
|
;
|
2018-02-05 15:04:35 +00:00
|
|
|
; in: stack contains 11 ($0B) bytes of parameters:
|
2018-02-01 00:07:35 +00:00
|
|
|
; +1 address of pathname
|
2018-02-05 15:04:35 +00:00
|
|
|
; +3 [byte] file type
|
|
|
|
; +4 [word] aux file type
|
|
|
|
; +6 address of data buffer
|
|
|
|
; +8 [word] length of data buffer
|
|
|
|
; +A address of ProDOS file buffer
|
|
|
|
; out: if C set, save failed and A contains error code
|
|
|
|
; from open or write
|
|
|
|
; if C clear, save succeeded
|
2018-02-01 00:07:35 +00:00
|
|
|
; all other flags clobbered
|
|
|
|
; all registers clobbered
|
|
|
|
; stack set to next instruction after parameters
|
|
|
|
;-------------------------------
|
|
|
|
!zone {
|
2018-02-05 15:04:35 +00:00
|
|
|
SaveFile
|
2018-03-24 19:28:55 +00:00
|
|
|
+PARAMS_ON_STACK $0B
|
2018-02-01 00:07:35 +00:00
|
|
|
|
|
|
|
ldy #$01
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo byte of pathname
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+1
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi byte of pathname
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+2
|
2018-02-05 15:04:35 +00:00
|
|
|
jsr _deletefile ; don't care if this fails
|
|
|
|
ldy #$03
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; file type
|
2018-02-05 15:04:35 +00:00
|
|
|
sta mliparam+4
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo byte of aux file type
|
2018-02-05 15:04:35 +00:00
|
|
|
sta mliparam+5
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi byte of aux file type
|
2018-02-05 15:04:35 +00:00
|
|
|
sta mliparam+6
|
|
|
|
jsr _createfile
|
|
|
|
bcs .exit
|
|
|
|
|
|
|
|
ldy #$0A
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo byte of ProDOS file buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+3
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi byte of ProDOS file buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+4
|
2018-02-05 15:04:35 +00:00
|
|
|
jsr _openfile
|
|
|
|
bcs .exit
|
2018-02-01 00:07:35 +00:00
|
|
|
|
|
|
|
pha ; push file reference number
|
2018-02-05 15:04:35 +00:00
|
|
|
ldy #$06
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo address of data buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+2
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi address of data buffer
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+3
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo data length
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+4
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi data length
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+5
|
|
|
|
pla ; pull file reference number
|
2018-02-05 15:04:35 +00:00
|
|
|
jsr _writefile
|
|
|
|
php ; save flags from writefile
|
2018-02-01 00:07:35 +00:00
|
|
|
pha
|
2018-02-05 15:04:35 +00:00
|
|
|
jsr _closefile ; always close whether write worked or not
|
2018-02-01 00:07:35 +00:00
|
|
|
pla
|
2018-02-05 15:04:35 +00:00
|
|
|
plp ; restore flags from write
|
|
|
|
; (so caller gets codes from write attempt,
|
2018-02-01 00:07:35 +00:00
|
|
|
; not close)
|
2018-02-05 15:04:35 +00:00
|
|
|
.exit
|
2018-02-01 00:07:35 +00:00
|
|
|
rts
|
|
|
|
}
|
|
|
|
|
2018-02-07 21:02:14 +00:00
|
|
|
;-------------------------------
|
|
|
|
; SetPrefix
|
|
|
|
; set current directory
|
|
|
|
;
|
|
|
|
; in: stack contains 2 bytes of parameters:
|
|
|
|
; +1 address of pathname
|
|
|
|
; out: if C set, call failed and A contains error code
|
|
|
|
; if C clear, call succeeded
|
|
|
|
; all other flags clobbered
|
|
|
|
; all registers clobbered
|
|
|
|
; stack set to next instruction after parameters
|
|
|
|
;-------------------------------
|
|
|
|
!zone {
|
|
|
|
SetPrefix
|
2018-03-24 19:28:55 +00:00
|
|
|
+PARAMS_ON_STACK 2
|
2018-02-07 21:02:14 +00:00
|
|
|
|
|
|
|
ldy #$01
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; lo byte of pathname
|
2018-02-07 21:02:14 +00:00
|
|
|
sta mliparam+1
|
|
|
|
iny
|
2018-03-24 19:28:55 +00:00
|
|
|
lda (PARAM),y ; hi byte of pathname
|
2018-02-07 21:02:14 +00:00
|
|
|
sta mliparam+2
|
|
|
|
|
|
|
|
jmp _setprefix
|
|
|
|
}
|
|
|
|
|
2018-02-01 00:07:35 +00:00
|
|
|
;-------------------------------
|
|
|
|
; open file via ProDOS MLI
|
|
|
|
;
|
|
|
|
; in: caller has filled @mliparam with address of
|
|
|
|
; pathname, address of data buffer, and maximum
|
|
|
|
; data length
|
|
|
|
; out: if C set, open failed and A contains error code
|
|
|
|
; if C clear, open succeeded and A contains
|
|
|
|
; file reference number
|
|
|
|
;-------------------------------
|
2018-02-05 15:04:35 +00:00
|
|
|
_openfile
|
2018-02-01 00:07:35 +00:00
|
|
|
lda #CMD_OPEN ; MLI command
|
|
|
|
ldy #PC_OPEN ; number of parameters for 'open' command
|
|
|
|
jsr mli
|
2018-02-05 15:04:35 +00:00
|
|
|
bcs +
|
2018-02-01 00:07:35 +00:00
|
|
|
lda refnum ; caller should save file reference number
|
|
|
|
; as this memory location may be
|
|
|
|
; overwritten by later MLI calls
|
2018-02-05 15:04:35 +00:00
|
|
|
+ rts
|
2018-02-01 00:07:35 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; read an open file via ProDOS MLI
|
|
|
|
;
|
|
|
|
; in: A = file reference number
|
|
|
|
; caller has filled @mliparam with address of
|
|
|
|
; data buffer and maximum data length
|
|
|
|
; out: if C set, read failed and A contains error code
|
|
|
|
; if C clear, read succeeded and A contains the same
|
|
|
|
; file reference number that was passed in
|
|
|
|
;-------------------------------
|
2018-02-05 15:04:35 +00:00
|
|
|
_readfile
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+1 ; store file reference number
|
|
|
|
lda #CMD_READ ; MLI read command
|
|
|
|
ldy #PC_READ ; number of parameters for 'read' command
|
|
|
|
jsr mli
|
2018-02-05 15:04:35 +00:00
|
|
|
bcs +
|
2018-02-01 00:07:35 +00:00
|
|
|
lda mliparam+1 ; if no error, return file reference number
|
2018-02-05 15:04:35 +00:00
|
|
|
+ rts
|
2018-02-01 00:07:35 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; write to an open file via ProDOS MLI
|
|
|
|
;
|
|
|
|
; in: A = file reference number
|
|
|
|
; caller has filled @mliparam with address of
|
|
|
|
; data buffer and data length
|
|
|
|
; out: if C set, write failed and A contains error code
|
|
|
|
; if C clear, write succeeded and A contains the same
|
|
|
|
; file reference number that was passed in
|
|
|
|
;-------------------------------
|
2018-02-05 15:04:35 +00:00
|
|
|
_writefile
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+1 ; store file reference number
|
|
|
|
lda #CMD_WRITE ; MLI write command
|
|
|
|
ldy #PC_WRITE ; number of parameters for 'write' command
|
|
|
|
jsr mli
|
2018-02-05 15:04:35 +00:00
|
|
|
bcs +
|
2018-02-01 00:07:35 +00:00
|
|
|
lda mliparam+1 ; if no error, return file reference number
|
2018-02-05 15:04:35 +00:00
|
|
|
+ rts
|
2018-02-01 00:07:35 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; close an open file
|
|
|
|
; in: A = file reference number
|
|
|
|
; out: if error, C set and A contains error code
|
|
|
|
; if success, C clear
|
|
|
|
;-------------------------------
|
2018-02-05 15:04:35 +00:00
|
|
|
_closefile
|
2018-02-01 00:07:35 +00:00
|
|
|
sta mliparam+1 ; store file reference number
|
|
|
|
lda #CMD_CLOSE ; MLI close command
|
|
|
|
ldy #PC_CLOSE ; number of parameters for 'close' command
|
|
|
|
jsr mli
|
|
|
|
rts
|
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; create a file via ProDOS MLI
|
|
|
|
; always sets access bits to $C3 (full access)
|
|
|
|
; always sets creation to 0 (current date/time)
|
|
|
|
; always sets storage type to 1 (file)
|
|
|
|
; in: caller has filled @mliparam
|
|
|
|
; with address of pathname,
|
|
|
|
; file type, aux file type
|
|
|
|
; out: if error, C set and A contains error code
|
|
|
|
; if success, C clear
|
|
|
|
;-------------------------------
|
|
|
|
accessbits = $C3 ; full access
|
|
|
|
|
2018-02-05 15:04:35 +00:00
|
|
|
_createfile
|
2018-02-01 00:07:35 +00:00
|
|
|
lda #accessbits
|
|
|
|
sta mliparam+3 ; access bits (full access)
|
|
|
|
ldy #1
|
|
|
|
sty mliparam+7 ; storage type (file)
|
|
|
|
dey
|
|
|
|
sty mliparam+8 ; creation date (current)
|
|
|
|
sty mliparam+9
|
|
|
|
sty mliparam+10 ; creation time (current)
|
|
|
|
sty mliparam+11
|
|
|
|
lda #CMD_CREATE ; MLI create command
|
|
|
|
ldy #PC_CREATE ; number of parameters for 'create' command
|
|
|
|
jsr mli
|
|
|
|
rts
|
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; delete a file using ProDOS MLI
|
|
|
|
; in: caller has filled @mliparam
|
|
|
|
; with address of pathname
|
|
|
|
; out: if error, C set and A contains error code
|
|
|
|
; if success, C clear
|
|
|
|
;-------------------------------
|
2018-02-05 15:04:35 +00:00
|
|
|
_deletefile
|
2018-02-01 00:07:35 +00:00
|
|
|
lda #CMD_DESTROY ; MLI destroy command
|
|
|
|
ldy #PC_DESTROY ; number of parameters for 'destroy' command
|
|
|
|
jsr mli
|
|
|
|
rts
|
|
|
|
|
2018-02-07 21:02:14 +00:00
|
|
|
;-------------------------------
|
|
|
|
; change current directory (set prefix)
|
|
|
|
; using ProDOS MLI
|
|
|
|
; in: caller has filled @mliparam
|
|
|
|
; with address of pathname
|
|
|
|
; out: if error, C set and A contains error code
|
|
|
|
; if success, C clear
|
|
|
|
;-------------------------------
|
|
|
|
_setprefix
|
|
|
|
lda #CMD_SETPREFIX
|
|
|
|
ldy #PC_SETPREFIX
|
|
|
|
jsr mli
|
|
|
|
rts
|
|
|
|
|
|
|
|
;-------------------------------
|
2018-02-01 00:07:35 +00:00
|
|
|
QuitToProDOS
|
2018-02-01 03:04:10 +00:00
|
|
|
lda #CMD_QUIT
|
|
|
|
ldy #PC_QUIT
|
2018-02-01 00:07:35 +00:00
|
|
|
; execution falls through here
|
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; low-level MLI wrapper
|
|
|
|
; in: A = MLI command code
|
|
|
|
; Y = number of MLI parameters
|
|
|
|
; caller has filled @mliparam
|
|
|
|
; with all relevant parameters
|
|
|
|
; out: returns immediately after
|
|
|
|
; calling MLI, so whatever
|
|
|
|
; state the MLI routine sets,
|
|
|
|
; the caller will see it
|
|
|
|
; verbatim
|
|
|
|
;-------------------------------
|
|
|
|
mli sta mlicmd ; store command code
|
|
|
|
sty mliparam ; number of parameters
|
|
|
|
jsr PRODOSMLI ; call ProDOS
|
|
|
|
mlicmd !byte 00 ; command number
|
|
|
|
!word mliparam ; address of parameter table
|
|
|
|
rts
|
|
|
|
mliparam !byte $FE,$FE,$FE,$FE
|
|
|
|
filetype !byte $FE ; file type (set by MLI get_file_info)
|
|
|
|
auxtype ; auxiliary file type (2 bytes, set by MLI get_file_info)
|
|
|
|
refnum !byte $FE ; file refnum (set by MLI open)
|
|
|
|
mlilen !byte $FE,$FE ; file length (set by MLI read)
|
|
|
|
blocks !byte $FE,$FE ; blocks used (set by getvolumeinfo)
|
|
|
|
; member is also used by createfile
|
|
|
|
!byte $FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE
|
|
|
|
; used by get_file_info
|