mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-27 02:32:51 +00:00
Kernel 0.9.2
This commit is contained in:
parent
fd1b887584
commit
8f59dca003
Binary file not shown.
Binary file not shown.
@ -10,8 +10,8 @@ AUTO 4,1
|
|||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/MONITOR.I
|
.INB INC/MONITOR.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
TmpPtr1 .EQ $0 main & aux ZP
|
TmpPtr1 .EQ $0 main & aux ZP
|
||||||
TmpPtr2 .EQ $2 main & aux ZP
|
TmpPtr2 .EQ $2 main & aux ZP
|
||||||
|
@ -59,7 +59,7 @@ FIO.LOAD.ASM.T >STYA ZPPtr2
|
|||||||
|
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 6 S.FI.T.BIN
|
>PUSHBI 6 S.FI.T.BIN
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>LDYA L.ASM.T.FILENAME
|
>LDYA L.ASM.T.FILENAME
|
||||||
>SYSCALL LoadFile
|
>SYSCALL LoadFile
|
||||||
bcs .9
|
bcs .9
|
||||||
@ -129,7 +129,7 @@ FIO.OpenFile >STYA ZPPtr1
|
|||||||
|
|
||||||
>PUSHWI 0
|
>PUSHWI 0
|
||||||
>PUSHBI 4
|
>PUSHBI 4
|
||||||
>PUSHBI SYS.FOpen.R+SYS.FOpen.T
|
>PUSHBI O.RDONLY+O.TEXT
|
||||||
bra .3
|
bra .3
|
||||||
|
|
||||||
.2 cmp #$FA S-C/BAS?
|
.2 cmp #$FA S-C/BAS?
|
||||||
@ -137,7 +137,7 @@ FIO.OpenFile >STYA ZPPtr1
|
|||||||
|
|
||||||
>PUSHWI 0
|
>PUSHWI 0
|
||||||
>PUSHBI $FA
|
>PUSHBI $FA
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
|
|
||||||
.3 >LDYA ZPPtr1
|
.3 >LDYA ZPPtr1
|
||||||
>SYSCALL FOpen
|
>SYSCALL FOpen
|
||||||
|
@ -8,8 +8,8 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/APPLETALK.I
|
.INB INC/APPLETALK.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPTR1 .EQ ZPBIN
|
ZPPTR1 .EQ ZPBIN
|
||||||
|
@ -8,8 +8,8 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/APPLETALK.I
|
.INB INC/APPLETALK.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPTR1 .EQ ZPBIN
|
ZPPTR1 .EQ ZPBIN
|
||||||
|
@ -8,7 +8,8 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.I
|
||||||
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPTR1 .EQ ZPBIN
|
ZPPTR1 .EQ ZPBIN
|
||||||
ZPBufPtr .EQ ZPBIN+2
|
ZPBufPtr .EQ ZPBIN+2
|
||||||
@ -19,7 +20,8 @@ CS.START cld
|
|||||||
jmp (.1,x)
|
jmp (.1,x)
|
||||||
.DA #$61 6502,Level 1 (65c02)
|
.DA #$61 6502,Level 1 (65c02)
|
||||||
.DA #1 BIN Layout Version 1
|
.DA #1 BIN Layout Version 1
|
||||||
.DA 0
|
.DA #S.PS.F.EVENT S.PS.F
|
||||||
|
.DA #0
|
||||||
.DA CS.END-CS.START CS
|
.DA CS.END-CS.START CS
|
||||||
.DA DS.END-DS.START DS
|
.DA DS.END-DS.START DS
|
||||||
.DA #16 SS
|
.DA #16 SS
|
||||||
@ -84,10 +86,6 @@ CS.INIT
|
|||||||
>STYA ZPBufPtr
|
>STYA ZPBufPtr
|
||||||
txa
|
txa
|
||||||
>STA.G hBuf
|
>STA.G hBuf
|
||||||
.8
|
|
||||||
* lda (pPs)
|
|
||||||
* ora #S.PS.F.EVENT Now accept events
|
|
||||||
* sta (pPs)
|
|
||||||
|
|
||||||
clc
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
@ -253,8 +251,8 @@ CS.RUN.OPEN >SYSCALL RealPath
|
|||||||
pha
|
pha
|
||||||
|
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 4 S.FI.T.TXT
|
>PUSHBI S.FI.T.TXT
|
||||||
>PUSHBI SYS.FOpen.R+SYS.FOpen.T
|
>PUSHBI O.RDONLY+O.TEXT
|
||||||
|
|
||||||
pla
|
pla
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
X.COPY.TO.DEST .EQ 0
|
X.COPY.TO.DEST .EQ 0
|
||||||
X.DELETE.SOURCE .EQ 0
|
X.DELETE.SOURCE .EQ 0
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
X.COPY.TO.DEST .EQ 1
|
X.COPY.TO.DEST .EQ 1
|
||||||
X.DELETE.SOURCE .EQ 0
|
X.DELETE.SOURCE .EQ 0
|
||||||
|
@ -334,8 +334,8 @@ CharIn.Esc ldy #bEscMode
|
|||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
LoadFile >PUSHWI 0 Aux type
|
LoadFile >PUSHWI 0 Aux type
|
||||||
>PUSHBI 4 S.FI.T.TXT
|
>PUSHBI S.FI.T.TXT
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>LDA.G hFileName
|
>LDA.G hFileName
|
||||||
|
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
@ -403,8 +403,8 @@ LoadFile >PUSHWI 0 Aux type
|
|||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SaveFile >PUSHWI 0 Aux type
|
SaveFile >PUSHWI 0 Aux type
|
||||||
>PUSHBI 4 S.FI.T.TXT
|
>PUSHBI S.FI.T.TXT
|
||||||
>PUSHBI SYS.FOpen.X+SYS.FOpen.W
|
>PUSHBI O.CREATE+O.WRONLY
|
||||||
>LDA.G hFileName
|
>LDA.G hFileName
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
X.COPY.TO.DEST .EQ 0
|
X.COPY.TO.DEST .EQ 0
|
||||||
X.DELETE.SOURCE .EQ 0
|
X.DELETE.SOURCE .EQ 0
|
||||||
|
@ -7,7 +7,7 @@ AUTO 4,1
|
|||||||
.TF BIN/LSDEV
|
.TF BIN/LSDEV
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPTR1 .EQ ZPBIN
|
ZPPTR1 .EQ ZPBIN
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/LIBCRYPT.I
|
.INB INC/LIBCRYPT.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
FILEBUF.SIZE .EQ 4096
|
FILEBUF.SIZE .EQ 4096
|
||||||
@ -128,7 +128,7 @@ CS.RUN.FILE >LDA.G Arg
|
|||||||
|
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 0
|
>PUSHBI 0
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
|
|
||||||
>LDA.G hFullPath
|
>LDA.G hFullPath
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
X.COPY.TO.DEST .EQ 1
|
X.COPY.TO.DEST .EQ 1
|
||||||
X.DELETE.SOURCE .EQ 1
|
X.DELETE.SOURCE .EQ 1
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPtr1 .EQ ZPBIN
|
ZPPtr1 .EQ ZPBIN
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
X.COPY.TO.DEST .EQ 0
|
X.COPY.TO.DEST .EQ 0
|
||||||
X.DELETE.SOURCE .EQ 1
|
X.DELETE.SOURCE .EQ 1
|
||||||
|
@ -551,7 +551,7 @@ CS.RUN.Rename ldy #hDstFullPath
|
|||||||
|
|
||||||
CS.RUN.CopyStart
|
CS.RUN.CopyStart
|
||||||
ldy #hSrcFullPath
|
ldy #hSrcFullPath
|
||||||
lda #SYS.FOpen.R
|
lda #O.RDONLY
|
||||||
|
|
||||||
jsr CS.RUN.Open
|
jsr CS.RUN.Open
|
||||||
bcs .99
|
bcs .99
|
||||||
@ -559,7 +559,7 @@ CS.RUN.CopyStart
|
|||||||
>STA.G hSrcFile
|
>STA.G hSrcFile
|
||||||
|
|
||||||
ldy #hDstFullPath
|
ldy #hDstFullPath
|
||||||
lda #SYS.FOpen.W+SYS.FOpen.X
|
lda #O.WRONLY+O.CREATE
|
||||||
|
|
||||||
jsr CS.RUN.Open
|
jsr CS.RUN.Open
|
||||||
bcs .9
|
bcs .9
|
||||||
|
@ -107,7 +107,7 @@ CS.INIT.RTS rts
|
|||||||
CS.INIT.OPENINPUT
|
CS.INIT.OPENINPUT
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 0 Type
|
>PUSHBI 0 Type
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>LDYA ZPPtr1
|
>LDYA ZPPtr1
|
||||||
>SYSCALL LoadFile
|
>SYSCALL LoadFile
|
||||||
bcs CS.INIT.RTS
|
bcs CS.INIT.RTS
|
||||||
@ -183,7 +183,7 @@ CS.INIT.OPENINPUT
|
|||||||
CS.INIT.CREATEOUTPUT
|
CS.INIT.CREATEOUTPUT
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI $CB PIX Type
|
>PUSHBI $CB PIX Type
|
||||||
>PUSHBI SYS.FOpen.W+SYS.FOpen.X
|
>PUSHBI O.WRONLY+O.CREATE
|
||||||
>LDYA ZPPtr1
|
>LDYA ZPPtr1
|
||||||
>SYSCALL FOpen
|
>SYSCALL FOpen
|
||||||
bcs .9
|
bcs .9
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/NET.TELNET.I
|
.INB INC/NET.TELNET.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/GFX.I
|
.INB INC/GFX.I
|
||||||
.INB INC/GFX.EVE.I
|
.INB INC/GFX.EVE.I
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/NIC.I
|
.INB INC/NIC.I
|
||||||
.INB INC/NIC.91C96.I
|
.INB INC/NIC.91C96.I
|
||||||
.INB INC/ETH.I
|
.INB INC/ETH.I
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/XY.MOUSE.I
|
.INB INC/XY.MOUSE.I
|
||||||
.INB INC/LIBGUI.I
|
.INB INC/LIBGUI.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPTmpPtr1 .EQ ZPDRV
|
ZPTmpPtr1 .EQ ZPDRV
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -7,7 +7,7 @@ SSCIRQ .EQ 0
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/COM.I
|
.INB INC/COM.I
|
||||||
.INB INC/COM.6551.I
|
.INB INC/COM.6551.I
|
||||||
.INB /A2OSX.SRC/DRV/X.SSC.DRV.S
|
.INB /A2OSX.SRC/DRV/X.SSC.DRV.S
|
||||||
|
@ -7,7 +7,7 @@ SSCIRQ .EQ 1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/COM.I
|
.INB INC/COM.I
|
||||||
.INB INC/COM.6551.I
|
.INB INC/COM.6551.I
|
||||||
.INB /A2OSX.SRC/DRV/X.SSC.DRV.S
|
.INB /A2OSX.SRC/DRV/X.SSC.DRV.S
|
||||||
|
@ -7,7 +7,7 @@ U2AI .EQ 1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/NIC.I
|
.INB INC/NIC.I
|
||||||
.INB INC/NIC.W5100.I
|
.INB INC/NIC.W5100.I
|
||||||
.INB INC/ETH.I
|
.INB INC/ETH.I
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/NIC.I
|
.INB INC/NIC.I
|
||||||
.INB INC/NIC.8900A.I
|
.INB INC/NIC.8900A.I
|
||||||
.INB INC/ETH.I
|
.INB INC/ETH.I
|
||||||
|
@ -7,7 +7,7 @@ U2AI .EQ 0
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/NIC.I
|
.INB INC/NIC.I
|
||||||
.INB INC/NIC.W5100.I
|
.INB INC/NIC.W5100.I
|
||||||
.INB INC/ETH.I
|
.INB INC/ETH.I
|
||||||
|
@ -110,7 +110,7 @@ CS.INIT.RTS rts
|
|||||||
CS.INIT.OPENINPUT
|
CS.INIT.OPENINPUT
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 0 Type
|
>PUSHBI 0 Type
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>LDYA ZPPtr1
|
>LDYA ZPPtr1
|
||||||
>SYSCALL LoadFile
|
>SYSCALL LoadFile
|
||||||
bcs CS.INIT.RTS
|
bcs CS.INIT.RTS
|
||||||
@ -173,7 +173,7 @@ CS.INIT.OPENINPUT
|
|||||||
CS.INIT.CREATEOUTPUT
|
CS.INIT.CREATEOUTPUT
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI $CC FON Type
|
>PUSHBI $CC FON Type
|
||||||
>PUSHBI SYS.FOpen.W+SYS.FOpen.X
|
>PUSHBI O.WRONLY+O.CREATE
|
||||||
>LDYA ZPPtr1
|
>LDYA ZPPtr1
|
||||||
>SYSCALL FOpen
|
>SYSCALL FOpen
|
||||||
bcs .9
|
bcs .9
|
||||||
|
@ -4,6 +4,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.VER .EQ $5C00 92.0
|
K.VER .EQ $5C00 92.0
|
||||||
K.ENV.SIZE .EQ 256
|
K.ENV.SIZE .EQ 256
|
||||||
|
K.PIPE.SIZE .EQ 256
|
||||||
K.FLT.MAX .EQ 4
|
K.FLT.MAX .EQ 4
|
||||||
K.EVT.MAX .EQ 4
|
K.EVT.MAX .EQ 4
|
||||||
K.DEV.MAX .EQ 32
|
K.DEV.MAX .EQ 32
|
||||||
@ -401,7 +402,7 @@ S.FD.T.BDEV .EQ 6
|
|||||||
S.FD.T.LNK .EQ 8
|
S.FD.T.LNK .EQ 8
|
||||||
S.FD.T.DSOCK .EQ 10
|
S.FD.T.DSOCK .EQ 10
|
||||||
S.FD.T.SSOCK .EQ 12
|
S.FD.T.SSOCK .EQ 12
|
||||||
S.FD.T.FIFO .EQ 14
|
S.FD.T.PIPE .EQ 14
|
||||||
S.FD.HANDLER .EQ 1 0=KRNL,!0=hLIB (LIBNFS,LIBTCPIP.....)
|
S.FD.HANDLER .EQ 1 0=KRNL,!0=hLIB (LIBNFS,LIBTCPIP.....)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
S.FD.REG.REF .EQ 2
|
S.FD.REG.REF .EQ 2
|
||||||
@ -436,14 +437,16 @@ S.FD.SOCK.STATUS .EQ 7
|
|||||||
*
|
*
|
||||||
S.FD.SOCK .EQ 8
|
S.FD.SOCK .EQ 8
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
S.FD.FIFO.S .EQ 2
|
S.FD.PIPE.S .EQ 2
|
||||||
S.FD.FIFO.S.ROpened .EQ 1
|
S.FD.PIPE.S.ROpened .EQ %00000001
|
||||||
S.FD.FIFO.S.WOpened .EQ 2
|
S.FD.PIPE.S.RClosed .EQ %00000010
|
||||||
S.FD.FIFO.hMem .EQ 3
|
S.FD.PIPE.S.WOpened .EQ %00000100
|
||||||
S.FD.FIFO.Tail .EQ 4
|
S.FD.PIPE.S.WClosed .EQ %00001000
|
||||||
S.FD.FIFO.Head .EQ 6
|
S.FD.PIPE.hMem .EQ 3
|
||||||
|
S.FD.PIPE.Tail .EQ 4
|
||||||
|
S.FD.PIPE.Head .EQ 6
|
||||||
*
|
*
|
||||||
S.FD.FIFO .EQ 8
|
S.FD.PIPE .EQ 8
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* PS STRUCT
|
* PS STRUCT
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -106,8 +106,8 @@ Dev.Table.pFDHI .EQ $0C60 K.Dev.MAX
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Nod (Opened files)
|
* Nod (Opened files)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Nod.Table.hFD .EQ $0C80 K.NOD.MAX
|
Nod.Table.hPath .EQ $0C80 K.NOD.MAX
|
||||||
Nod.Table.hPath .EQ $0CC0 K.NOD.MAX
|
Nod.Table.hFD .EQ $0CC0 K.NOD.MAX
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PS.Table.hMem .EQ $0D00 K.PS.MAX
|
PS.Table.hMem .EQ $0D00 K.PS.MAX
|
||||||
PS.Table.PID .EQ $0D20 K.PS.MAX
|
PS.Table.PID .EQ $0D20 K.PS.MAX
|
||||||
|
@ -133,4 +133,4 @@ MACHID.CLK .EQ %00000001
|
|||||||
*KVERSION .EQ $BFFF
|
*KVERSION .EQ $BFFF
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE INC/PRODOS.I
|
SAVE INC/MLI.I
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/LIBBLKDEV.I
|
.INB INC/LIBBLKDEV.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* NIBBLE track len = $1A00 (6656) bytes:
|
* NIBBLE track len = $1A00 (6656) bytes:
|
||||||
|
@ -4,7 +4,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
FON.Init >PUSHWI 0 Aux type
|
FON.Init >PUSHWI 0 Aux type
|
||||||
>PUSHBI $CC Type
|
>PUSHBI $CC Type
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>PUSHW L.SYSX7
|
>PUSHW L.SYSX7
|
||||||
>SYSCALL LoadStkObj
|
>SYSCALL LoadStkObj
|
||||||
bcs .9
|
bcs .9
|
||||||
@ -12,7 +12,7 @@ FON.Init >PUSHWI 0 Aux type
|
|||||||
|
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI $CC Type
|
>PUSHBI $CC Type
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>PUSHW L.SYSX7B
|
>PUSHW L.SYSX7B
|
||||||
>SYSCALL LoadStkObj
|
>SYSCALL LoadStkObj
|
||||||
bcs .9
|
bcs .9
|
||||||
|
@ -378,8 +378,8 @@ CFG.Read.Open stz CFG.hCfgFile
|
|||||||
pha
|
pha
|
||||||
|
|
||||||
>PUSHWI 0
|
>PUSHWI 0
|
||||||
>PUSHBI 6 S.FI.T.TXT
|
>PUSHBI S.FI.T.TXT
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
|
|
||||||
pla
|
pla
|
||||||
>SYSCALL fopen
|
>SYSCALL fopen
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/NIC.I
|
.INB INC/NIC.I
|
||||||
.INB INC/ETH.I
|
.INB INC/ETH.I
|
||||||
.INB INC/LIBTCPIP.I
|
.INB INC/LIBTCPIP.I
|
||||||
|
@ -188,7 +188,7 @@ CS.RUN.Load >PUSHEA.G StatBuf
|
|||||||
|
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 6 S.FI.T.BIN
|
>PUSHBI 6 S.FI.T.BIN
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>LDA.G hFileName
|
>LDA.G hFileName
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
>SYSCALL LoadFile
|
>SYSCALL LoadFile
|
||||||
@ -217,7 +217,7 @@ CS.RUN.Load >PUSHEA.G StatBuf
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.Save >PUSHWI 0 AUXTYPE
|
CS.RUN.Save >PUSHWI 0 AUXTYPE
|
||||||
>PUSHBI 6 S.FI.T.BIN
|
>PUSHBI 6 S.FI.T.BIN
|
||||||
>PUSHBI SYS.FOpen.W+SYS.FOpen.X
|
>PUSHBI O.WRONLY+O.CREATE
|
||||||
|
|
||||||
>LDA.G hFileName
|
>LDA.G hFileName
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPtr1 .EQ ZPBIN
|
ZPPtr1 .EQ ZPBIN
|
||||||
ZPPtr2 .EQ ZPBIN+2
|
ZPPtr2 .EQ ZPBIN+2
|
||||||
|
@ -211,7 +211,7 @@ BIN.Load.1 >PUSHWI K.S.STAT
|
|||||||
|
|
||||||
>PUSHYA Push AUXTYPE
|
>PUSHYA Push AUXTYPE
|
||||||
>PUSHBI S.FI.T.BIN
|
>PUSHBI S.FI.T.BIN
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
>LDYA BIN.CmdLine
|
>LDYA BIN.CmdLine
|
||||||
|
|
||||||
>SYSCALL LoadFile BANK1!!!
|
>SYSCALL LoadFile BANK1!!!
|
||||||
|
@ -12,8 +12,8 @@ AUTO 4,1
|
|||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.LoadTxtFile pha
|
K.LoadTxtFile pha
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 4 S.FI.T.TXT
|
>PUSHBI S.FI.T.TXT
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
pla
|
pla
|
||||||
sec
|
sec
|
||||||
.HS 90 BCC
|
.HS 90 BCC
|
||||||
|
@ -308,8 +308,9 @@ PS0.Init >LDYAI CORE.S.PS0 Select Process 0 (Kernel)
|
|||||||
clc
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CPU.Init.6502 >LDYAI MSG.CPU
|
CPU.Init.6502 >PUSHBI 0
|
||||||
>SYSCALL puts
|
>LDYAI MSG.CPU
|
||||||
|
>SYSCALL printf
|
||||||
|
|
||||||
jsr Detect6502 A = CPU type
|
jsr Detect6502 A = CPU type
|
||||||
sta A2osX.CPUTYPE
|
sta A2osX.CPUTYPE
|
||||||
@ -325,10 +326,13 @@ CPU.Init.6502 >LDYAI MSG.CPU
|
|||||||
lda MACHID
|
lda MACHID
|
||||||
and #MACHID.T
|
and #MACHID.T
|
||||||
cmp #MACHID.T.IIc
|
cmp #MACHID.T.IIc
|
||||||
beq CPU.Init.Z80
|
bne .10
|
||||||
|
|
||||||
|
jmp CPU.Init.Z80
|
||||||
|
|
||||||
|
.10 >PUSHBI 0
|
||||||
>LDYAI MSG.CPU.SPEED
|
>LDYAI MSG.CPU.SPEED
|
||||||
>SYSCALL puts
|
>SYSCALL printf
|
||||||
|
|
||||||
stz A2osX.RANDOM16
|
stz A2osX.RANDOM16
|
||||||
stz A2osX.RANDOM16+1
|
stz A2osX.RANDOM16+1
|
||||||
@ -392,8 +396,9 @@ CPU.Init.6502 >LDYAI MSG.CPU
|
|||||||
>SYSCALL printf
|
>SYSCALL printf
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CPU.Init.Z80 >LDYAI MSG.Z80
|
CPU.Init.Z80 >PUSHBI 0
|
||||||
>SYSCALL puts
|
>LDYAI MSG.Z80
|
||||||
|
>SYSCALL printf
|
||||||
|
|
||||||
jsr DetectZ80
|
jsr DetectZ80
|
||||||
bcs .9
|
bcs .9
|
||||||
|
@ -78,7 +78,7 @@ K.Close jsr K.GetMemPtr
|
|||||||
.DA STDIO.IOERR LNK
|
.DA STDIO.IOERR LNK
|
||||||
.DA STDIO.IOERR DSOCK
|
.DA STDIO.IOERR DSOCK
|
||||||
.DA IO.CLOSE.SSOCK
|
.DA IO.CLOSE.SSOCK
|
||||||
.DA IO.CLOSE.FIFO
|
.DA IO.CLOSE.PIPE
|
||||||
|
|
||||||
.9 lda #MLI.E.NODEV
|
.9 lda #MLI.E.NODEV
|
||||||
sec
|
sec
|
||||||
@ -90,7 +90,7 @@ IO.CLOSE.CDEV
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.CLOSE.SSOCK
|
IO.CLOSE.SSOCK
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.CLOSE.FIFO clc
|
IO.CLOSE.PIPE clc
|
||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # read
|
* # read
|
||||||
@ -125,7 +125,7 @@ IO.Read.I lda (pFD) #S.FD.T
|
|||||||
.DA STDIO.IOERR LNK
|
.DA STDIO.IOERR LNK
|
||||||
.DA STDIO.IOERR DSOCK
|
.DA STDIO.IOERR DSOCK
|
||||||
.DA IO.READ.SSOCK
|
.DA IO.READ.SSOCK
|
||||||
.DA IO.READ.FIFO
|
.DA IO.READ.PIPE
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # write
|
* # write
|
||||||
* ## C
|
* ## C
|
||||||
@ -159,7 +159,7 @@ IO.Write.I lda (pFD) #S.FD.T
|
|||||||
.DA STDIO.IOERR LNK
|
.DA STDIO.IOERR LNK
|
||||||
.DA STDIO.IOERR DSOCK
|
.DA STDIO.IOERR DSOCK
|
||||||
.DA IO.WRITE.SSOCK
|
.DA IO.WRITE.SSOCK
|
||||||
.DA IO.WRITE.FIFO
|
.DA IO.WRITE.PIPE
|
||||||
|
|
||||||
K.Write.9 lda #MLI.E.NODEV
|
K.Write.9 lda #MLI.E.NODEV
|
||||||
>RET 4
|
>RET 4
|
||||||
@ -215,28 +215,45 @@ IO.READ.SSOCK ldy #S.FD.SOCK.READ
|
|||||||
|
|
||||||
.1 jmp $ffff
|
.1 jmp $ffff
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.READ.FIFO
|
IO.READ.PIPE ldy #S.FD.PIPE.S
|
||||||
|
lda (pFD),y
|
||||||
|
bit #S.FD.PIPE.S.WOpened
|
||||||
|
beq .9 Remote PS did not opened yet the pipe
|
||||||
|
bit #S.FD.PIPE.S.WClosed
|
||||||
|
beq .99 Remote PS closed the Pipe
|
||||||
|
|
||||||
|
ldy #S.FD.PIPE.hMem
|
||||||
|
lda (pFD),y
|
||||||
|
jsr K.GetMemPtr
|
||||||
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.9 lda #MLI.E.VOLFULL
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
.99 lda #MLI.E.EOF
|
||||||
|
sec
|
||||||
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.WRITE.FIFO ldy #S.FD.FIFO.S
|
IO.WRITE.PIPE ldy #S.FD.PIPE.S
|
||||||
lda (pFD),y
|
lda (pFD),y
|
||||||
|
bit #S.FD.PIPE.S.ROpened
|
||||||
beq .9 Remote PS did not opened yet the pipe
|
beq .9 Remote PS did not opened yet the pipe
|
||||||
cmp #S.FD.FIFO.S.Closed
|
bit #S.FD.PIPE.S.RClosed
|
||||||
beq .99 Remote PS closed the Pipe
|
beq .99 Remote PS closed the Pipe
|
||||||
|
|
||||||
ldy #S.FD.FIFO.hMem
|
ldy #S.FD.PIPE.hMem
|
||||||
lda (pFD),y
|
lda (pFD),y
|
||||||
jsr K.GetMemPtr
|
jsr K.GetMemPtr
|
||||||
>STYA .1+2
|
>STYA .1+2
|
||||||
|
|
||||||
ldy #S.FD.FIFO.Head
|
ldy #S.FD.PIPE.Head
|
||||||
lda (pFD),y
|
lda (pFD),y
|
||||||
inc
|
inc
|
||||||
dey #S.FD.FIFO.Tail
|
dey #S.FD.PIPE.Tail
|
||||||
cmp (pFD),y
|
cmp (pFD),y
|
||||||
beq .9 FIFO is full
|
beq .9 PIPE is full
|
||||||
iny
|
iny
|
||||||
sta (pFD),y
|
sta (pFD),y
|
||||||
tay
|
tay
|
||||||
@ -246,7 +263,8 @@ IO.WRITE.FIFO ldy #S.FD.FIFO.S
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
.9 lda #MLI.E.VOLFULL
|
.9 lda #MLI.E.VOLFULL
|
||||||
.HS 2C bit abs
|
sec
|
||||||
|
rts
|
||||||
.99 lda #MLI.E.EOF
|
.99 lda #MLI.E.EOF
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
@ -158,10 +158,10 @@ K.MKDir jsr PFT.CheckPathYA
|
|||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # MkNod
|
* # MkNod
|
||||||
* return a hFile for a given file descriptor.
|
* Create a special or ordinary file.
|
||||||
* (CDEV, BDEV, DSOCKS, SSOCK, PIPE)
|
* (CDEV, BDEV, DSOCKS, SSOCK, PIPE)
|
||||||
* ## C
|
* ## C
|
||||||
* `hFILE mknod(const char *pathname, int mode, hFD fd);`
|
* `int mknod(const char *pathname, int mode, hFD fd);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* `>PUSHB fd`
|
* `>PUSHB fd`
|
||||||
@ -182,13 +182,16 @@ K.MkNod >STYA ZPPtr1 pathname
|
|||||||
|
|
||||||
>STYA pFD
|
>STYA pFD
|
||||||
|
|
||||||
ldx DevMgr.NodCnt
|
ldx #0
|
||||||
|
|
||||||
|
.1 lda Nod.Table.hFD,x
|
||||||
|
beq .2
|
||||||
|
|
||||||
|
inx
|
||||||
cpx #K.NOD.MAX
|
cpx #K.NOD.MAX
|
||||||
beq .98
|
beq .98
|
||||||
|
|
||||||
.1 dex
|
.2 lda K.S.STAT+S.STAT.DEV
|
||||||
bpl .
|
|
||||||
lda
|
|
||||||
|
|
||||||
lda (pFD) #S.FD.T
|
lda (pFD) #S.FD.T
|
||||||
|
|
||||||
@ -202,7 +205,7 @@ K.MkNod >STYA ZPPtr1 pathname
|
|||||||
.DA STDIO.IOERR LNK
|
.DA STDIO.IOERR LNK
|
||||||
.DA STAT.MKNOD.DSOCK
|
.DA STAT.MKNOD.DSOCK
|
||||||
.DA STAT.MKNOD.SSOCK
|
.DA STAT.MKNOD.SSOCK
|
||||||
.DA STDIO.IOERR FIFO
|
.DA STAT.MKNOD.PIPE
|
||||||
|
|
||||||
.98 lda #K.E.OOH
|
.98 lda #K.E.OOH
|
||||||
sec
|
sec
|
||||||
@ -212,7 +215,7 @@ STAT.MKNOD.CDEV
|
|||||||
STAT.MKNOD.BDEV
|
STAT.MKNOD.BDEV
|
||||||
STAT.MKNOD.DSOCK
|
STAT.MKNOD.DSOCK
|
||||||
STAT.MKNOD.SSOCK
|
STAT.MKNOD.SSOCK
|
||||||
|
STAT.MKNOD.PIPE
|
||||||
ldx #S.STAT
|
ldx #S.STAT
|
||||||
ldy #$ff
|
ldy #$ff
|
||||||
|
|
||||||
@ -244,13 +247,13 @@ STAT.MKNOD.SSOCK
|
|||||||
* CC = OK, CS = ERROR
|
* CC = OK, CS = ERROR
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.MKFIFO >LDYAI 256
|
K.MKFIFO >LDYAI K.PIPE.SIZE
|
||||||
jsr K.GetMem
|
jsr K.GetMem
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
stx .1+1 save FIFO buffer
|
stx .1+1 save PIPE buffer
|
||||||
|
|
||||||
>LDYAI S.FD.FIFO
|
>LDYAI S.FD.PIPE
|
||||||
jsr K.GetMem0
|
jsr K.GetMem0
|
||||||
|
|
||||||
bcs .9
|
bcs .9
|
||||||
@ -258,10 +261,10 @@ K.MKFIFO >LDYAI 256
|
|||||||
>STYA pFD
|
>STYA pFD
|
||||||
|
|
||||||
ldy #S.FD.T
|
ldy #S.FD.T
|
||||||
lda #S.FD.T.FIFO
|
lda #S.FD.T.PIPE
|
||||||
sta (pFD),y
|
sta (pFD),y
|
||||||
|
|
||||||
iny S.FD.FIFO.hMem
|
iny S.FD.PIPE.hMem
|
||||||
.1 lda #$ff Self Modified
|
.1 lda #$ff Self Modified
|
||||||
sta (pFD),y
|
sta (pFD),y
|
||||||
txa
|
txa
|
||||||
@ -269,7 +272,7 @@ K.MKFIFO >LDYAI 256
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
.9 pha save error code
|
.9 pha save error code
|
||||||
lda .1+1 get back FIFO buffer
|
lda .1+1 get back PIPE buffer
|
||||||
jsr K.FreeMem
|
jsr K.FreeMem
|
||||||
pla
|
pla
|
||||||
sec
|
sec
|
||||||
|
@ -963,11 +963,11 @@ K.SScanF.Fwd tya Y=char count parsed
|
|||||||
* `>PUSHWI auxtype`
|
* `>PUSHWI auxtype`
|
||||||
* `>PUSHBI ftype`
|
* `>PUSHBI ftype`
|
||||||
* `>PUSHBI mode`
|
* `>PUSHBI mode`
|
||||||
* + SYS.FOpen.R : if R and !exists -> ERROR
|
* + O.RDONLY : if R and !exists -> ERROR
|
||||||
* + SYS.FOpen.W : if W and !exists -> CREATE
|
* + O.WRONLY : if W and !exists -> CREATE
|
||||||
* + SYS.FOpen.A : Append
|
* + O.APPEND : Append
|
||||||
* + SYS.FOpen.T : Open/Append in Text mode
|
* + O.TEXT : Open/Append in Text mode
|
||||||
* + SYS.FOpen.X : Create if not exists
|
* + O.CREATE : Create if not exists
|
||||||
* http://man7.org/linux/man-pages/man3/fopen.3.html
|
* http://man7.org/linux/man-pages/man3/fopen.3.html
|
||||||
* r = O_RDONLY
|
* r = O_RDONLY
|
||||||
* w = O_WRONLY | O_CREAT | O_TRUNC
|
* w = O_WRONLY | O_CREAT | O_TRUNC
|
||||||
@ -1056,10 +1056,10 @@ K.FOpen.10 lda #S.FD.REG
|
|||||||
sta K.MLI.PARAMS+1 Next MLI Calls are REF_NUM based
|
sta K.MLI.PARAMS+1 Next MLI Calls are REF_NUM based
|
||||||
|
|
||||||
lda K.FOpen.MODE
|
lda K.FOpen.MODE
|
||||||
bit #SYS.FOpen.W
|
bit #O.WRONLY
|
||||||
beq .20 Write mode ?
|
beq .20 Write mode ?
|
||||||
|
|
||||||
and #SYS.FOpen.A Append ?
|
and #O.APPEND Append ?
|
||||||
bne .11 yes, go to end of file
|
bne .11 yes, go to end of file
|
||||||
|
|
||||||
stz K.MLI.PARAMS+2
|
stz K.MLI.PARAMS+2
|
||||||
@ -1075,7 +1075,7 @@ K.FOpen.10 lda #S.FD.REG
|
|||||||
.21 bcs .98
|
.21 bcs .98
|
||||||
|
|
||||||
.20 lda K.FOpen.MODE
|
.20 lda K.FOpen.MODE
|
||||||
and #SYS.FOpen.T Text Mode ?
|
and #O.TEXT Text Mode ?
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
lda #$FF
|
lda #$FF
|
||||||
@ -1198,7 +1198,7 @@ K.FSeek jsr PFT.CheckNodeA
|
|||||||
tax
|
tax
|
||||||
>PULLW ZPPtr1 offset LW
|
>PULLW ZPPtr1 offset LW
|
||||||
>PULLW ZPPtr2 offset HW
|
>PULLW ZPPtr2 offset HW
|
||||||
cpx #SYS.FSeek.END+1
|
cpx #SEEK.END+1
|
||||||
bcs .98
|
bcs .98
|
||||||
|
|
||||||
jmp (.1,x)
|
jmp (.1,x)
|
||||||
@ -1206,18 +1206,18 @@ K.FSeek jsr PFT.CheckNodeA
|
|||||||
.1 .DA .10
|
.1 .DA .10
|
||||||
.DA .20
|
.DA .20
|
||||||
.DA .30
|
.DA .30
|
||||||
* K.FSeek.SET
|
* SEEK.SET
|
||||||
.10 stz K.MLI.PARAMS+2
|
.10 stz K.MLI.PARAMS+2
|
||||||
stz K.MLI.PARAMS+3
|
stz K.MLI.PARAMS+3
|
||||||
stz K.MLI.PARAMS+4
|
stz K.MLI.PARAMS+4
|
||||||
bra .8
|
bra .8
|
||||||
|
|
||||||
* K.FSeek.CUR
|
* SEEK.CUR
|
||||||
.20 >MLICALL MLIGETMARK
|
.20 >MLICALL MLIGETMARK
|
||||||
bcc .8
|
bcc .8
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* K.FSeek.END
|
* SEEK.END
|
||||||
.30 >MLICALL MLIGETEOF
|
.30 >MLICALL MLIGETEOF
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ AUTO 4,1
|
|||||||
.INB INC/KERNEL.I
|
.INB INC/KERNEL.I
|
||||||
.INB INC/A2OSX.I
|
.INB INC/A2OSX.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/XY.MOUSE.I
|
.INB INC/XY.MOUSE.I
|
||||||
.INB INC/GUI.I
|
.INB INC/GUI.I
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ AUTO 4,1
|
|||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/MONITOR.I
|
.INB INC/MONITOR.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
TmpPtr1 .EQ $0
|
TmpPtr1 .EQ $0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -9,7 +9,7 @@ AUTO 4,1
|
|||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/MONITOR.I
|
.INB INC/MONITOR.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
TmpPtr1 .EQ $0
|
TmpPtr1 .EQ $0
|
||||||
TmpPtr2 .EQ $2
|
TmpPtr2 .EQ $2
|
||||||
|
@ -9,8 +9,8 @@ AUTO 4,1
|
|||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/MONITOR.I
|
.INB INC/MONITOR.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
TmpPtr1 .EQ $0
|
TmpPtr1 .EQ $0
|
||||||
TmpPtr2 .EQ $2
|
TmpPtr2 .EQ $2
|
||||||
|
@ -9,8 +9,8 @@ AUTO 4,1
|
|||||||
.INB INC/MACROS.I
|
.INB INC/MACROS.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/MONITOR.I
|
.INB INC/MONITOR.I
|
||||||
.INB INC/PRODOS.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.ERR.I
|
.INB INC/MLI.E.I
|
||||||
.INB INC/COM.6551.I
|
.INB INC/COM.6551.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
TmpPtr1 .EQ $0
|
TmpPtr1 .EQ $0
|
||||||
|
@ -68,7 +68,7 @@ CS.RUN ldy #S.PS.ARGC
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.Pak >PUSHWI 0 Aux type
|
CS.RUN.Pak >PUSHWI 0 Aux type
|
||||||
>PUSHBI 0
|
>PUSHBI 0
|
||||||
>PUSHBI SYS.FOpen.R
|
>PUSHBI O.RDONLY
|
||||||
|
|
||||||
lda #1
|
lda #1
|
||||||
>SYSCALL GetArg
|
>SYSCALL GetArg
|
||||||
|
Loading…
Reference in New Issue
Block a user