2016-08-26 15:10:38 +00:00
|
|
|
|
PR#3
|
|
|
|
|
PREFIX /A2OSX.SRC
|
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* For All SYS.xxxx calls, X = #SYSCall
|
|
|
|
|
* Must be kept in X before calling
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* PFT.Check
|
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #FOpen
|
|
|
|
|
* Open a file
|
|
|
|
|
* ##In :
|
|
|
|
|
* PUSHW = AUXTYPE
|
|
|
|
|
* PUSHB = TYPE
|
|
|
|
|
* PUSHB = MODE
|
|
|
|
|
* SYS.FOPEN.R : if R and !exists -> ERROR
|
|
|
|
|
* SYS.FOPEN.W : if W and !exists -> CREATE
|
|
|
|
|
* SYS.FOPEN.A : Append
|
|
|
|
|
* SYS.FOPEN.T : Open/Append in Text mode
|
|
|
|
|
* SYS.FOPEN.X : Create if not exists
|
|
|
|
|
* PUSHW = PATH (PSTR)
|
|
|
|
|
* ##Out :
|
2016-08-26 15:10:38 +00:00
|
|
|
|
* CC : A = hFILE
|
|
|
|
|
* CS : A = EC
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*\--------------------------------------
|
2016-09-29 15:30:15 +00:00
|
|
|
|
K.FOPEN jsr PFT.CheckPathSTK
|
2016-08-26 15:10:38 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+1
|
2016-09-21 15:20:37 +00:00
|
|
|
|
>PULLB K.FOPEN.MODE
|
|
|
|
|
>PULLB K.FOPEN.TYPE
|
|
|
|
|
>PULLW K.FOPEN.AUXTYPE
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
>MLICALL MLIGETFILEINFO
|
|
|
|
|
bcc .10 Already Exists
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
bit K.FOPEN.MODE Create if not exists ?
|
2016-08-28 20:48:01 +00:00
|
|
|
|
bpl .9 No, return MLI error
|
|
|
|
|
|
2016-09-20 16:00:51 +00:00
|
|
|
|
lda #S.FILEINFO.ACCESS.FULL Yes, Create...
|
2016-08-28 20:48:01 +00:00
|
|
|
|
sta MLICALL.PARAMS+3 Access
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.FOPEN.TYPE
|
2016-08-28 20:48:01 +00:00
|
|
|
|
sta MLICALL.PARAMS+4 File type
|
2016-09-21 15:20:37 +00:00
|
|
|
|
>LDYA K.FOPEN.AUXTYPE
|
2016-08-28 20:48:01 +00:00
|
|
|
|
>STYA MLICALL.PARAMS+5 Aux type
|
2016-09-20 16:00:51 +00:00
|
|
|
|
lda #S.FILEINFO.STORETYPE.STD
|
2016-08-28 20:48:01 +00:00
|
|
|
|
sta MLICALL.PARAMS+7
|
|
|
|
|
>MLICALL MLICREATE
|
|
|
|
|
bcc .10
|
|
|
|
|
.9 rts
|
|
|
|
|
|
|
|
|
|
.10 >PUSHWI S.FILE.PRODOS
|
2016-08-26 15:10:38 +00:00
|
|
|
|
>PUSHBI S.MEM.F.INIT0
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.GetMem
|
2016-08-26 15:10:38 +00:00
|
|
|
|
bcs .99
|
2016-08-28 20:48:01 +00:00
|
|
|
|
|
2016-08-26 15:10:38 +00:00
|
|
|
|
>STYA ZPQuickPtr1
|
|
|
|
|
stx hFILE
|
|
|
|
|
|
2016-10-24 15:54:43 +00:00
|
|
|
|
|
2016-08-26 15:10:38 +00:00
|
|
|
|
>PUSHWI 1024 get a ProDOS IOBUF
|
|
|
|
|
>PUSHBI S.MEM.F.ALIGN+S.MEM.F.NOMOVE
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.GetMem
|
2016-09-01 15:42:38 +00:00
|
|
|
|
bcs .98
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
|
|
|
|
>STYA MLICALL.PARAMS+3 Save Ptr to IOBUF for MLIOPEN call
|
|
|
|
|
txa
|
|
|
|
|
ldy #S.FILE.PRODOS.IOBUF
|
|
|
|
|
sta (ZPQuickPtr1),y
|
|
|
|
|
|
|
|
|
|
>MLICALL MLIOPEN
|
2016-08-28 20:48:01 +00:00
|
|
|
|
bcs .98
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
lda MLICALL.PARAMS+5 get ref_num
|
2016-08-26 15:10:38 +00:00
|
|
|
|
ldy #S.FILE.PRODOS.REF
|
|
|
|
|
sta (ZPQuickPtr1),y
|
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
sta MLICALL.PARAMS+1 Next MLI Calls are REF_NUM based
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.FOPEN.MODE
|
2016-08-28 20:48:01 +00:00
|
|
|
|
and #SYS.FOPEN.A Append ?
|
|
|
|
|
beq .20
|
|
|
|
|
|
|
|
|
|
>MLICALL MLIGETEOF
|
|
|
|
|
bcs .98
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
>MLICALL MLISETMARK
|
|
|
|
|
bcs .98
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.20 lda K.FOPEN.MODE
|
2016-08-28 20:48:01 +00:00
|
|
|
|
and #SYS.FOPEN.T Text Mode ?
|
|
|
|
|
beq .30
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
lda #$FF
|
|
|
|
|
sta MLICALL.PARAMS+2
|
|
|
|
|
lda #$0D
|
|
|
|
|
sta MLICALL.PARAMS+3
|
|
|
|
|
>MLICALL MLINEWLINE
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
.30 lda hFILE
|
2016-08-26 15:10:38 +00:00
|
|
|
|
clc
|
|
|
|
|
rts CC
|
|
|
|
|
|
|
|
|
|
.98 pha save MLI error
|
2016-10-29 19:58:21 +00:00
|
|
|
|
jsr K.FCloseA.1
|
2016-08-26 15:10:38 +00:00
|
|
|
|
pla get back MLI error
|
|
|
|
|
sec
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.FOPEN.MODE .BS 1
|
|
|
|
|
K.FOPEN.TYPE .BS 1
|
|
|
|
|
K.FOPEN.AUXTYPE .BS 2
|
2016-08-26 15:10:38 +00:00
|
|
|
|
hFILE .BS 1
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #FCloseA
|
|
|
|
|
* Close a file
|
|
|
|
|
* ##In :
|
2016-08-26 15:10:38 +00:00
|
|
|
|
* A = hFILE
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* ##Out :
|
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FCloseA jsr PFT.CheckFileA
|
2016-09-01 15:42:38 +00:00
|
|
|
|
sta hFILE
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.GetMemPtrA
|
2016-08-26 15:10:38 +00:00
|
|
|
|
>STYA ZPQuickPtr1
|
|
|
|
|
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FCloseA.1 ldy #S.FILE.PRODOS.REF
|
2016-08-26 15:10:38 +00:00
|
|
|
|
lda (ZPQuickPtr1),y
|
|
|
|
|
beq .1
|
|
|
|
|
sta MLICALL.PARAMS+1
|
|
|
|
|
>MLICALL MLICLOSE
|
|
|
|
|
|
|
|
|
|
.1 ldy #S.FILE.PRODOS.IOBUF
|
|
|
|
|
lda (ZPQuickPtr1),y
|
|
|
|
|
beq .2
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.FreeMemA
|
2016-08-26 15:10:38 +00:00
|
|
|
|
|
|
|
|
|
.2 lda hFILE
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.FreeMemA
|
2016-08-26 15:10:38 +00:00
|
|
|
|
rts
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #FRead
|
|
|
|
|
* Read bytes from file
|
|
|
|
|
* ##In :
|
2016-10-29 19:58:21 +00:00
|
|
|
|
* PUSHW = Dest Ptr
|
|
|
|
|
* PUSHW = Bytes To Read
|
|
|
|
|
* PUSHB = hFILE
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* ##Out :
|
|
|
|
|
* Y,A = Bytes Read
|
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FRead jsr PFT.CheckFileSTK
|
2016-09-27 15:51:59 +00:00
|
|
|
|
ldx #MLIREAD
|
2016-10-26 20:51:06 +00:00
|
|
|
|
bra K.FRead.1
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #FWrite
|
|
|
|
|
* ##In:
|
2016-10-29 19:58:21 +00:00
|
|
|
|
* PUSHW = Src Ptr
|
|
|
|
|
* PUSHW = Bytes To Write
|
|
|
|
|
* PUSHB = hFILE
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* #Out:
|
|
|
|
|
* Y,A = Bytes Written
|
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FWrite jsr PFT.CheckFileSTK
|
2016-09-27 15:51:59 +00:00
|
|
|
|
ldx #MLIWRITE
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FRead.1 >PULLA
|
2016-10-03 06:18:46 +00:00
|
|
|
|
jsr FILE.SetupPrt1A
|
2016-08-26 15:10:38 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+4
|
|
|
|
|
>PULLW MLICALL.PARAMS+2
|
2016-09-27 15:51:59 +00:00
|
|
|
|
|
|
|
|
|
* >MLICALL MLIWRITE
|
|
|
|
|
|
|
|
|
|
lda #4 Param Count = 4 for MLIREAD & MLIWRITE
|
|
|
|
|
jsr A2osX.MLICALL
|
2016-08-26 15:10:38 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
>LDYA MLICALL.PARAMS+6
|
|
|
|
|
.9 rts
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* #FFlushA
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* ##In:
|
2016-08-26 15:10:38 +00:00
|
|
|
|
* A = hFILE
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FFlushA jsr PFT.CheckFileA
|
2016-09-26 16:00:52 +00:00
|
|
|
|
jsr FILE.SetupPrt1A
|
2016-08-26 15:10:38 +00:00
|
|
|
|
>MLICALL MLIFLUSH
|
|
|
|
|
rts
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/-------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* #FSeek
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* ##In:
|
|
|
|
|
* PUSHW = OffsetHi
|
|
|
|
|
* PUSHW = OffsetLo
|
|
|
|
|
* PUSHB = From
|
|
|
|
|
* PUSHB = hFILE
|
|
|
|
|
*\-------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FSeek jsr PFT.CheckFileSTK
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>PULLA
|
2016-09-26 16:00:52 +00:00
|
|
|
|
jsr FILE.SetupPrt1A
|
2016-09-21 15:20:37 +00:00
|
|
|
|
>PULLB K.FSEEK.FROM
|
|
|
|
|
>PULLW K.FSEEK.OFFSET
|
|
|
|
|
>PULLW K.FSEEK.OFFSET+2
|
2016-09-22 15:46:01 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.FSEEK.FROM
|
2016-08-29 15:12:04 +00:00
|
|
|
|
|
2016-09-22 15:46:01 +00:00
|
|
|
|
* cmp #SYS.FSEEK.SET =0
|
|
|
|
|
|
2016-08-29 15:12:04 +00:00
|
|
|
|
bne .1
|
2016-09-22 15:46:01 +00:00
|
|
|
|
stz MLICALL.PARAMS+2
|
|
|
|
|
stz MLICALL.PARAMS+3
|
|
|
|
|
stz MLICALL.PARAMS+4
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.1 cmp #SYS.FSEEK.CUR
|
|
|
|
|
bne .2
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>MLICALL MLIGETMARK
|
2016-09-22 15:46:01 +00:00
|
|
|
|
bcc .8
|
|
|
|
|
rts
|
2016-08-29 15:12:04 +00:00
|
|
|
|
|
2016-09-22 15:46:01 +00:00
|
|
|
|
.2 cmp #SYS.FSEEK.END
|
|
|
|
|
bne .98
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>MLICALL MLIGETEOF
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2016-09-22 15:46:01 +00:00
|
|
|
|
.8 lda MLICALL.PARAMS+2
|
2016-09-21 15:20:37 +00:00
|
|
|
|
adc K.FSEEK.OFFSET
|
2016-08-29 15:12:04 +00:00
|
|
|
|
sta MLICALL.PARAMS+2
|
|
|
|
|
lda MLICALL.PARAMS+3
|
2016-09-21 15:20:37 +00:00
|
|
|
|
adc K.FSEEK.OFFSET+1
|
2016-08-29 15:12:04 +00:00
|
|
|
|
sta MLICALL.PARAMS+3
|
|
|
|
|
lda MLICALL.PARAMS+4
|
2016-09-21 15:20:37 +00:00
|
|
|
|
adc K.FSEEK.OFFSET+2
|
2016-08-29 15:12:04 +00:00
|
|
|
|
sta MLICALL.PARAMS+4
|
2016-09-22 15:46:01 +00:00
|
|
|
|
bcs .99 Offset out of range!
|
2016-08-29 15:12:04 +00:00
|
|
|
|
|
2016-09-22 15:46:01 +00:00
|
|
|
|
>MLICALL MLISETMARK
|
2016-08-29 15:12:04 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
|
2016-09-22 15:46:01 +00:00
|
|
|
|
.98 lda #SYSMGR.ERRSYN
|
|
|
|
|
.HS 2C bit abs
|
2016-08-29 15:12:04 +00:00
|
|
|
|
.99 lda #SYSMGR.ERRFTB
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2016-08-26 15:10:38 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.FSEEK.FROM .BS 1
|
|
|
|
|
K.FSEEK.OFFSET .BS 4
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* #FTellA
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* ##In:
|
2016-08-29 15:12:04 +00:00
|
|
|
|
* A = hFILE
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* ##Out:
|
2016-08-29 15:12:04 +00:00
|
|
|
|
* Y,A,X = Offset
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.FTellA jsr PFT.CheckFileA
|
|
|
|
|
K.FTellA.1 jsr FILE.SetupPrt1A
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>MLICALL MLIGETMARK
|
|
|
|
|
bcs .9
|
|
|
|
|
>LDYA MLICALL.PARAMS+2
|
|
|
|
|
ldx MLICALL.PARAMS+4
|
|
|
|
|
.9 rts
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #FEOFA
|
|
|
|
|
* ##In:
|
2016-08-29 15:12:04 +00:00
|
|
|
|
* A = hFILE
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* ##Out:
|
|
|
|
|
* CC :
|
|
|
|
|
* A=0 EOF
|
|
|
|
|
* A !=0 NOT EOF
|
|
|
|
|
* CS :
|
|
|
|
|
*\--------------------------------------
|
2016-09-29 15:30:15 +00:00
|
|
|
|
K.FEOFA jsr PFT.CheckFileA
|
2016-09-26 16:00:52 +00:00
|
|
|
|
jsr FILE.SetupPrt1A
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.FTELLA.1
|
2016-08-29 15:12:04 +00:00
|
|
|
|
bcs .9
|
2016-09-21 15:20:37 +00:00
|
|
|
|
>STYA K.FEOFA.MARK
|
|
|
|
|
stx K.FEOFA.MARK+2
|
2016-08-29 15:12:04 +00:00
|
|
|
|
|
|
|
|
|
>MLICALL MLIGETEOF
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
lda MLICALL.PARAMS+2
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sbc K.FEOFA.MARK
|
2016-08-29 15:12:04 +00:00
|
|
|
|
bne .8
|
|
|
|
|
lda MLICALL.PARAMS+3
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sbc K.FEOFA.MARK+1
|
2016-08-29 15:12:04 +00:00
|
|
|
|
bne .8
|
|
|
|
|
lda MLICALL.PARAMS+4
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sbc K.FEOFA.MARK+2
|
2016-08-29 15:12:04 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.FEOFA.MARK .BS 3
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* #RemoveYA
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.RemoveYA jsr PFT.CheckPathYA
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>STYA MLICALL.PARAMS+1
|
|
|
|
|
>MLICALL MLIDESTROY
|
|
|
|
|
rts
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* #Rename
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* Rename a file
|
|
|
|
|
* ##In :
|
|
|
|
|
* PUSHW = New Name
|
|
|
|
|
* PUSHW = Old Name
|
|
|
|
|
* ##Out :
|
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.Rename jsr PFT.CheckPathSTK
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+1
|
2016-09-21 15:20:37 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+3
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>MLICALL MLIRENAME
|
|
|
|
|
rts
|
2016-10-24 15:54:43 +00:00
|
|
|
|
*/--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* #Stat
|
2016-10-24 15:54:43 +00:00
|
|
|
|
* Return information about a file
|
|
|
|
|
* ##In :
|
|
|
|
|
* PUSHW = PTR to S.STAT buffer
|
|
|
|
|
* PUSHW = PTR to Filename (PSTR)
|
|
|
|
|
* ##Out :
|
|
|
|
|
*\--------------------------------------
|
2016-10-26 20:51:06 +00:00
|
|
|
|
K.Stat jsr PFT.CheckPathSTK
|
2016-09-21 15:20:37 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+1
|
|
|
|
|
>PULLW ZPQuickPtr2
|
|
|
|
|
>MLICALL MLIGETFILEINFO
|
|
|
|
|
bcs .9
|
2016-10-08 20:53:45 +00:00
|
|
|
|
jsr FILE.MLI2STAT
|
2016-09-26 16:00:52 +00:00
|
|
|
|
clc
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.9 rts
|
2016-09-20 16:00:51 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-26 16:00:52 +00:00
|
|
|
|
FILE.SetupPrt1A jsr K.GetMemPtrA
|
2016-08-29 15:12:04 +00:00
|
|
|
|
>STYA ZPQuickPtr1
|
|
|
|
|
ldy #S.FILE.PRODOS.REF
|
|
|
|
|
lda (ZPQuickPtr1),y
|
|
|
|
|
sta MLICALL.PARAMS+1
|
|
|
|
|
rts
|
2016-09-26 16:00:52 +00:00
|
|
|
|
*--------------------------------------
|
2016-10-08 20:53:45 +00:00
|
|
|
|
FILE.MLI2STAT
|
2016-09-26 16:00:52 +00:00
|
|
|
|
lda MLICALL.PARAMS+S.FILEINFO.ACCESS
|
|
|
|
|
cmp #S.FILEINFO.ACCESS.FULL
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
lda #S.STAT.MODE.XO+S.STAT.MODE.WO+S.STAT.MODE.RO
|
|
|
|
|
bra .2
|
|
|
|
|
|
|
|
|
|
.1 and #S.FILEINFO.ACCESS.R
|
|
|
|
|
beq .2
|
|
|
|
|
lda #S.STAT.MODE.XO+S.STAT.MODE.RO
|
|
|
|
|
|
|
|
|
|
.2 ldy #S.STAT.MODE
|
2016-10-03 06:18:46 +00:00
|
|
|
|
sta (ZPQuickPtr2),y
|
2016-09-26 16:00:52 +00:00
|
|
|
|
|
2016-10-03 06:18:46 +00:00
|
|
|
|
ldx #2
|
|
|
|
|
ldy #S.STAT.PRODOS.TYPE+2
|
|
|
|
|
|
|
|
|
|
.3 lda MLICALL.PARAMS+S.FILEINFO.TYPE,x
|
|
|
|
|
sta (ZPQuickPtr2),y
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .3
|
2016-09-26 16:00:52 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-08-26 15:10:38 +00:00
|
|
|
|
MAN
|
2016-09-02 06:09:44 +00:00
|
|
|
|
SAVE SYS/KERNEL.S.FILE
|
2016-08-26 15:10:38 +00:00
|
|
|
|
LOAD SYS/KERNEL.S
|
|
|
|
|
ASM
|