Kernel version 0.8 : Old MLI API decom in progress

This commit is contained in:
Rémy GIBERT 2016-09-26 08:18:51 +02:00
parent d4868fe152
commit 7984c2ba74
17 changed files with 179 additions and 194 deletions

Binary file not shown.

Binary file not shown.

View File

@ -271,7 +271,7 @@ DIR.MA jsr SRC.GetArg
.1 jsr FIO.ReadLine
bcs .99
lda TmpBuffer256
lda UsrBuf256
beq .1
cmp #'*' Comment?

View File

@ -160,12 +160,12 @@ FIO.ReadLine stz SRC.BufPtr
bmi .10
>PUSHWI 256
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
jsr FIO.ReadFromFile
bcs .19
lda #0 replace ending $0D with $00
sta TmpBuffer256,y
sta UsrBuf256,y
.19 rts
.10 >PUSHWI 3
@ -195,7 +195,7 @@ FIO.ReadLine stz SRC.BufPtr
.1 lda SRC.Buffer,y
bmi .2
sta TmpBuffer256,x
sta UsrBuf256,x
beq .8 Ending 00
inx
beq .99
@ -212,7 +212,7 @@ FIO.ReadLine stz SRC.BufPtr
beq .99
.3 pha
lda SRC.Buffer,y
sta TmpBuffer256,x
sta UsrBuf256,x
pla
inx
beq .99
@ -225,7 +225,7 @@ FIO.ReadLine stz SRC.BufPtr
.5 and #$3F Compute blank count
.6 pha
lda #$20
sta TmpBuffer256,x
sta UsrBuf256,x
pla
inx
beq .99

View File

@ -18,7 +18,7 @@ SRC.PrintLine ldy #ASM.MACRO.ON
lda (pData),y
bpl .9
.8 >PUSHWI TmpBuffer256
.8 >PUSHWI UsrBuf256
>PUSHW SRC.LINENUM
ldy #ASM.PC+1
>PUSHB (pData),y
@ -29,7 +29,7 @@ SRC.PrintLine ldy #ASM.MACRO.ON
.9 rts
*---------------------------------------
SRC.PrintLineErr ldx #0
.1 lda TmpBuffer256,x
.1 lda UsrBuf256,x
beq .2
phx
>SYSCALL SYS.COutA
@ -43,7 +43,7 @@ SRC.PrintLineErr ldx #0
bcs .9
ldx #0
.3 lda TmpBuffer256,x
.3 lda UsrBuf256,x
beq .5
inx
cpx SRC.BufPtr
@ -65,7 +65,7 @@ SRC.PrintLineErr ldx #0
>SYSCALL SYS.COutA
.9 rts
*---------------------------------------
SRC.ParseLine ldx TmpBuffer256
SRC.ParseLine ldx UsrBuf256
beq .1
cpx #'*' Comment?
@ -879,7 +879,7 @@ SRC.GetCharUC jsr SRC.GetChar
.9 rts
*---------------------------------------
SRC.GetChar ldx SRC.BufPtr
lda TmpBuffer256,x
lda UsrBuf256,x
beq .9
inc SRC.BufPtr if 255, will make Z
.9 rts

View File

