2015-03-14 21:48:35 +00:00
|
|
|
|
PR#3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2015-03-14 21:48:35 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* PUBLIC
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLICreateFile >PULLW MLICALL.PARAMS+1
|
2016-01-06 22:05:12 +00:00
|
|
|
|
>PULLB MLICALL.PARAMS+3 Access
|
|
|
|
|
>PULLB MLICALL.PARAMS+4 File type
|
|
|
|
|
>PULLW MLICALL.PARAMS+5 Aux type
|
2016-05-01 21:13:54 +00:00
|
|
|
|
lda #$01 Storage=Standard Files
|
2016-09-20 06:17:20 +00:00
|
|
|
|
sta MLICALL.PARAMS+7
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLICREATE
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLISetFileInfo
|
2016-05-01 21:13:54 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLISetFileInfo
|
2016-05-01 21:13:54 +00:00
|
|
|
|
>PULLW ZPQuickPtr1
|
|
|
|
|
>PULLW MLICALL.PARAMS+1
|
|
|
|
|
ldy #$E
|
|
|
|
|
.1 lda (ZPQuickPtr1),y
|
|
|
|
|
sta MLICALL.PARAMS+3,y
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
>MLICALL MLISETFILEINFO
|
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLIGetFileInfoYA
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
2016-06-07 06:10:18 +00:00
|
|
|
|
* Y,A = FileName
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* out :
|
|
|
|
|
* Y,A = PTR To Buffer (L=15)
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLIGetFileInfoYA
|
2015-03-14 21:48:35 +00:00
|
|
|
|
>STYA MLICALL.PARAMS+1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLIGETFILEINFO
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
>LDYAI MLICALL.PARAMS+3
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLIOnline
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
|
|
|
|
* PULLB = Device
|
|
|
|
|
* PULLW = Dest PTR
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLIOnline >PULLB MLICALL.PARAMS+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+2
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLIONLINE
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLIGetPrefixYA
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>STYA MLICALL.PARAMS+1
|
|
|
|
|
>MLICALL MLIGETPREFIX
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLIOpenYA
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
2016-06-07 06:10:18 +00:00
|
|
|
|
* YA = FileName
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* out :
|
|
|
|
|
* A = ref_num
|
|
|
|
|
* X = buf hMem
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLIOpenYA >STYA MLICALL.PARAMS+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
>PUSHWI 1024 get a ProDOS IO buffer
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>PUSHBI S.MEM.F.ALIGN+S.MEM.F.NOMOVE
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.GetMem
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bcs .99
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:48:35 +00:00
|
|
|
|
phx save Prodos Buffer hMem
|
|
|
|
|
>STYA MLICALL.PARAMS+3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLIOPEN
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bcs .98
|
|
|
|
|
lda MLICALL.PARAMS+5 get ref_num
|
|
|
|
|
plx get back Prodos Buffer hMem
|
|
|
|
|
rts CC
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.98 plx get back Prodos Buffer hMem
|
|
|
|
|
pha save MLI error
|
|
|
|
|
txa
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.FreeMemA discard Prodos Buffer
|
2015-03-14 21:48:35 +00:00
|
|
|
|
pla get back MLI error
|
|
|
|
|
sec
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLINewline
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
|
|
|
|
* PULLB = ref_num
|
|
|
|
|
* PULLB = Enable Mask
|
|
|
|
|
* PULLB = Newline Char
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLINewLine >PULLB MLICALL.PARAMS+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
>PULLB MLICALL.PARAMS+2
|
|
|
|
|
>PULLB MLICALL.PARAMS+3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLINEWLINE
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLIRead
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
|
|
|
|
* PULLB = ref_num
|
|
|
|
|
* PULLW = Dest PTR
|
|
|
|
|
* PULLW = Bytes To Read
|
|
|
|
|
* out :
|
|
|
|
|
* Y,A = Bytes Read
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLIRead >PULLB MLICALL.PARAMS+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+2
|
|
|
|
|
>PULLW MLICALL.PARAMS+4
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLIREAD
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
>LDYA MLICALL.PARAMS+6
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLIWrite
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
|
|
|
|
* PULLB = ref_num
|
2016-01-06 22:05:12 +00:00
|
|
|
|
* PULLW = Src PTR
|
|
|
|
|
* PULLW = Bytes To Write
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* out :
|
|
|
|
|
* Y,A = Bytes Written
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLIWrite >PULLB MLICALL.PARAMS+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
>PULLW MLICALL.PARAMS+2
|
|
|
|
|
>PULLW MLICALL.PARAMS+4
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLIWRITE
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
>LDYA MLICALL.PARAMS+6
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLICloseA
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
|
|
|
|
* A = ref_num
|
|
|
|
|
* out :
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLICloseA sta MLICALL.PARAMS+1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLICLOSE
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.MLIGetEOF
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* in :
|
|
|
|
|
* A = ref_num
|
|
|
|
|
* out :
|
|
|
|
|
* Y,A,X = EOF
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.MLIGetEOFA sta MLICALL.PARAMS+1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>MLICALL MLIGETEOF
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
>LDYA MLICALL.PARAMS+2
|
|
|
|
|
ldx MLICALL.PARAMS+4
|
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE SYS/KERNEL.S.MLI
|
|
|
|
|
LOAD SYS/KERNEL.S
|
|
|
|
|
ASM
|