mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-08 04:29:37 +00:00
Kernel 0.9.2
This commit is contained in:
parent
3e6ecb55e5
commit
f5dd067adc
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ AUTO 4,1
|
|||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.GetArg pha save requested arg#
|
K.GetArg pha save requested arg#
|
||||||
|
|
||||||
ldy #S.PS.hARGS
|
ldy #S.PS.hARGS
|
||||||
lda (pPs),y
|
lda (pPs),y
|
||||||
jsr K.GetMemPtr
|
jsr K.GetMemPtr
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ AUTO 4,1
|
|||||||
K.LoadLib jsr BIN.FindLIB
|
K.LoadLib jsr BIN.FindLIB
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
jsr BIN.Load.YA Y,A = "/PATH/BIN"
|
jsr BIN.Load Y,A = "/PATH/BIN"
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
stx .8+1
|
stx .8+1
|
||||||
@ -29,7 +29,7 @@ K.LoadLib jsr BIN.FindLIB
|
|||||||
|
|
||||||
.99 pha
|
.99 pha
|
||||||
lda .8+1
|
lda .8+1
|
||||||
jsr K.FreeMem.A
|
jsr K.FreeMem
|
||||||
pla
|
pla
|
||||||
|
|
||||||
sec
|
sec
|
||||||
@ -63,7 +63,7 @@ K.UnloadLib pha
|
|||||||
ldx #LIBMGR.UNLOAD
|
ldx #LIBMGR.UNLOAD
|
||||||
.2 jsr $ffff Self Modified, Call LIB.UNLOAD function
|
.2 jsr $ffff Self Modified, Call LIB.UNLOAD function
|
||||||
pla
|
pla
|
||||||
jmp K.FreeMem.A
|
jmp K.FreeMem
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # LoadDrv
|
* # LoadDrv
|
||||||
* ##ASM
|
* ##ASM
|
||||||
@ -77,7 +77,7 @@ K.LoadDrv >STYA .2+1 Save "BIN\0ARGS\0\0"
|
|||||||
jsr BIN.FindDRV
|
jsr BIN.FindDRV
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
jsr BIN.Load.YA Y,A = "/PATH/BIN"
|
jsr BIN.Load Y,A = "/PATH/BIN"
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>STYA pDrv
|
>STYA pDrv
|
||||||
@ -111,7 +111,7 @@ K.LoadDrv >STYA .2+1 Save "BIN\0ARGS\0\0"
|
|||||||
.96 pha
|
.96 pha
|
||||||
|
|
||||||
.97 lda #$ff
|
.97 lda #$ff
|
||||||
jsr K.FreeMem.A
|
jsr K.FreeMem
|
||||||
pla
|
pla
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@ -244,11 +244,11 @@ BIN.Find.ENV.LIB .AZ "LIB"
|
|||||||
* Y,A = MEMPTR
|
* Y,A = MEMPTR
|
||||||
* X = hMem of Code Segment
|
* X = hMem of Code Segment
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BIN.Load.YA >STYA BIN.CmdLine
|
BIN.Load >STYA BIN.CmdLine
|
||||||
>STYA .2+1
|
>STYA .2+1
|
||||||
|
|
||||||
ldx Mem.LastSlot
|
ldx Mem.LastSlot
|
||||||
beq BIN.Load.YA.1
|
beq BIN.Load.1
|
||||||
|
|
||||||
>LDYAI Mem.Table
|
>LDYAI Mem.Table
|
||||||
>STYA ZPPtr1
|
>STYA ZPPtr1
|
||||||
@ -293,7 +293,7 @@ BIN.Load.YA >STYA BIN.CmdLine
|
|||||||
cpx Mem.LastSlot
|
cpx Mem.LastSlot
|
||||||
bne .1
|
bne .1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BIN.Load.YA.1 >PUSHWI K.S.STAT
|
BIN.Load.1 >PUSHWI K.S.STAT
|
||||||
>PUSHW BIN.CmdLine
|
>PUSHW BIN.CmdLine
|
||||||
>SYSCALL STAT BANK1!!! Look for AUXTYPE
|
>SYSCALL STAT BANK1!!! Look for AUXTYPE
|
||||||
bcs .9
|
bcs .9
|
||||||
|
@ -20,7 +20,7 @@ CORE.Run lda CORE.PSCount
|
|||||||
|
|
||||||
ldy #S.PS.CPID
|
ldy #S.PS.CPID
|
||||||
lda (pPs),y
|
lda (pPs),y
|
||||||
jsr CORE.GetPS.A
|
jsr CORE.GetPS
|
||||||
bcc .8 yes, still running....
|
bcc .8 yes, still running....
|
||||||
|
|
||||||
lda (pPs) get S.PS.F again
|
lda (pPs) get S.PS.F again
|
||||||
@ -290,7 +290,7 @@ CORE.Dispatch lda CORE.EvtCount
|
|||||||
* In : A = PID to free
|
* In : A = PID to free
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CORE.PSFree.A sta .1+1 Save PS ID
|
CORE.PSFree.A sta .1+1 Save PS ID
|
||||||
jsr CORE.GetPSByID.A PS in ZPPtr1
|
jsr CORE.GetPSByID PS in ZPPtr1
|
||||||
bcs .9
|
bcs .9
|
||||||
>STYA ZPPtr1
|
>STYA ZPPtr1
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ CORE.PSFree.A sta .1+1 Save PS ID
|
|||||||
.3 stz PS.Table.PID-1,x
|
.3 stz PS.Table.PID-1,x
|
||||||
lda PS.TABLE.hMem-1,x
|
lda PS.TABLE.hMem-1,x
|
||||||
stz PS.TABLE.hMem-1,x
|
stz PS.TABLE.hMem-1,x
|
||||||
.4 jmp K.FreeMem.A
|
.4 jmp K.FreeMem
|
||||||
|
|
||||||
.8 lda (ZPPtr1),y
|
.8 lda (ZPPtr1),y
|
||||||
bne .4
|
bne .4
|
||||||
@ -337,21 +337,20 @@ CORE.PSFree.A sta .1+1 Save PS ID
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* X unmodofied
|
* X unmodofied
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CORE.GetPSByID.A
|
CORE.GetPSByID tay
|
||||||
tay
|
|
||||||
bne .1
|
bne .1
|
||||||
>LDYAI CORE.S.PS0 Select PS0
|
>LDYAI CORE.S.PS0 Select PS0
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.1 jsr CORE.GetPS.A
|
.1 jsr CORE.GetPS
|
||||||
bcs .9
|
bcs .9
|
||||||
lda PS.TABLE.hMem-1,y
|
lda PS.TABLE.hMem-1,y
|
||||||
beq *
|
beq *
|
||||||
jmp K.GetMemPtr
|
jmp K.GetMemPtr
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CORE.GetPS.A ldy CORE.PSCount
|
CORE.GetPS ldy CORE.PSCount
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
.1 cmp PS.Table.PID-1,y
|
.1 cmp PS.Table.PID-1,y
|
||||||
@ -393,7 +392,7 @@ CORE.ScrSel and #$0F
|
|||||||
|
|
||||||
>STYA .1+1
|
>STYA .1+1
|
||||||
|
|
||||||
ldx #DEVMGR.CONTROL
|
ldx #IOCTL.CONTROL
|
||||||
.1 jmp $ffff SELF MODIFED
|
.1 jmp $ffff SELF MODIFED
|
||||||
|
|
||||||
.8 rts
|
.8 rts
|
||||||
|
@ -421,7 +421,7 @@ K.ReadDir.EXIT
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.ReadDir.CLN pha
|
K.ReadDir.CLN pha
|
||||||
lda K.ReadDir.hMem
|
lda K.ReadDir.hMem
|
||||||
jsr K.FreeMem.A
|
jsr K.FreeMem
|
||||||
pla
|
pla
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -598,13 +598,13 @@ K.ReadDir.ConvertTime
|
|||||||
>SYSCALL PTime2Time
|
>SYSCALL PTime2Time
|
||||||
rts
|
rts
|
||||||
*/-------------------------------------
|
*/-------------------------------------
|
||||||
* # CloseDir.A
|
* # CloseDir
|
||||||
* **In:**
|
* **In:**
|
||||||
* A = hDIR
|
* A = hDIR
|
||||||
* **Out:**
|
* **Out:**
|
||||||
* none, always succeed.
|
* none, always succeed.
|
||||||
*\-------------------------------------
|
*\-------------------------------------
|
||||||
K.CloseDir.A .EQ K.FClose.A
|
K.CloseDir .EQ K.FClose
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.DIRENT
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.DIRENT
|
||||||
|
@ -25,12 +25,12 @@ DRV.DiskII cld
|
|||||||
.DA A2osX.BadCall
|
.DA A2osX.BadCall
|
||||||
.DA A2osX.BadCall
|
.DA A2osX.BadCall
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.DiskII.S >LDYAI A2osx.DII.Stat
|
DRV.DiskII.S >LDYAI DRV.DiskII.Stat
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.DiskII.RW >STYA A2osX.RW.SrcDst+1
|
DRV.DiskII.RW >STYA A2osX.RW.SrcDst+1
|
||||||
jsr A2osX.Blk.GetCmdAndDevAX
|
jsr DRV.BlkDevice.GetCmdAndDevAX
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ldy #$D0
|
ldy #$D0
|
||||||
.HS 2C bit abs
|
.HS 2C bit abs
|
||||||
@ -87,7 +87,7 @@ DRV.RamDrive cld
|
|||||||
.DA A2osX.BadCall
|
.DA A2osX.BadCall
|
||||||
.DA A2osX.BadCall
|
.DA A2osX.BadCall
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.RamDrive.S jsr A2osX.Blk.GetCmdAndDevAX
|
DRV.RamDrive.S jsr DRV.BlkDevice.GetCmdAndDevAX
|
||||||
jsr GO.ProDOS
|
jsr GO.ProDOS
|
||||||
stx $42
|
stx $42
|
||||||
sta $43
|
sta $43
|
||||||
@ -97,12 +97,12 @@ DRV.RamDrive.S jsr A2osX.Blk.GetCmdAndDevAX
|
|||||||
stx DRV.RamDrive.Stat+S.DSTAT.SIZE
|
stx DRV.RamDrive.Stat+S.DSTAT.SIZE
|
||||||
sty DRV.RamDrive.Stat+S.DSTAT.SIZE+1
|
sty DRV.RamDrive.Stat+S.DSTAT.SIZE+1
|
||||||
|
|
||||||
>LDYAI A2osX.RamDrv.Stat
|
>LDYAI DRV.RamDrive.Stat
|
||||||
clc
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.RamDrive.RW >STYA A2osX.RW.SrcDst+1
|
DRV.RamDrive.RW >STYA A2osX.RW.SrcDst+1
|
||||||
jsr A2osX.Blk.GetCmdAndDevAX
|
jsr DRV.BlkDevice.GetCmdAndDevAX
|
||||||
bra A2osX.RamDrv.RW1
|
bra A2osX.RamDrv.RW1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.RamDrive.Stat
|
DRV.RamDrive.Stat
|
||||||
@ -136,29 +136,29 @@ DRV.BlkDevice cld
|
|||||||
.DA A2osX.BadCall
|
.DA A2osX.BadCall
|
||||||
.DA A2osX.BadCall
|
.DA A2osX.BadCall
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.BlkDevice.S jsr A2osX.Blk.GetCmdAndDev
|
DRV.BlkDevice.S jsr DRV.BlkDevice.GetCmdAndDev
|
||||||
|
|
||||||
jsr A2osX.BlkDrv.Go
|
jsr DRV.BlkDevice.Go
|
||||||
bcs .9
|
bcs .9
|
||||||
stx A2osx.Blk.Stat+S.DSTAT.SIZE
|
stx DRV.BlkDevice.Stat+S.DSTAT.SIZE
|
||||||
sty A2osx.Blk.Stat+S.DSTAT.SIZE+1
|
sty DRV.BlkDevice.Stat+S.DSTAT.SIZE+1
|
||||||
|
|
||||||
>LDYAI A2osX.Blk.Stat
|
>LDYAI DRV.BlkDevice.Stat
|
||||||
clc
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.BlkDevice.RW
|
DRV.BlkDevice.RW
|
||||||
>STYA A2osX.Blk.GetParam.1+1
|
>STYA DRV.BlkDevice.GetParam.1+1
|
||||||
|
|
||||||
jsr A2osX.Blk.GetCmdAndDev
|
jsrDRV.BlkDevice.GetCmdAndDev
|
||||||
|
|
||||||
jsr A2osX.Blk.GetParam
|
jsr DRV.BlkDevice.GetParam
|
||||||
bra A2osX.BlkDrv.Go
|
bra DRV.BlkDevice.Go
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.BlkDevice.F jsr A2osX.Blk.GetCmdAndDev
|
DRV.BlkDevice.F jsr DRV.BlkDevice.GetCmdAndDev
|
||||||
|
|
||||||
DRV.BlkDevice.Go
|
DRV.BlkDevice.Go
|
||||||
ldy #S.DEV.ROM.JMP
|
ldy #S.NODE.DEV.ROMPTR
|
||||||
lda (pDev),y
|
lda (pDev),y
|
||||||
sta .8+1
|
sta .8+1
|
||||||
iny
|
iny
|
||||||
@ -172,11 +172,11 @@ DRV.BlkDevice.GetParam.1
|
|||||||
lda $ffff,y Self Modified
|
lda $ffff,y Self Modified
|
||||||
sta $44,y
|
sta $44,y
|
||||||
dey
|
dey
|
||||||
bpl A2osX.Blk.GetParam.1
|
bpl DRV.BlkDevice.GetParam.1
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.BlkDevice.GetCmdAndDev
|
DRV.BlkDevice.GetCmdAndDev
|
||||||
jsr A2osX.Blk.GetCmdAndDevAX
|
jsr DRV.BlkDevice.GetCmdAndDevAX
|
||||||
stx $42
|
stx $42
|
||||||
sta $43
|
sta $43
|
||||||
rts
|
rts
|
||||||
@ -185,13 +185,13 @@ DRV.BlkDevice.GetCmdAndDevAX
|
|||||||
lsr
|
lsr
|
||||||
tax CMD
|
tax CMD
|
||||||
|
|
||||||
ldy #S.DEV.DEVID Drive 1, or 2
|
ldy #S.NODE.DEV.DEVID Drive 1, or 2
|
||||||
lda (pDev),y
|
lda (pDev),y
|
||||||
dec O or 1
|
dec O or 1
|
||||||
lsr in Carry
|
lsr in Carry
|
||||||
php
|
php
|
||||||
|
|
||||||
ldy #S.DEV.BUSID
|
ldy #S.NODE.DEV.BUSID
|
||||||
lda (pDev),y
|
lda (pDev),y
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
@ -226,23 +226,23 @@ DRV.SmartPort cld
|
|||||||
.DA DRV.SmartPort.P R
|
.DA DRV.SmartPort.P R
|
||||||
.DA DRV.SmartPort.P W
|
.DA DRV.SmartPort.P W
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.SmartPort.S jsr A2osX.PrtDrv.GetDev
|
DRV.SmartPort.S jsr DRV.SmartPort.GetDev
|
||||||
>LDYAI K.S.DSTAT
|
>LDYAI K.S.DSTAT
|
||||||
>STYA K.SP.PARAMS+2
|
>STYA K.S.IOCTL+2
|
||||||
lda #3
|
lda #3
|
||||||
sta K.SP.PARAMS+4
|
sta K.S.IOCTL+4
|
||||||
jsr A2osX.PrtDrv.Go
|
jsr DRV.SmartPort.Go
|
||||||
bcs .9
|
bcs .9
|
||||||
>LDYAI K.S.DSTAT
|
>LDYAI K.S.DSTAT
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.SmartPort.P jsr A2osX.PrtDrv.GetParam
|
DRV.SmartPort.P jsr DRV.SmartPort.GetParam
|
||||||
bra A2osX.PrtDrv.Go
|
bra DRV.SmartPort.Go
|
||||||
DRV.SmartPort.NP
|
DRV.SmartPort.NP
|
||||||
jsr A2osX.PrtDrv.GetDev
|
jsr DRV.SmartPort.GetDev
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.SmartPort.Go
|
DRV.SmartPort.Go
|
||||||
ldy #S.DEV.ROM.JMP
|
ldy #S.NODE.DEV.ROMPTR
|
||||||
lda (pDev),y
|
lda (pDev),y
|
||||||
sta .8+1
|
sta .8+1
|
||||||
iny
|
iny
|
||||||
@ -252,17 +252,17 @@ DRV.SmartPort.Go
|
|||||||
.8 jsr $ffff
|
.8 jsr $ffff
|
||||||
DRV.SmartPort.Go.Cmd
|
DRV.SmartPort.Go.Cmd
|
||||||
.BS 1
|
.BS 1
|
||||||
.DA K.SP.PARAMS
|
.DA K.S.IOCTL
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DRV.SmartPort.GetParam
|
DRV.SmartPort.GetParam
|
||||||
>STYA ZPDRV Get Ptr To ParamList
|
>STYA ZPDRV Get Ptr To ParamList
|
||||||
jsr A2osX.Blk.GetCmdAndDev
|
jsr DRV.BlkDevice.GetCmdAndDev
|
||||||
|
|
||||||
ldy #7
|
ldy #7
|
||||||
|
|
||||||
.1 lda (ZPDRV),y
|
.1 lda (ZPDRV),y
|
||||||
sta K.SP.PARAMS+2,y
|
sta K.S.IOCTL+2,y
|
||||||
dey
|
dey
|
||||||
bpl .1
|
bpl .1
|
||||||
rts
|
rts
|
||||||
@ -270,13 +270,13 @@ DRV.SmartPort.GetParam
|
|||||||
DRV.SmartPort.GetDev
|
DRV.SmartPort.GetDev
|
||||||
txa
|
txa
|
||||||
lsr
|
lsr
|
||||||
sta A2osX.PrtDrv.Go.Cmd
|
sta DRV.SmartPort.Go.Cmd
|
||||||
tax
|
tax
|
||||||
lda A2osX.PrtDrv.Cnt,x
|
lda DRV.SmartPort.Cnt,x
|
||||||
sta K.SP.PARAMS
|
sta K.S.IOCTL
|
||||||
ldy #S.DEV.DEVID
|
ldy #S.DEV.DEVID
|
||||||
lda (pDev),y
|
lda (pDev),y
|
||||||
sta K.SP.PARAMS+1
|
sta K.S.IOCTL+1
|
||||||
rts
|
rts
|
||||||
DRV.SmartPort.Cnt
|
DRV.SmartPort.Cnt
|
||||||
.HS 03030301030101010404
|
.HS 03030301030101010404
|
||||||
@ -301,7 +301,7 @@ DRV.NULL cld
|
|||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.3 .DA #S.DEV.S.WRITE+S.DEV.S.READ
|
.3 .DA #S.DSTAT.S.WRITE+S.DSTAT.S.READ
|
||||||
.DA #0,#0,#0
|
.DA #0,#0,#0
|
||||||
>PSTR "NULL DEVICE"
|
>PSTR "NULL DEVICE"
|
||||||
.BS 5
|
.BS 5
|
||||||
@ -328,7 +328,7 @@ DRV.SYS cld
|
|||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.3 .DA #S.DEV.S.WRITE+S.DEV.S.READ
|
.3 .DA #S.DSTAT.S.WRITE+S.DSTAT.S.READ
|
||||||
.DA #0,#0,#0
|
.DA #0,#0,#0
|
||||||
>PSTR "A2osX SYS Screen"
|
>PSTR "A2osX SYS Screen"
|
||||||
.DA #S.DSTAT.T.CHAR
|
.DA #S.DSTAT.T.CHAR
|
||||||
|
@ -88,12 +88,12 @@ K.LoadFile clc
|
|||||||
|
|
||||||
.98 pha
|
.98 pha
|
||||||
lda .8+1
|
lda .8+1
|
||||||
jsr K.FreeMem.A
|
jsr K.FreeMem
|
||||||
pla
|
pla
|
||||||
|
|
||||||
.99 pha
|
.99 pha
|
||||||
lda FIO.hFile
|
lda FIO.hFile
|
||||||
jsr K.FClose.A
|
jsr K.FClose
|
||||||
pla
|
pla
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
@ -812,13 +812,13 @@ DevMgrInit >LDYAI MSG.DEV
|
|||||||
tax 000DSSS0
|
tax 000DSSS0
|
||||||
lsr 0000DSSS
|
lsr 0000DSSS
|
||||||
and #$7
|
and #$7
|
||||||
sta DEV.HEADER+S.DEV.BUSID
|
sta IOCTL.BDEV+S.NODE.DEV.BUSID
|
||||||
|
|
||||||
lda DEVPTRS,x
|
lda DEVPTRS,x
|
||||||
sta DEV.HEADER+S.DEV.ROM.JMP
|
sta IOCTL.BDEV+S.NODE.DEV.ROMPTR
|
||||||
|
|
||||||
lda DEVPTRS+1,x
|
lda DEVPTRS+1,x
|
||||||
sta DEV.HEADER+S.DEV.ROM.JMP+1
|
sta IOCTL.BDEV+S.NODE.DEV.ROMPTR+1
|
||||||
|
|
||||||
sta ZPPtr1+1
|
sta ZPPtr1+1
|
||||||
stz ZPPtr1
|
stz ZPPtr1
|
||||||
@ -826,7 +826,7 @@ DevMgrInit >LDYAI MSG.DEV
|
|||||||
plp
|
plp
|
||||||
lda #0
|
lda #0
|
||||||
adc #1 Make DevID 1 or 2
|
adc #1 Make DevID 1 or 2
|
||||||
sta DEV.HEADER+S.DEV.DEVID
|
sta IOCTL.BDEV+S.NODE.DEV.DEVID
|
||||||
|
|
||||||
lda ZPPtr1+1
|
lda ZPPtr1+1
|
||||||
|
|
||||||
@ -846,29 +846,29 @@ DevMgrInit >LDYAI MSG.DEV
|
|||||||
cmp #$C0
|
cmp #$C0
|
||||||
beq .4
|
beq .4
|
||||||
|
|
||||||
jsr DevMgrInit.USR Outside ROM space, User loaded BLK dev
|
jsr DevMgrInit.USR Outside ROM space, User loaded BLK dev
|
||||||
bra .8
|
bra .8
|
||||||
|
|
||||||
.4 ldx #SmartPort.SIG-SmartPort.OFS-1
|
.4 ldx #SmartPort.SIG-SmartPort.OFS-1
|
||||||
|
|
||||||
.5 ldy SmartPort.OFS,x Check if there is a smartport firmware
|
.5 ldy SmartPort.OFS,x Check if there is a smartport firmware
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr1),y
|
||||||
cmp SmartPort.SIG,x
|
cmp SmartPort.SIG,x
|
||||||
bne .8 not a Disk Controller...
|
bne .8 not a Disk Controller...
|
||||||
dex
|
dex
|
||||||
bpl .5
|
bpl .5
|
||||||
|
|
||||||
ldy #7
|
ldy #7
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr1),y
|
||||||
bne .6 $Cn07=00 : SmartPort
|
bne .6 $Cn07=00 : SmartPort
|
||||||
|
|
||||||
lda ZPPtr1 get $Cn
|
lda ZPPtr1 get $Cn
|
||||||
and #$f get $0n
|
and #$f get $0n
|
||||||
cmp DEV.HEADER+S.DEV.BUSID same as SSS ?
|
cmp IOCTL.BDEV+S.NODE.DEV.DEVID same as SSS ?
|
||||||
beq .51
|
beq .51
|
||||||
|
|
||||||
inc DEV.HEADER+S.DEV.DEVID Remapped SP devices....
|
inc IOCTL.BDEV+S.NODE.DEV.DEVID Remapped SP devices....
|
||||||
inc DEV.HEADER+S.DEV.DEVID Add 2 to DEVID (2 & 3)
|
inc IOCTL.BDEV+S.NODE.DEV.DEVID Add 2 to DEVID (2 & 3)
|
||||||
|
|
||||||
.51 jsr DevMgrInit.SP
|
.51 jsr DevMgrInit.SP
|
||||||
lda #A2osX.S.SP
|
lda #A2osX.S.SP
|
||||||
@ -877,7 +877,7 @@ DevMgrInit >LDYAI MSG.DEV
|
|||||||
.6 jsr DevMgrInit.BLK
|
.6 jsr DevMgrInit.BLK
|
||||||
lda #A2osX.S.BLK
|
lda #A2osX.S.BLK
|
||||||
|
|
||||||
.7 ldx DEV.HEADER+S.DEV.BUSID
|
.7 ldx IOCTL.BDEV+S.NODE.DEV.DEVID
|
||||||
sta A2osX.S,x
|
sta A2osX.S,x
|
||||||
|
|
||||||
.8 dec DevMgrInit.DEVCNT
|
.8 dec DevMgrInit.DEVCNT
|
||||||
@ -889,20 +889,20 @@ DevMgrInit >LDYAI MSG.DEV
|
|||||||
DevMgrInit.DEVCNT
|
DevMgrInit.DEVCNT
|
||||||
.BS 1
|
.BS 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DevMgrInit.DII >LDYAI A2osX.DIIDrv
|
DevMgrInit.DII >LDYAI DRV.DiskII
|
||||||
jmp DevMgrInit.AddDev
|
jmp DevMgrInit.AddDev
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DevMgrInit.RAM >LDYAI A2osX.RamDrv
|
DevMgrInit.RAM >LDYAI DRV.RamDrive
|
||||||
jmp DevMgrInit.AddDev
|
jmp DevMgrInit.AddDev
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DevMgrInit.USR >LDYAI A2osX.BlkDrv
|
DevMgrInit.USR >LDYAI DRV.BlkDevice
|
||||||
jmp DevMgrInit.AddDev
|
jmp DevMgrInit.AddDev
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DevMgrInit.BLK ldy #$ff
|
DevMgrInit.BLK ldy #$ff
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr1),y
|
||||||
sta DEV.HEADER+S.DEV.ROM.JMP
|
sta IOCTL.BDEV+S.NODE.DEV.ROMPTR
|
||||||
|
|
||||||
>LDYAI A2osX.BlkDrv
|
>LDYAI DRV.BlkDevice
|
||||||
jmp DevMgrInit.AddDev
|
jmp DevMgrInit.AddDev
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DevMgrInit.SP ldy #$ff
|
DevMgrInit.SP ldy #$ff
|
||||||
@ -914,7 +914,7 @@ DevMgrInit.SP ldy #$ff
|
|||||||
lda ZPPtr1+1
|
lda ZPPtr1+1
|
||||||
sta .1+2
|
sta .1+2
|
||||||
|
|
||||||
lda IOCTL.BDEV+S.DEV.DEVID
|
lda IOCTL.BDEV+S.NODE.DEV.DEVID
|
||||||
sta SP.DEV.STATUS.DEVID
|
sta SP.DEV.STATUS.DEVID
|
||||||
|
|
||||||
.1 jsr $ffff Self Modified
|
.1 jsr $ffff Self Modified
|
||||||
@ -922,7 +922,7 @@ DevMgrInit.SP ldy #$ff
|
|||||||
.DA SP.DEV.STATUS
|
.DA SP.DEV.STATUS
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>LDYAI A2osX.PrtDrv
|
>LDYAI DRV.SmartPort
|
||||||
jsr DevMgrInit.AddDev
|
jsr DevMgrInit.AddDev
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
@ -991,7 +991,7 @@ TskMgrInit >LDYAI MSG.TSK
|
|||||||
jsr CORE.PSSelect0
|
jsr CORE.PSSelect0
|
||||||
|
|
||||||
>LDYAI K.ENV.SIZE get a buffer for ENV
|
>LDYAI K.ENV.SIZE get a buffer for ENV
|
||||||
>SYSCALL GetMem0.YA make sure blank!!
|
>SYSCALL GetMem0 make sure blank!!
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
txa
|
txa
|
||||||
@ -1006,7 +1006,7 @@ TskMgrInit >LDYAI MSG.TSK
|
|||||||
ldy K.Buf256
|
ldy K.Buf256
|
||||||
iny
|
iny
|
||||||
lda #0
|
lda #0
|
||||||
jsr K.GetMem.YA
|
jsr K.GetMem
|
||||||
>STYA ZPPtr1
|
>STYA ZPPtr1
|
||||||
txa
|
txa
|
||||||
ldy #S.PS.hPREFIX
|
ldy #S.PS.hPREFIX
|
||||||
@ -1028,15 +1028,15 @@ TskMgrInit >LDYAI MSG.TSK
|
|||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>LDYAI I.ENV.PATH
|
>LDYAI I.ENV.PATH
|
||||||
>SYSCALL PutEnv.YA
|
>SYSCALL PutEnv
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>LDYAI I.ENV.LIB
|
>LDYAI I.ENV.LIB
|
||||||
>SYSCALL PutEnv.YA
|
>SYSCALL PutEnv
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>LDYAI I.ENV.DRV
|
>LDYAI I.ENV.DRV
|
||||||
>SYSCALL PutEnv.YA
|
>SYSCALL PutEnv
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG.Init2 .AZ "A2osX[Stage2]:Init\nInstalling KERNEL...\n"
|
MSG.Init2 .AZ "A2osX[Stage2]:Init\nInstalling KERNEL...\n"
|
||||||
|
@ -28,7 +28,7 @@ IO.WRITE.REG >PUSHW K.S.IOCTL+S.IOCTL.BUFPTR
|
|||||||
|
|
||||||
jmp K.FWrite
|
jmp K.FWrite
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.WRITE.CDEV ldy #S.NODE.DEV.JMP
|
IO.WRITE.CDEV ldy #S.NODE.DEV.DRVPTR
|
||||||
lda (pNode),y
|
lda (pNode),y
|
||||||
sta .1+1
|
sta .1+1
|
||||||
iny
|
iny
|
||||||
@ -64,7 +64,7 @@ IO.WRITE.FIFO ldy #S.NODE.FIFO.S
|
|||||||
>STYA .1+2
|
>STYA .1+2
|
||||||
|
|
||||||
ldy #S.NODE.FIFO.Head
|
ldy #S.NODE.FIFO.Head
|
||||||
lda (pNodae),y
|
lda (pNode),y
|
||||||
inc
|
inc
|
||||||
dey #S.NODE.FIFO.Tail
|
dey #S.NODE.FIFO.Tail
|
||||||
cmp (pNode),y
|
cmp (pNode),y
|
||||||
|
@ -120,7 +120,7 @@ K.MKDir jsr PFT.CheckPathYA
|
|||||||
* CC = OK, CS = ERROR
|
* CC = OK, CS = ERROR
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.MkNod jsr K.GetDevByName.YA Ptr1=NAME
|
K.MkNod jsr K.GetDevByName Ptr1=NAME
|
||||||
bcs .9
|
bcs .9
|
||||||
>STYA .1+1
|
>STYA .1+1
|
||||||
stx .2+1
|
stx .2+1
|
||||||
@ -198,7 +198,7 @@ K.MKFIFO >LDYAI 256
|
|||||||
|
|
||||||
.9 pha save error code
|
.9 pha save error code
|
||||||
lda .1+1 get back FIFO buffer
|
lda .1+1 get back FIFO buffer
|
||||||
jsr K.FreeMem.A
|
jsr K.FreeMem
|
||||||
pla
|
pla
|
||||||
sec
|
sec
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ K.PutChar.1 jsr IO.SELECT
|
|||||||
K.PutChar.X >LDYAI K.IOBuf
|
K.PutChar.X >LDYAI K.IOBuf
|
||||||
>STYA K.S.IOCTL+S.IOCTL.BUFPTR
|
>STYA K.S.IOCTL+S.IOCTL.BUFPTR
|
||||||
stx K.S.IOCTL+S.IOCTL.BYTECNT
|
stx K.S.IOCTL+S.IOCTL.BYTECNT
|
||||||
stz K.S.IOCTL+S.IOCTL.BYTECNT.1
|
stz K.S.IOCTL+S.IOCTL.BYTECNT+1
|
||||||
jmp IO.WRITE
|
jmp IO.WRITE
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # PutS
|
* # PutS
|
||||||
@ -97,7 +97,7 @@ K.FPutS.I jsr IO.SELECT
|
|||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.2 sty K.S.IOCTL+S.IOCTL.BYTECNT
|
.2 sty K.S.IOCTL+S.IOCTL.BYTECNT
|
||||||
stx K.S.IOCTL+S.IOCTL.BYTECNT.1
|
stx K.S.IOCTL+S.IOCTL.BYTECNT+1
|
||||||
jmp IO.WRITE
|
jmp IO.WRITE
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # PrintF/SPrintF/FPrintF
|
* # PrintF/SPrintF/FPrintF
|
||||||
@ -542,9 +542,9 @@ PrintF.SS ldy #$00 PSTR
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PrintF.COut phy
|
PrintF.COut phy
|
||||||
|
|
||||||
ldy STDIO.Out.Cnt
|
ldy S.IOCTL.BYTECNT
|
||||||
sta (pIOBuf),y
|
sta (pIOBuf),y
|
||||||
inc STDIO.Out.Cnt
|
inc S.IOCTL.BYTECNT
|
||||||
bne .8
|
bne .8
|
||||||
|
|
||||||
lda pIOBuf+1
|
lda pIOBuf+1
|
||||||
@ -553,19 +553,19 @@ PrintF.COut phy
|
|||||||
|
|
||||||
* we are printing to IObuf, flush!
|
* we are printing to IObuf, flush!
|
||||||
|
|
||||||
lda STDIO.Out.Cnt+1
|
lda S.IOCTL.BYTECNT+1
|
||||||
pha
|
pha
|
||||||
lda #1 Flush $100 bytes
|
lda #1 Flush $100 bytes
|
||||||
sta STDIO.Out.Cnt+1
|
sta S.IOCTL.BYTECNT+1
|
||||||
|
|
||||||
|
|
||||||
pla
|
pla
|
||||||
inc
|
inc
|
||||||
sta STDIO.Out.Cnt+1
|
sta S.IOCTL.BYTECNT+1
|
||||||
|
|
||||||
|
|
||||||
.7 inc pIOBuf+1
|
.7 inc pIOBuf+1
|
||||||
inc STDIO.Out.Cnt+1
|
inc S.IOCTL.BYTECNT+1
|
||||||
|
|
||||||
.8 ply
|
.8 ply
|
||||||
clc
|
clc
|
||||||
@ -898,7 +898,7 @@ K.FOpen.10 >LDYAI S.NODE.REG
|
|||||||
|
|
||||||
.98 pha save MLI error
|
.98 pha save MLI error
|
||||||
lda .8+1
|
lda .8+1
|
||||||
jsr K.FClose.A
|
jsr K.FClose
|
||||||
pla get back MLI error
|
pla get back MLI error
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@ -907,14 +907,14 @@ K.FOpen.MODE .BS 1
|
|||||||
K.FOpen.TYPE .BS 1
|
K.FOpen.TYPE .BS 1
|
||||||
K.FOpen.AUXTYPE .BS 2
|
K.FOpen.AUXTYPE .BS 2
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FClose.A
|
* # FClose
|
||||||
* Close a file
|
* Close a file
|
||||||
* **In:**
|
* **In:**
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
* **Out:**
|
* **Out:**
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FClose.A jsr PFT.CheckNodeA
|
K.FClose jsr PFT.CheckNodeA
|
||||||
sta K.FClose.A.8+1
|
sta K.FClose.8+1
|
||||||
|
|
||||||
jsr K.GetMemPtr
|
jsr K.GetMemPtr
|
||||||
>STYA ZPPtr1
|
>STYA ZPPtr1
|
||||||
@ -925,12 +925,12 @@ K.FClose.A jsr PFT.CheckNodeA
|
|||||||
tax
|
tax
|
||||||
jmp (.1,x)
|
jmp (.1,x)
|
||||||
|
|
||||||
.1 .DA K.FClose.A.REG
|
.1 .DA K.FClose.REG
|
||||||
.DA K.FClose.A.DIR
|
.DA K.FClose.DIR
|
||||||
.DA K.FClose.A.CDEV
|
.DA K.FClose.CDEV
|
||||||
|
|
||||||
K.FClose.A.REG
|
K.FClose.REG
|
||||||
K.FClose.A.DIR ldy #S.NODE.REG.REF
|
K.FClose.DIR ldy #S.NODE.REG.REF
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr1),y
|
||||||
beq .1
|
beq .1
|
||||||
sta K.MLI.PARAMS+1
|
sta K.MLI.PARAMS+1
|
||||||
@ -938,19 +938,19 @@ K.FClose.A.DIR ldy #S.NODE.REG.REF
|
|||||||
|
|
||||||
.1 ldy #S.NODE.REG.IOBUF
|
.1 ldy #S.NODE.REG.IOBUF
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr1),y
|
||||||
beq K.FClose.A.8
|
beq K.FClose.8
|
||||||
|
|
||||||
jsr K.FreeMem.A
|
jsr K.FreeMem
|
||||||
bra K.FClose.A.8
|
bra K.FClose.8
|
||||||
|
|
||||||
K.FClose.A.CDEV ldy #S.NODE.DEV.ID
|
K.FClose.CDEV ldy #S.NODE.DEV.ID
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr1),y
|
||||||
jsr K.DevClose.A
|
jsr K.DevClose
|
||||||
bcs K.FClose.A.9
|
bcs K.FClose.9
|
||||||
|
|
||||||
K.FClose.A.8 lda #$ff Self Modified
|
K.FClose.8 lda #$ff Self Modified
|
||||||
jmp K.FreeMem.A
|
jmp K.FreeMem
|
||||||
K.FClose.A.9 rts
|
K.FClose.9 rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FRead
|
* # FRead
|
||||||
* int fread ( void * ptr, int count, FILE * stream );
|
* int fread ( void * ptr, int count, FILE * stream );
|
||||||
@ -991,11 +991,11 @@ K.FReadWrite.1 >PULLA
|
|||||||
>LDYA K.MLI.PARAMS+6
|
>LDYA K.MLI.PARAMS+6
|
||||||
.9 rts
|
.9 rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FFlush.A
|
* # FFlush
|
||||||
* **In:**
|
* **In:**
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FFlush.A jsr PFT.CheckNodeA
|
K.FFlush jsr PFT.CheckNodeA
|
||||||
jsr STDIO.GetRefNum
|
jsr STDIO.GetRefNum
|
||||||
>MLICALL MLIFLUSH
|
>MLICALL MLIFLUSH
|
||||||
rts
|
rts
|
||||||
@ -1069,7 +1069,7 @@ K.FSeek jsr PFT.CheckNodeSTK
|
|||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FEOF.A
|
* # FEOF
|
||||||
* Test the end-of-file indicator for hFILE
|
* Test the end-of-file indicator for hFILE
|
||||||
* **In:**
|
* **In:**
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
@ -1079,7 +1079,7 @@ K.FSeek jsr PFT.CheckNodeSTK
|
|||||||
* A !=0 NOT EOF
|
* A !=0 NOT EOF
|
||||||
* CS :
|
* CS :
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FEOF.A jsr PFT.CheckNodeA
|
K.FEOF jsr PFT.CheckNodeA
|
||||||
jsr STDIO.GetRefNum
|
jsr STDIO.GetRefNum
|
||||||
|
|
||||||
>MLICALL MLIGETMARK
|
>MLICALL MLIGETMARK
|
||||||
@ -1088,7 +1088,7 @@ K.FEOF.A jsr PFT.CheckNodeA
|
|||||||
ldy #2
|
ldy #2
|
||||||
|
|
||||||
.1 lda K.MLI.PARAMS+2,y
|
.1 lda K.MLI.PARAMS+2,y
|
||||||
sta K.FEOF.A.MARK,y
|
sta K.FEOF.MARK,y
|
||||||
dey
|
dey
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
@ -1098,7 +1098,7 @@ K.FEOF.A jsr PFT.CheckNodeA
|
|||||||
ldy #2
|
ldy #2
|
||||||
|
|
||||||
.2 lda K.MLI.PARAMS+2,y
|
.2 lda K.MLI.PARAMS+2,y
|
||||||
eor K.FEOF.A.MARK,y
|
eor K.FEOF.MARK,y
|
||||||
bne .8
|
bne .8
|
||||||
dey
|
dey
|
||||||
bpl .2
|
bpl .2
|
||||||
@ -1106,7 +1106,7 @@ K.FEOF.A jsr PFT.CheckNodeA
|
|||||||
.8 clc
|
.8 clc
|
||||||
.9 rts
|
.9 rts
|
||||||
|
|
||||||
K.FEOF.A.MARK .BS 3
|
K.FEOF.MARK .BS 3
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FTell
|
* # FTell
|
||||||
* Return the current value of the file-position indicator
|
* Return the current value of the file-position indicator
|
||||||
@ -1137,9 +1137,9 @@ K.FTell jsr PFT.CheckNodeSTK
|
|||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # Remove.YA
|
* # Remove
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Remove.YA jsr PFT.CheckPathYA
|
K.Remove jsr PFT.CheckPathYA
|
||||||
jsr STDIO.SetMLIPathYA
|
jsr STDIO.SetMLIPathYA
|
||||||
>MLICALL MLIDESTROY
|
>MLICALL MLIDESTROY
|
||||||
rts
|
rts
|
||||||
|
Loading…
Reference in New Issue
Block a user