@ -125,23 +125,35 @@ CS.RUN ldy #bCANCEL
.31 >LDYA ZPPtr1
>SYSCALL SYS.PStrOutYA
lda ZPPtr1
sec
adc (ZPPtr1)
sta ZPPtr1
bcc .4
inc ZPPtr1+1
ldy #S.STAT.TYPE
lda (ZPPtr2),y
cmp #$0F Directory ?
beq .32
.4 lda #13
pha
lda #'.'
>SYSCALL SYS.COutA
pla
jsr FileType2PSTR
>SYSCALL SYS.PStrOutYA
.32
lda #13
>SYSCALL SYS.COutA
.7 lda ZPPtr1
.7 lda ZPPtr2
clc
adc #S.STAT
sta ZPPtr1
bcc .3
inc ZPPtr1+1
bcs .3 Always
lda ZPPtr2+1
adc #0
sta ZPPtr1+1
bra .3
.8 pla
>SYSCALL SYS.FreeMemA
@ -202,22 +214,53 @@ CS.QUIT ldy #hDIR
clc
rts
*--------------------------------------
FileType2PSTR ldy #0
.1 cmp PRODOS.FT.HEX,y
beq .3
.2 iny
cpy #PRODOS.FT.TXT-PRODOS.FT.TXT
bne .1
pha
lsr
lsr
lsr
lsr
tax
lda HEXDIGIT,x
sta PRODOS.FT.DFLT+2
pla
and #$0F
tax
lda HEXDIGIT,x
sta PRODOS.FT.DFLT+3
.3 tya
asl
asl CC
adc L.PRODOS.FT.TXT
tay
lda L.PRODOS.FT.TXT+1
adc #0
rts
*--------------------------------------
CS.END
LIBSTR >PSTRING "libstr.o"
MSG.VOL >CSTRING "/%S\n"
MSG.DIR >CSTRING "/%15S <dir> %a %T %t %T %t\n"
MSG.FILE >CSTRING "%15S %S $%H %a %8L %T %t %T %t\n"
*--------------------------------------
PRODOS.FT.COUNT .HS 07
PRODOS.FT.ID .HS 0406FAFCFDE2FF
PRODOS.FT.TXT
T04 >PSTRING "TXT"
T06 >PSTRING "BIN"
TFA >PSTRING "S-C"
TFC >PSTRING "BAS"
TFD >PSTRING "VAR"
TE2 >PSTRING "ATK"
TFF >PSTRING "SYS"
PRODOS.FT.HEX .HS 0406FAFCFDE2FF
PRODOS.FT.TXT >PSTRING "TXT"
>PSTRING "BIN"
>PSTRING "S-C"
>PSTRING "BAS"
>PSTRING "VAR"
>PSTRING "ATK"
>PSTRING "SYS"
PRODOS.FT.DFLT >PSTRING "$ "
HEXDIGIT .AS '0123456789ABCDEF'
hLIBSTR .BS 1

View File

@ -48,7 +48,7 @@ A2osX.SaveSX .EQ $101 Aux
* Aux $200 -> 3FD : /RAM Driver
* Aux $3FE -> 3FF : IRQ Vector
*--------------------------------------
TmpBuffer256 .EQ $0200 Main
UsrBuf256 .EQ $0200 Main
*--------------------------------------
* $12 bytes min !!!!
*--------------------------------------
@ -62,7 +62,7 @@ D.STACK.TOP .EQ $03F0 ...Down to $0300
* Main/Aux $400 -> $7FF : Console Screen
* Main/Aux $800 -> $BFF : System Screen
*--------------------------------------
KrnBuffer256 .EQ $0C00
KrnBuf256 .EQ $0C00
*--------------------------------------
*** Z80 Reserved $0F00-10FF***
*--------------------------------------
@ -177,18 +177,7 @@ SYS.GetEnvYA .EQ $3C
SYS.UnsetEnvYA .EQ $3E
*--------------------------------------
SYS.MLICreateFile .EQ $40
SYS.MLISetFileInfo .EQ $4C
SYS.MLIGetFileInfoYA .EQ $50
SYS.MLIOnline .EQ $52
SYS.MLISetPrefixYA .EQ $56
SYS.MLIGetPrefixYA .EQ $5A
@ -198,21 +187,6 @@ SYS.MLINewLine .EQ $60
SYS.MLIRead .EQ $62
SYS.MLIWrite .EQ $64
SYS.MLICloseA .EQ $66
SYS.MLIFlushA .EQ $68
SYS.MLISetMark .EQ $6A
SYS.MLIGetMarkA .EQ $6A
SYS.MLISetEOF .EQ $6C
SYS.MLIGetEOFA .EQ $70
SYS.MLISetBuf .EQ $72
SYS.MLIGetBuf .EQ $74
SYS.MLIAllocIRQ .EQ $78
SYS.MLIDeallocIRQ .EQ $7A
SYS.MLIReadBlock .EQ $7C
SYS.MLIWriteBlock .EQ $7E
*--------------------------------------
SYS.GetDevByIDA .EQ $80

