mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-11 10:29:46 +00:00
Kernel version 0.8 : Shell : MLI API Calls Removed
This commit is contained in:
parent
f6e3d2e9b3
commit
906bf8322b
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -48,26 +48,25 @@ A2osX.SaveSX .EQ $101 Aux
|
||||
* Aux $200 -> 3FD : /RAM Driver
|
||||
* Aux $3FE -> 3FF : IRQ Vector
|
||||
*--------------------------------------
|
||||
UsrBuf256 .EQ $0200 Main
|
||||
*--------------------------------------
|
||||
* $12 bytes min !!!!
|
||||
*--------------------------------------
|
||||
MLICALL.PARAMS .EQ $0300
|
||||
UsrBuf256 .EQ $0200 Main
|
||||
*--------------------------------------
|
||||
*D.STACK.BASE .EQ $0300 $03EF...
|
||||
D.STACK.TOP .EQ $03F0 ...Down to $0300
|
||||
*--------------------------------------
|
||||
*** IRQ Handler ***
|
||||
*** $3F0-$3FF IRQ Handler.... ***
|
||||
*--------------------------------------
|
||||
* Main/Aux $400 -> $7FF : Console Screen
|
||||
* Main/Aux $800 -> $BFF : System Screen
|
||||
*--------------------------------------
|
||||
KrnBuf256 .EQ $0C00
|
||||
KrnBuf256 .EQ $0C00 Main
|
||||
*--------------------------------------
|
||||
MLICALL.PARAMS .EQ $0D00 Main, $12 bytes min !!!!
|
||||
KrnSTAT .EQ $0D12
|
||||
*--------------------------------------
|
||||
*** Z80 Reserved $0F00-10FF***
|
||||
*--------------------------------------
|
||||
Z80STACK .EQ $0FFF (0FFFFh) Down to $0F00
|
||||
Z80JMP .EQ $1000
|
||||
Z80JMP .EQ $1000 (00000h) Up To $10FF
|
||||
*--------------------------------------
|
||||
EvtMgr.Table .EQ $1100 K.EVT.MAX*S.EVT.SIZE=32*8=256b
|
||||
*--------------------------------------
|
||||
@ -176,17 +175,38 @@ SYS.SetEnv .EQ $3A
|
||||
SYS.GetEnvYA .EQ $3C
|
||||
SYS.UnsetEnvYA .EQ $3E
|
||||
*--------------------------------------
|
||||
SYS.MLICreateFile .EQ $40
|
||||
SYS.MLIGetFileInfoYA .EQ $50
|
||||
|
||||
SYS.MLIGetPrefixYA .EQ $5A
|
||||
*--------------------------------------
|
||||
|
||||
SYS.MLIOpenYA .EQ $5E
|
||||
*--------------------------------------
|
||||
SYS.FOPEN .EQ $60
|
||||
SYS.FOPEN.R .EQ $01 Open For Read
|
||||
SYS.FOPEN.W .EQ $02 Open For Write
|
||||
SYS.FOPEN.A .EQ $04 Append
|
||||
SYS.FOPEN.T .EQ $08 Open/Append in Text mode
|
||||
SYS.FOPEN.X .EQ $80 Create if not exists
|
||||
|
||||
SYS.MLINewLine .EQ $60
|
||||
SYS.MLIRead .EQ $62
|
||||
SYS.MLIWrite .EQ $64
|
||||
SYS.MLICloseA .EQ $66
|
||||
SYS.FCLOSEA .EQ $62
|
||||
SYS.FREAD .EQ $64
|
||||
SYS.FWRITE .EQ $66
|
||||
|
||||
SYS.FFLUSH .EQ $68
|
||||
SYS.FSEEK .EQ $6A
|
||||
SYS.FSEEK.SET .EQ $00
|
||||
SYS.FSEEK.CUR .EQ $01
|
||||
SYS.FSEEK.END .EQ $02
|
||||
SYS.FTELL .EQ $6C
|
||||
SYS.FEOF .EQ $6E
|
||||
|
||||
SYS.REMOVE .EQ $70
|
||||
SYS.RENAME .EQ $72
|
||||
SYS.STAT .EQ $74
|
||||
|
||||
|
||||
SYS.OPENDIRYA .EQ $78
|
||||
SYS.READDIRA .EQ $7A
|
||||
SYS.CLOSEDIRA .EQ $7C
|
||||
SYS.MKDIRYA .EQ $7E
|
||||
*--------------------------------------
|
||||
SYS.GetDevByIDA .EQ $80
|
||||
|
||||
@ -206,20 +226,13 @@ SYS.GetPSByIDA .EQ $98
|
||||
|
||||
SYS.Sleep .EQ $9C
|
||||
*--------------------------------------
|
||||
SYS.CheckPrefixYA .EQ $A0
|
||||
|
||||
SYS.FileSearch .EQ $A2
|
||||
SYS.GetFullPathYA .EQ $A4
|
||||
|
||||
SYS.LoadFile .EQ $A8
|
||||
SYS.SaveFile .EQ $AA
|
||||
*--------------------------------------
|
||||
SYS.AddNetCfg .EQ $B0
|
||||
SYS.SetNetCfg .EQ $B2
|
||||
SYS.GetNetCfgA .EQ $B4
|
||||
SYS.ClrNetCfgA .EQ $B6
|
||||
*--------------------------------------
|
||||
*SYS.ScreenSelectA .EQ $C0
|
||||
*--------------------------------------
|
||||
SYS.COutA .EQ $D0
|
||||
|
||||
SYS.PStrOutYA .EQ $D4
|
||||
@ -234,35 +247,6 @@ SYS.DecOutYA .EQ $DE
|
||||
*SYS.FPUTC .EQ $F4
|
||||
*SYS.FPUTS .EQ $F6
|
||||
*--------------------------------------
|
||||
SYS.FOPEN .EQ $E0
|
||||
SYS.FOPEN.R .EQ $01 Open For Read
|
||||
SYS.FOPEN.W .EQ $02 Open For Write
|
||||
SYS.FOPEN.A .EQ $04 Append
|
||||
SYS.FOPEN.T .EQ $08 Open/Append in Text mode
|
||||
SYS.FOPEN.X .EQ $80 Create if not exists
|
||||
|
||||
SYS.FCLOSEA .EQ $E2
|
||||
SYS.FREAD .EQ $E4
|
||||
SYS.FWRITE .EQ $E6
|
||||
|
||||
SYS.FFLUSH .EQ $E8
|
||||
SYS.FSEEK .EQ $EA
|
||||
SYS.FSEEK.SET .EQ $00
|
||||
SYS.FSEEK.CUR .EQ $01
|
||||
SYS.FSEEK.END .EQ $02
|
||||
SYS.FTELL .EQ $EC
|
||||
SYS.FEOF .EQ $EE
|
||||
|
||||
SYS.REMOVE .EQ $F0
|
||||
SYS.RENAME .EQ $F2
|
||||
SYS.STAT .EQ $F4
|
||||
SYS.FSTAT .EQ $F6
|
||||
|
||||
SYS.OPENDIRYA .EQ $F8
|
||||
SYS.READDIRA .EQ $FA
|
||||
SYS.CLOSEDIRA .EQ $FC
|
||||
SYS.MKDIRYA .EQ $FE
|
||||
*--------------------------------------
|
||||
* ProDOS ERROR CODES : $00->$5F
|
||||
* Lib ERROR CODES : $80->$BF
|
||||
* Kernel ERROR CODES : $C0->$FF
|
||||
@ -282,7 +266,7 @@ TSKMGR.ERRNSP .EQ $DD No Such Process Error
|
||||
*--------------------------------------
|
||||
SYSMGR.ERRSYN .EQ $CF Syntax Error
|
||||
SYSMGR.ERRENVF .EQ $CE Env is Full
|
||||
SYSMGR.ERRIDIR .EQ $CD Invalid Directory
|
||||
|
||||
SYSMGR.ERRFTB .EQ $CC File Too Big Error
|
||||
SYSMGR.ERRFNF .EQ $CB File Not Found Error
|
||||
*--------------------------------------
|
||||
|
@ -116,13 +116,12 @@ Cmd.Exec.EXT ldy #1
|
||||
|
||||
.3 stz UsrBuf256 reset UsrBuf256 for final CMDLINE
|
||||
|
||||
>LDYA L.CMD
|
||||
>SYSCALL SYS.MLIGetFileInfoYA
|
||||
>PUSHW L.STAT
|
||||
>PUSHW L.CMD
|
||||
>SYSCALL SYS.STAT
|
||||
bcs .99
|
||||
|
||||
>STYA ZPPtr2
|
||||
ldy #1 Get File Type
|
||||
lda (ZPPtr2),y
|
||||
lda STAT+S.STAT.TYPE
|
||||
cmp #$04 TXT File ?
|
||||
beq Cmd.Exec.EXT.TXT
|
||||
cmp #$06 BIN File ?
|
||||
@ -235,6 +234,7 @@ Cmd.Exec.CD1 lda ARGS+1
|
||||
.3 >PUSHW L.ARGS Append ARG to buffer
|
||||
>PUSHWI UsrBuf256
|
||||
>SYSCALL SYS.PStrCat
|
||||
bcs .9
|
||||
|
||||
ldx UsrBuf256
|
||||
lda #'/' Ending with '/'?
|
||||
@ -247,9 +247,17 @@ Cmd.Exec.CD1 lda ARGS+1
|
||||
|
||||
Cmd.Exec.CD.Change
|
||||
>STYA ZPPtr1
|
||||
>SYSCALL SYS.CheckPrefixYA
|
||||
|
||||
>PUSHW L.STAT
|
||||
>PUSHW ZPPtr1
|
||||
>SYSCALL SYS.STAT
|
||||
bcs .9
|
||||
|
||||
lda STAT+S.STAT.TYPE
|
||||
sec
|
||||
eor #$0F Directory ?
|
||||
bne .9
|
||||
|
||||
>LDYA ZPPtr1
|
||||
>SYSCALL SYS.NewPStrYA
|
||||
bcs .9
|
||||
|
@ -5,34 +5,23 @@ INC 1
|
||||
AUTO 6
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
TXT.OpenFileYA >SYSCALL SYS.MLIOpenYA
|
||||
TXT.OpenFileYA >PUSHWI 0 Aux type
|
||||
>PUSHBI 4 S.FILEINFO.TYPE.TXT
|
||||
>PUSHBI SYS.FOPEN.R+SYS.FOPEN.T
|
||||
|
||||
>SYSCALL SYS.FOPEN
|
||||
bcs .9
|
||||
|
||||
ldy #hInputFile
|
||||
sta (pData),y
|
||||
pha
|
||||
txa
|
||||
ldy #hInputBuffer
|
||||
sta (pData),y
|
||||
|
||||
>PUSHBI $0D Line separator for TXT file
|
||||
>PUSHBI $FF
|
||||
pla
|
||||
>PUSHA
|
||||
>SYSCALL SYS.MLINewLine
|
||||
bcc .9
|
||||
pha
|
||||
jsr TXT.CloseFile
|
||||
pla
|
||||
sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
TXT.ReadFile >PUSHWI 127
|
||||
>PUSHWI UsrBuf256+1
|
||||
TXT.ReadFile >PUSHWI UsrBuf256+1
|
||||
>PUSHWI 127
|
||||
ldy #hInputFile
|
||||
lda (pData),y
|
||||
>PUSHA
|
||||
>SYSCALL SYS.MLIRead
|
||||
>SYSCALL SYS.FREAD
|
||||
bcs .9
|
||||
|
||||
tya
|
||||
@ -79,18 +68,13 @@ TXT.CloseFile ldy #hInputArgs
|
||||
lda (pData),y
|
||||
beq .9
|
||||
|
||||
>SYSCALL SYS.MLICloseA
|
||||
ldy #hInputBuffer
|
||||
lda (pData),y
|
||||
>SYSCALL SYS.FreeMemA
|
||||
|
||||
>SYSCALL SYS.FCLOSEA
|
||||
|
||||
.9 lda #0
|
||||
ldy #hInputArgs
|
||||
sta (pData),y
|
||||
ldy #hInputFile
|
||||
sta (pData),y
|
||||
ldy #hInputBuffer
|
||||
sta (pData),y
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -44,6 +44,7 @@ L.ENV.PATH .DA ENV.PATH
|
||||
L.CMD .DA CMD
|
||||
L.ARGS .DA ARGS
|
||||
L.TIME .DA TIME
|
||||
L.STAT .DA STAT
|
||||
L.FMT.DATE .DA FMT.DATE
|
||||
L.FMT.TIME .DA FMT.TIME
|
||||
L.CMDS .DA CMDS
|
||||
@ -315,13 +316,9 @@ CS.QUIT jsr HIS.Quit
|
||||
ldy #hInputFile
|
||||
lda (pData),y
|
||||
beq .1
|
||||
>SYSCALL SYS.MLICloseA
|
||||
>SYSCALL SYS.FCLOSEA
|
||||
|
||||
.1 ldy #hInputBuffer
|
||||
lda (pData),y
|
||||
beq .8
|
||||
>SYSCALL SYS.FreeMemA
|
||||
|
||||
.1
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -444,7 +441,8 @@ EscChars >PSTRING "DBAC"
|
||||
EscAscii .HS 04080A0B15
|
||||
CMD .BS 256
|
||||
ARGS .BS 256
|
||||
TIME .BS S.Time
|
||||
TIME .BS S.TIME
|
||||
STAT .BS S.STAT
|
||||
hNEWPATH .BS 1
|
||||
hCmdLine .BS 1
|
||||
Cmd.Exec.Mode .BS 1
|
||||
@ -463,7 +461,6 @@ CmdHistory.IDX .BS 1
|
||||
CmdHistory.END .BS 1
|
||||
hInputFile .BS 1
|
||||
hInputArgs .BS 1
|
||||
hInputBuffer .BS 1
|
||||
DS.END
|
||||
.ED
|
||||
*--------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user