View File

@ -354,13 +354,13 @@ GetDHCPOption cmp #S.DHCP.OPTIONS.MASK
.4 iny
inx
lda (ZPFramePtr),y
sta TmpBuffer256,x
sta UsrBuf256,x
bne .4
ldy #S.IPCFG.DOMAIN-1
ldx #$FF
.5 iny
inx
lda TmpBuffer256,x
lda UsrBuf256,x
sta IPCFG,y
bne .5
@ -371,14 +371,14 @@ GetDHCPOption.CopyIP
ldy #2
ldx #0
.1 lda (ZPFramePtr),y
sta TmpBuffer256,x
sta UsrBuf256,x
iny
inx
cpx #4
bne .1
ply
ldx #0
.2 lda TmpBuffer256,x
.2 lda UsrBuf256,x
sta IPCFG,y
iny
inx

View File

@ -114,7 +114,7 @@ Cmd.Exec.EXT ldy #1
pla
>SYSCALL SYS.FreeMemA Discard this string...
.3 stz TmpBuffer256 reset TmpBuffer256 for final CMDLINE
.3 stz UsrBuf256 reset UsrBuf256 for final CMDLINE
>LDYA L.CMD
>SYSCALL SYS.MLIGetFileInfoYA
@ -142,34 +142,34 @@ Cmd.Exec.EXT.TXT
lda #0 Get arg[0] = /PATH/SHELL
>SYSCALL SYS.GetArgA
>PUSHYA
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
>SYSCALL SYS.PStrCpy
inc TmpBuffer256 Add a space....
ldy TmpBuffer256
inc UsrBuf256 Add a space....
ldy UsrBuf256
lda #' '
sta TmpBuffer256,y
sta UsrBuf256,y
*--------------------------------------
* BIN : Launch "/PATH/CMD ARGS"
*--------------------------------------
Cmd.Exec.EXT.BIN
>PUSHW L.CMD
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
>SYSCALL SYS.PStrCat
lda ARGS
beq .1
inc TmpBuffer256 Add a space....
ldy TmpBuffer256
inc UsrBuf256 Add a space....
ldy UsrBuf256
lda #' '
sta TmpBuffer256,y
sta UsrBuf256,y
>PUSHW L.ARGS
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
>SYSCALL SYS.PStrCat
.1 >LDYAI TmpBuffer256
.1 >LDYAI UsrBuf256
bit Cmd.Exec.Mode
bmi .2 startproc
@ -203,7 +203,7 @@ Cmd.Exec.CD1 lda ARGS+1
lda (pPs),y
>SYSCALL SYS.GetMemPtrA
>PUSHYA
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
>SYSCALL SYS.PStrCpy
lda ARGS+1
@ -214,18 +214,18 @@ Cmd.Exec.CD1 lda ARGS+1
bne .9
ldy TmpBuffer256 remove last dir component in actual prefix
ldy UsrBuf256 remove last dir component in actual prefix
.2 dey
beq .9 nothing to remove, synerr
lda TmpBuffer256,y
lda UsrBuf256,y
cmp #'/'
bne .2
sty TmpBuffer256
sty UsrBuf256
>LDYAI TmpBuffer256
>LDYAI UsrBuf256
bra Cmd.Exec.CD.Change
.9 lda #SYSMGR.ERRSYN
@ -233,17 +233,17 @@ Cmd.Exec.CD1 lda ARGS+1
rts
.3 >PUSHW L.ARGS Append ARG to buffer
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
>SYSCALL SYS.PStrCat
ldx TmpBuffer256
ldx UsrBuf256
lda #'/' Ending with '/'?
cmp TmpBuffer256,x
cmp UsrBuf256,x
beq .4
sta TmpBuffer256+1,x
inc TmpBuffer256
sta UsrBuf256+1,x
inc UsrBuf256
.4 >LDYAI TmpBuffer256
.4 >LDYAI UsrBuf256
Cmd.Exec.CD.Change
>STYA ZPPtr1
@ -368,12 +368,12 @@ Cmd.Exec.SETVAR tax
Cmd.Exec.DATE >LDYA L.TIME
>SYSCALL SYS.TimeYA
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
>PUSHW L.FMT.DATE
>PUSHW L.TIME
>SYSCALL SYS.StrFTime
>LDYAI TmpBuffer256
>LDYAI UsrBuf256
>SYSCALL SYS.PStrOutYA
bcs .9
@ -384,13 +384,13 @@ Cmd.Exec.DATE >LDYA L.TIME
Cmd.Exec.TIME >LDYA L.TIME
>SYSCALL SYS.TimeYA
>PUSHWI TmpBuffer256
>PUSHWI UsrBuf256
>PUSHW L.FMT.TIME
>PUSHW L.TIME
>SYSCALL SYS.StrFTime
>LDYAI TmpBuffer256
>LDYAI UsrBuf256
>SYSCALL SYS.PStrOutYA
bcs .9

View File

@ -88,7 +88,7 @@ HIS.Add ldy #hCmdHistory
bpl .4
.9 rts
*--------------------------------------
HIK.GetPrev ldy #hCmdHistory
HIS.GetPrev ldy #hCmdHistory
lda (pData),y
beq HISTORY.RTS
@ -121,10 +121,10 @@ HIK.GetPrev ldy #hCmdHistory
.2 txa
ldy #CmdHistory.IDX set new index
sta (pData),y
bra HIK.SetBuf
bra HIS.SetBuf
History.RTS rts
*--------------------------------------
HIK.GetNext ldy #hCmdHistory
HIS.GetNext ldy #hCmdHistory
lda (pData),y
beq HISTORY.RTS
@ -153,10 +153,10 @@ HIK.GetNext ldy #hCmdHistory
ldy #CmdHistory.END
cmp (pData),y
bne HIK.SetBuf
bne HIS.SetBuf
jmp CmdBuffer.CLR end of history, just blank buffer
*--------------------------------------
HIK.SetBuf jsr CmdBuffer.CLR
HIS.SetBuf jsr CmdBuffer.CLR
ldy #CmdHistory.IDX
lda (pData),y

View File

@ -28,7 +28,7 @@ TXT.OpenFileYA >SYSCALL SYS.MLIOpenYA
.9 rts
*--------------------------------------
TXT.ReadFile >PUSHWI 127
>PUSHWI TmpBuffer256+1
>PUSHWI UsrBuf256+1
ldy #hInputFile
lda (pData),y
>PUSHA
@ -38,7 +38,7 @@ TXT.ReadFile >PUSHWI 127
tya
beq .10
lda TmpBuffer256,y Y,A=Bytes read
lda UsrBuf256,y Y,A=Bytes read
cmp #$0D
bne .10
@ -48,7 +48,7 @@ TXT.ReadFile >PUSHWI 127
sta (pData)
beq .2
.1 lda TmpBuffer256,y
.1 lda UsrBuf256,y
sta (pData),y
dey
bne .1

View File

@ -410,12 +410,15 @@ K.READDIRA.ADD. lda #1
jsr K.READDIRA.ClrStat
lda #$0F
sta KrnBuf256+S.STAT.TYPE
ldy #$25 total_blocks
lda (ZPQuickPtr3),y
sta KrnBuffer256+S.STAT.BLOCKS
sta KrnBuf256+S.STAT.BLOCKS
iny
lda (ZPQuickPtr3),y
sta KrnBuffer256+S.STAT.BLOCKS+1
sta KrnBuf256+S.STAT.BLOCKS+1
bra K.READDIRA.ADDSTAT
*--------------------------------------
@ -428,12 +431,18 @@ K.READDIRA.ADD..
jsr K.READDIRA.ClrStat
lda #$0F
sta KrnBuf256+S.STAT.TYPE
bra K.READDIRA.ADDSTAT
*--------------------------------------
K.READDIRA.ADDD jsr K.READDIRA.AddFNToBuf
jsr K.READDIRA.ClrStat
lda #$0F
sta KrnBuf256+S.STAT.TYPE
bra K.READDIRA.ADDSTAT
*--------------------------------------
K.READDIRA.ADDF jsr K.READDIRA.AddFNToBuf
@ -442,20 +451,20 @@ K.READDIRA.ADDF jsr K.READDIRA.AddFNToBuf
ldy #$10 type
lda (ZPQuickPtr3),y
sta KrnBuffer256+S.STAT.TYPE
sta KrnBuf256+S.STAT.TYPE
ldy #$1F auxtype
lda (ZPQuickPtr3),y
sta KrnBuffer256+S.STAT.AUXTYPE
sta KrnBuf256+S.STAT.AUXTYPE
iny
lda (ZPQuickPtr3),y
sta KrnBuffer256+S.STAT.AUXTYPE+1
sta KrnBuf256+S.STAT.AUXTYPE+1
*--------------------------------------
K.READDIRA.AddStat
ldy #S.STAT-1
.1 lda KrnBuffer256,y
.1 lda KrnBuf256,y
sta (ZPQuickPtr4),y
dey
bpl .1
@ -471,7 +480,7 @@ K.READDIRA.AddStat
K.READDIRA.ClrStat
ldx #S.STAT-1
.1 stz KrnBuffer256,x
.1 stz KrnBuf256,x
dey
bpl .1
rts

View File

@ -9,11 +9,11 @@ K.ExpandPStrYA.NEW
>STYA ZPQuickPtr3
lda (ZPQuickPtr3)
sta KrnBuffer256
sta KrnBuf256
tay
.1 lda (ZPQuickPtr3),y
sta KrnBuffer256,y
sta KrnBuf256,y
dey
bne .1
@ -22,11 +22,11 @@ K.ExpandPStrYA.NEW
.2 stz K.ExpandPStr.Start
.3 tya
cmp KrnBuffer256 End of PSTR?
cmp KrnBuf256 End of PSTR?
beq .80
iny
lda KrnBuffer256,y
lda KrnBuf256,y
.80
@ -42,7 +42,7 @@ K.ExpandPStrYA.NEW
K.ExpandPStrYA
>STYA ZPQuickPtr3
stz KrnBuffer256 init Expanded String len=0
stz KrnBuf256 init Expanded String len=0
ldy #0
@ -61,9 +61,9 @@ K.ExpandPStrYA
cmp #'$' no, found one ?
beq .2
inc KrnBuffer256 no, copy char
ldx KrnBuffer256
sta KrnBuffer256,x
inc KrnBuf256 no, copy char
ldx KrnBuf256
sta KrnBuf256,x
bra .1
.2 sty K.ExpandPStr.Start save var start
@ -95,7 +95,7 @@ K.ExpandPStrYA
jsr K.ExpandPStr.AV yes, expand and add to STR
.7 >LDYAI KrnBuffer256
.7 >LDYAI KrnBuf256
jsr K.NewPStrYA
rts
*--------------------------------------
@ -103,12 +103,12 @@ K.ExpandPStr.AV lda K.ExpandPStr.End
sec
sbc K.ExpandPStr.Start compute len of VAR End-Start+1
ldx KrnBuffer256
ldx KrnBuf256
inx
sta KrnBuffer256,x
sta KrnBuf256,x
stx ZPQuickPtr2
lda /KrnBuffer256
lda /KrnBuf256
sta ZPQuickPtr2+1
ldy K.ExpandPStr.Start
@ -116,7 +116,7 @@ K.ExpandPStr.AV lda K.ExpandPStr.End
.1 iny
inx
lda (ZPQuickPtr3),y
sta KrnBuffer256,x
sta KrnBuf256,x
cpy K.ExpandPStr.End
bne .1
@ -131,17 +131,17 @@ K.ExpandPStr.AV lda K.ExpandPStr.End
jsr S.NextEnvPtr1 Skip NAME
.11 ldy #0
ldx KrnBuffer256
ldx KrnBuf256
.2 iny
lda (ZPQuickPtr1),y
inx
sta KrnBuffer256,x
sta KrnBuf256,x
tya
cmp (ZPQuickPtr1) last char?
bne .2
stx KrnBuffer256
stx KrnBuf256
.9 rts
*--------------------------------------
@ -171,48 +171,48 @@ K.ExpandPStr.End .BS 1
K.PutEnvYA >STYA ZPQuickPtr2 NAME=VALUE
lda (ZPQuickPtr2)
beq .9
sta KrnBuffer256
sta KrnBuf256
tay
.1 lda (ZPQuickPtr2),y
sta KrnBuffer256,y
sta KrnBuf256,y
dey
bne .1
ldy #0
.2 iny
cpy KrnBuffer256 last char ?
cpy KrnBuf256 last char ?
beq .9 no "=" found
lda KrnBuffer256,y
lda KrnBuf256,y
cmp #'='
bne .2
cpy #1 String like "=value" ?
beq .9
cpy KrnBuffer256 last char ?
cpy KrnBuf256 last char ?
beq .9 we have "VAR="
lda KrnBuffer256 save actual string len
lda KrnBuf256 save actual string len
sty KrnBuffer256 set length of VAR string
dec KrnBuffer256 ...without "="
sty KrnBuf256 set length of VAR string
dec KrnBuf256 ...without "="
.3 clc Substract VAR len+1 from whole len to get
sbc KrnBuffer256 VALUE len
sta KrnBuffer256,y save it at "=" POS
sbc KrnBuf256 VALUE len
sta KrnBuf256,y save it at "=" POS
tya
clc
adc #KrnBuffer256
adc #KrnBuf256
sta ZPQuickPtr3
lda /KrnBuffer256
lda /KrnBuf256
sta ZPQuickPtr3+1
>LDYAI KrnBuffer256
>LDYAI KrnBuf256
>STYA ZPQuickPtr2
bra K.SetEnvPtr2Ptr3

View File

@ -47,7 +47,7 @@ K.FileSearch >PULLW ZPQuickPtr4 ZPQuickPtr1 trashed by ExpandPStrYA
stz K.FileSearch.Index
.1 stz KrnBuffer256 reset String
.1 stz KrnBuf256 reset String
ldx #0
ldy K.FileSearch.Index
@ -60,7 +60,7 @@ K.FileSearch >PULLW ZPQuickPtr4 ZPQuickPtr1 trashed by ExpandPStrYA
cmp #';'
beq .3
inx
sta KrnBuffer256,x
sta KrnBuf256,x
bra .2
.3 txa
@ -73,20 +73,20 @@ K.FileSearch >PULLW ZPQuickPtr4 ZPQuickPtr1 trashed by ExpandPStrYA
.4 iny
lda (ZPQuickPtr4),y Append Fiename...
inx
sta KrnBuffer256,x
sta KrnBuf256,x
tya
cmp (ZPQuickPtr4)
bne .4
stx KrnBuffer256 set string length
stx KrnBuf256 set string length
>LDYAI KrnBuffer256
>LDYAI KrnBuf256
jsr K.MLIGetFileInfoYA
bcs .1 Failed...retry next path...
lda K.FileSearch.hSrch Discard Expanded hSrch list
jsr K.FreeMemA
>LDYAI KrnBuffer256
>LDYAI KrnBuf256
jmp K.NewPStrYA
.98 lda K.FileSearch.hSrch Discard Expanded hSrch list
@ -110,7 +110,7 @@ K.GetFullPathYA >STYA ZPQuickPtr3 Ptr1 & 2 used by StrCpy
lda (ZPQuickPtr3)
beq .9
stz KrnBuffer256
stz KrnBuf256
ldy #1
lda (ZPQuickPtr3),y
@ -121,14 +121,14 @@ K.GetFullPathYA >STYA ZPQuickPtr3 Ptr1 & 2 used by StrCpy
lda (pPs),y
jsr K.GetMemPtrA
>PUSHYA
>PUSHWI KrnBuffer256
>PUSHWI KrnBuf256
jsr K.PStrCpy
.1 >PUSHW ZPQuickPtr3
>PUSHWI KrnBuffer256
>PUSHWI KrnBuf256
jsr K.PStrCat
>LDYAI KrnBuffer256
>LDYAI KrnBuf256
jmp K.NewPStrYA
.9 sec
rts

View File

@ -444,11 +444,12 @@ K.TskMgrInit stz TSKMGR.LASTID
ldy #S.PS.hENV
sta (pPs),y
>LDYAI TmpBuffer256
>SYSCALL SYS.MLIGetPrefixYA
>LDYAI UsrBuf256
>STYA MLICALL.PARAMS+1
>MLICALL MLIGETPREFIX
bcs .9
>LDYAI TmpBuffer256
>LDYAI UsrBuf256
>SYSCALL SYS.NewPStrYA
bcs .9
@ -456,7 +457,7 @@ K.TskMgrInit stz TSKMGR.LASTID
ldy #S.PS.hPREFIX
sta (pPs),y
>PUSHWI TmpBuffer256 push ENV value
>PUSHWI UsrBuf256 push ENV value
>PUSHWI I.ENV.A2osX push ENV name
>SYSCALL SYS.SetEnv
bcs .9

View File

@ -49,15 +49,15 @@ KERNEL.SYSCALL .DA K.GetMem $00
.DA 0
.DA 0
.DA 0
.DA K.MLISetFileInfo
.DA 0
.DA 0
*--------------------------------------
.DA K.MLIGetFileInfoYA $50
.DA K.MLIOnline
.DA 0
.DA 0
.DA 0
.DA K.MLIGetPrefixYA
.DA 0
.DA 0
.DA 0
.DA K.MLIOpenYA
*--------------------------------------
@ -70,7 +70,7 @@ KERNEL.SYSCALL .DA K.GetMem $00
.DA 0
.DA 0
*--------------------------------------
.DA K.MLIGetEOFA $70
.DA 0 $70
.DA 0
.DA 0
.DA 0

View File

@ -16,19 +16,6 @@ K.MLICreateFile >PULLW MLICALL.PARAMS+1
>MLICALL MLICREATE
rts
*--------------------------------------
* K.MLISetFileInfo
*--------------------------------------
K.MLISetFileInfo
>PULLW ZPQuickPtr1
>PULLW MLICALL.PARAMS+1
ldy #$E
.1 lda (ZPQuickPtr1),y
sta MLICALL.PARAMS+3,y
dey
bpl .1
>MLICALL MLISETFILEINFO
rts
*--------------------------------------
* K.MLIGetFileInfoYA
* in :
* Y,A = FileName
@ -42,21 +29,6 @@ K.MLIGetFileInfoYA
>LDYAI MLICALL.PARAMS+3
.9 rts
*--------------------------------------
* K.MLIOnline
* in :
* PULLB = Device
* PULLW = Dest PTR
*--------------------------------------
K.MLIOnline >PULLB MLICALL.PARAMS+1
>PULLW MLICALL.PARAMS+2
>MLICALL MLIONLINE
rts
*--------------------------------------
K.MLIGetPrefixYA
>STYA MLICALL.PARAMS+1
>MLICALL MLIGETPREFIX
rts
*--------------------------------------
* K.MLIOpenYA
* in :
* YA = FileName
@ -139,20 +111,6 @@ K.MLICloseA sta MLICALL.PARAMS+1
>MLICALL MLICLOSE
rts
*--------------------------------------
* K.MLIGetEOF
* in :
* A = ref_num
* out :
* Y,A,X = EOF
*--------------------------------------
K.MLIGetEOFA sta MLICALL.PARAMS+1
>MLICALL MLIGETEOF
bcs .9
>LDYA MLICALL.PARAMS+2
ldx MLICALL.PARAMS+4
clc
.9 rts
*--------------------------------------
MAN
SAVE SYS/KERNEL.S.MLI
LOAD SYS/KERNEL.S