diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index ca9c1216..cfd1a010 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.SRC.po b/.Floppies/A2OSX.SRC.po index f39c00d0..b05bcafc 100644 Binary files a/.Floppies/A2OSX.SRC.po and b/.Floppies/A2OSX.SRC.po differ diff --git a/DRV/CONSOLE.DRV.S.txt b/DRV/CONSOLE.DRV.S.txt index 3ddfee64..8d1325ea 100644 --- a/DRV/CONSOLE.DRV.S.txt +++ b/DRV/CONSOLE.DRV.S.txt @@ -81,6 +81,7 @@ DRV.CS.START cld .DA CLOSE .DA READ .DA WRITE + .DA A2osX.BADCALL IRQ L.DEVSTAT .DA DEVSTAT *-------------------------------------- J.CtrlChars .DA ENQ 5 diff --git a/INC/A2osX.I.txt b/INC/A2osX.I.txt index dfe549b9..1eab4858 100644 --- a/INC/A2osX.I.txt +++ b/INC/A2osX.I.txt @@ -279,10 +279,7 @@ S.MSTAT .EQ 24 *-------------------------------------- * IOCTL device API *-------------------------------------- -* JMP : (A=Device) -* DRV : AUXLC entry point -* BLK : ROM Entry point Cn($Cnff) -* PRT : ROM Entry point Cn($Cnff)+3 +C.EOF .EQ 4 *-------------------------------------- DEVID.NULL .EQ 0 DEVID.SYS .EQ 2 @@ -390,8 +387,8 @@ S.NODE.DIR .EQ 8 *-------------------------------------- S.NODE.DEV.BUSID .EQ 2 S.NODE.DEV.DEVID .EQ 3 -S.NODE.DEV.DRVPTR .EQ 4 word -S.NODE.DEV.ROMPTR .EQ 6 word +S.NODE.DEV.BUSPTR .EQ 4 word +S.NODE.DEV.DRVPTR .EQ 6 word S.NODE.DEV.NAME .EQ 8 C-String * S.NODE.DEV .EQ 16 diff --git a/INC/KERNEL.I.txt b/INC/KERNEL.I.txt index ede5c6b0..5ac83d9f 100644 --- a/INC/KERNEL.I.txt +++ b/INC/KERNEL.I.txt @@ -8,35 +8,24 @@ AUTO 4,1 K.ENV.SIZE .EQ 256 K.FLT.MAX .EQ 4 K.EVT.MAX .EQ 4 -K.DEV.MAX .EQ 32 +K.NODE.MAX .EQ 128 K.PS.MAX .EQ 32 *-------------------------------------- -H.BIN.T .EQ 0 -H.BIN.T.DRV65 .EQ $4CD8 6502:cld,jmp abs -H.BIN.T.LIB65 .EQ $7CD8 6502:cld,jmp (abs,x) -H.BIN.T.BIN65 .EQ $7CD8 6502:cld,jmp (abs,x) -*H.BIN.T.LIB80 .EQ $A28D Z80: -*H.BIN.T.BIN80 .EQ $A28D Z80: -H.BIN.JMP .EQ 2 -H.BIN.CPU .EQ 4 -H.BIN.CPU.6502 .EQ $60 -H.BIN.CPU.65C02 .EQ $61 -H.BIN.CPU.65R02 .EQ $62 -H.BIN.CPU.65816 .EQ $63 -*H.BIN.VERSION .EQ 5 -H.BIN.CODE.LEN .EQ 8 -* -H.BIN.DS.SIZE .EQ 10 -H.BIN.SS.SIZE .EQ 12 -H.BIN.ZP.SIZE .EQ 13 -* -H.BIN.EXE.REL.TABLE .EQ 16 -* -H.BIN.DRV.REL.TABLE .EQ 4 -*-------------------------------------- ZPKERNEL .EQ $0 ZPMEMMGR .EQ $10 *-------------------------------------- +ZPPtr1 .EQ ZPKERNEL +ZPPtr2 .EQ ZPKERNEL+2 +ZPPtr3 .EQ ZPKERNEL+4 +ZPPtr4 .EQ ZPKERNEL+6 + +pIOCTL .EQ ZPKERNEL+8 +pDev .EQ ZPKERNEL+10 +pNode .EQ ZPKERNEL+12 +pIOBuf .EQ ZPKERNEL+14 +*-------------------------------------- +SYS.BASL0 .EQ $800 +*-------------------------------------- * AuxMove / XFer *-------------------------------------- A1L .EQ $3C @@ -123,7 +112,7 @@ Evt.Table .EQ $0D60 K.EVT.MAX*S.EVT.SIZE=4*8=32b *-------------------------------------- Flt.Table .EQ $0D80 K.FLT.MAX*S.FLT.SIZE=4*32=128b *-------------------------------------- -Dev.Table .EQ $0E00 K.DEV.MAX*2=32*2=64b +Node.Table .EQ $0E00 K.NODE.MAX*2=128*2=256b *-------------------------------------- K.IOBuf .EQ $0F00 *-------------------------------------- @@ -149,6 +138,29 @@ Mem.XHiMem .EQ $C000 *-------------------------------------- DevMgr.HiMem .EQ $FFFA Protect IRQ vectors in Aux LC *-------------------------------------- +H.BIN.T .EQ 0 +H.BIN.T.DRV65 .EQ $4CD8 6502:cld,jmp abs +H.BIN.T.LIB65 .EQ $7CD8 6502:cld,jmp (abs,x) +H.BIN.T.BIN65 .EQ $7CD8 6502:cld,jmp (abs,x) +*H.BIN.T.LIB80 .EQ $A28D Z80: +*H.BIN.T.BIN80 .EQ $A28D Z80: +H.BIN.JMP .EQ 2 +H.BIN.CPU .EQ 4 +H.BIN.CPU.6502 .EQ $60 +H.BIN.CPU.65C02 .EQ $61 +H.BIN.CPU.65R02 .EQ $62 +H.BIN.CPU.65816 .EQ $63 +*H.BIN.VERSION .EQ 5 +H.BIN.CODE.LEN .EQ 8 +* +H.BIN.DS.SIZE .EQ 10 +H.BIN.SS.SIZE .EQ 12 +H.BIN.ZP.SIZE .EQ 13 +* +H.BIN.EXE.REL.TABLE .EQ 16 +* +H.BIN.DRV.REL.TABLE .EQ 4 +*-------------------------------------- MAN SAVE /A2OSX.BUILD/INC/KERNEL.I LOAD /A2OSX.SRC/SYS/KERNEL.S diff --git a/INC/MLI.ERR.I.txt b/INC/MLI.ERR.I.txt index f00ff227..e9d9b7d8 100644 --- a/INC/MLI.ERR.I.txt +++ b/INC/MLI.ERR.I.txt @@ -8,6 +8,7 @@ AUTO 6 *$00 - No Error MLI.E.BADCALL .EQ $01 Bad Call Number *MLI.E.BADCNT .EQ $04 Bad Parameter Count +MLI.E.BADCTL .EQ $21 Invalid Status Code *MLI.E.IRQFULL .EQ $25 Interrupt Table Full MLI.E.IO .EQ $27 I/O Error MLI.E.NODEV .EQ $28 No Device Connected diff --git a/SYS/KERNEL.S.BIN.txt b/SYS/KERNEL.S.BIN.txt index cf561d5e..5571b091 100644 --- a/SYS/KERNEL.S.BIN.txt +++ b/SYS/KERNEL.S.BIN.txt @@ -80,7 +80,7 @@ K.LoadDrv >STYA .2+1 Save "BIN\0ARGS\0\0" jsr BIN.Load Y,A = "/PATH/BIN" bcs .9 - >STYA pDrv + >STYA .3+1 stx .97+1 ldx #$ff @@ -96,7 +96,7 @@ K.LoadDrv >STYA .2+1 Save "BIN\0ARGS\0\0" lda #0 adc .2+2 Y,A = ARGS - jsr .88 call Dev.Detect +.3 jsr $ffff SELF MODIFIED, call Dev.Detect bcs .96 jsr .96 Cleanup... @@ -111,9 +111,7 @@ K.LoadDrv >STYA .2+1 Save "BIN\0ARGS\0\0" jsr K.FreeMem pla sec - rts - -.88 jmp (pDrv) + rts *-------------------------------------- BIN.FindLIB clc .HS B0 bcs @@ -317,8 +315,8 @@ K.InsDrv >STYA BIN.R.CS.Start sbc /DevMgr.HiMem bcs .9 No More Room to load Driver.... - lda DevMgr.Count - cmp #K.DEV.MAX + lda DevMgr.NodeCount + cmp #K.NODE.MAX bne .10 No Device Handle Left lda #K.E.OOH @@ -345,15 +343,15 @@ K.InsDrv >STYA BIN.R.CS.Start >LDYA BIN.R.End >STYA DevMgr.Free - ldx DevMgr.Count + ldx DevMgr.NodeCount lda DevMgr.Free - sta Dev.Table + sta Node.Table,x inx lda DevMgr.Free+1 - sta Dev.Table + sta Node.Table,x inx - stx DevMgr.Count + stx DevMgr.NodeCount clc rts @@ -547,22 +545,9 @@ BIN.RelDrv ldy #H.BIN.DRV.REL.TABLE * Bit 2-1-0 : opcode + @ length *-------------------------------------- * 0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F -BIN.65816 .HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3 - .HS B.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3 - .HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3 - .HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3 - .HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3 +BIN.65816 +* TO DO : Make 2 different tables +* http://axis.llx.com/~nparker/a2/opcodes.html *-------------------------------------- * 65R02 OPCODES *-------------------------------------- diff --git a/SYS/KERNEL.S.CORE.txt b/SYS/KERNEL.S.CORE.txt index 7524ac1a..5731465b 100644 --- a/SYS/KERNEL.S.CORE.txt +++ b/SYS/KERNEL.S.CORE.txt @@ -525,7 +525,7 @@ CORE.PSResume sei DevMgr.Stat .DA DevMgr.FreeMem DevMgr.Free .DA DevMgr.FreeMem .DA DevMgr.HiMem -DevMgr.Count .DA #0 +DevMgr.NodeCount .DA #0 .BS 1 *-------------------------------------- CORE.VBLState .BS 1 diff --git a/SYS/KERNEL.S.DEV.txt b/SYS/KERNEL.S.DEV.txt index c035fbc5..8537f795 100644 --- a/SYS/KERNEL.S.DEV.txt +++ b/SYS/KERNEL.S.DEV.txt @@ -9,14 +9,14 @@ AUTO 4,1 * CC = OK, CS = ERROR * Y,A = DEVSLOT *\-------------------------------------- -K.GetDevByID cmp DevMgr.Count +K.GetDevByID cmp DevMgr.NodeCount bcs K.GetDev.NODEV tax - lda Dev.Table+1,x + lda Node.Table+1,x beq K.GetDev.NODEV - ldy Dev.Table,x + ldy Node.Table,x * clc @@ -34,9 +34,9 @@ K.GetDevByName >STYA ZPPtr1 ldx #0 - lda Dev.Table+1,x + lda Node.Table+1,x beq .4 - ldy Dev.Table,x + ldy Node.Table,x >STYA ZPPtr2 @@ -68,7 +68,7 @@ K.GetDevByName >STYA ZPPtr1 .4 inx inx - cpx DevMgr.Count + cpx DevMgr.NodeCount bne .1 K.GetDev.NODEV lda #MLI.E.NODEV diff --git a/SYS/KERNEL.S.DRV.txt b/SYS/KERNEL.S.DRV.txt index 687b8d5c..c5752c11 100644 --- a/SYS/KERNEL.S.DRV.txt +++ b/SYS/KERNEL.S.DRV.txt @@ -23,7 +23,7 @@ DRV.DiskII cld .DA A2osX.BadCall .DA A2osX.BadCall .DA A2osX.BadCall - .DA A2osX.BadCall + .DA A2osX.BadCall IRQ *-------------------------------------- DRV.DiskII.S >LDYAI DRV.DiskII.Stat clc @@ -85,7 +85,7 @@ DRV.RamDrive cld .DA A2osX.BadCall .DA A2osX.BadCall .DA A2osX.BadCall - .DA A2osX.BadCall + .DA A2osX.BadCall IRQ *-------------------------------------- DRV.RamDrive.S jsr DRV.BlkDevice.GetCmdAndDevAX jsr GO.ProDOS @@ -134,7 +134,7 @@ DRV.BlkDevice cld .DA A2osX.BadCall .DA A2osX.BadCall .DA A2osX.BadCall - .DA A2osX.BadCall + .DA A2osX.BadCall IRQ *-------------------------------------- DRV.BlkDevice.S jsr DRV.BlkDevice.GetCmdAndDev @@ -158,7 +158,7 @@ DRV.BlkDevice.RW DRV.BlkDevice.F jsr DRV.BlkDevice.GetCmdAndDev DRV.BlkDevice.Go - ldy #S.NODE.DEV.ROMPTR + ldy #S.NODE.DEV.BUSPTR lda (pDev),y sta .8+1 iny @@ -225,6 +225,7 @@ DRV.SmartPort cld .DA DRV.SmartPort.NP CLOSE .DA DRV.SmartPort.P R .DA DRV.SmartPort.P W + .DA A2osX.BADCALL IRQ *-------------------------------------- DRV.SmartPort.S jsr DRV.SmartPort.GetDev >LDYAI K.S.DSTAT @@ -242,7 +243,7 @@ DRV.SmartPort.NP jsr DRV.SmartPort.GetDev *-------------------------------------- DRV.SmartPort.Go - ldy #S.NODE.DEV.ROMPTR + ldy #S.NODE.DEV.BUSPTR lda (pDev),y sta .8+1 iny @@ -278,27 +279,68 @@ DRV.SmartPort.GetDev DRV.SmartPort.Cnt .HS 03030301030101010404 *-------------------------------------- -* NULL DEVICE +* NULL DEVICE +* - OPEN,WRITE,CLOSE always succeed. +* - READ returns EOF. *-------------------------------------- DRV.NULL cld jmp (.1,x) *-------------------------------------- -.1 .DA .2 STATUS +.1 .DA DRV.NULL.STATUS .DA A2osX.BADCALL READBLOCK .DA A2osX.BADCALL WRITEBLOCK .DA A2osX.BADCALL FORMAT .DA A2osX.BADCALL CONTROL .DA A2osX.BADCALL INIT - .DA A2osX.BADCALL OPEN - .DA A2osX.BADCALL CLOSE - .DA A2osX.BADCALL READ - .DA .8 WRITE + .DA DRV.NULL.OPEN + .DA DRV.NULL.CLOSE + .DA DRV.NULL.READ + .DA DRV.NULL.WRITE + .DA A2osX.BADCALL IRQ *-------------------------------------- -.2 >LDYAI .3 -.8 clc +DRV.NULL.STATUS >STYA pIOCTL + + ldy #S.IOCTL.STATCODE + lda (pIOCTL),y + beq .1 + + cmp #S.IOCTL.STATCODE.GETDIB + bne .9 + + ldx #15 + .HS 2C bit abs +.1 ldx #3 + + ldy #S.IOCTL.BUFPTR + lda (pIOCTL),y + sta .3+1 + iny + lda (pIOCTL),y + sta .3+2 + +.2 lda DRV.NULL.DSTAT,x +.3 sta $ffff,x SELF MODIFIED + dex + bpl .2 + + clc + rts + +.9 lda #MLI.E.BADCTL + sec + rts + +DRV.NULL.READ >STYA pIOCTL + + ldx #C.EOF + jmp DRV.READ.X + +DRV.NULL.OPEN +DRV.NULL.WRITE +DRV.NULL.CLOSE clc rts *-------------------------------------- -.3 .DA #S.DSTAT.S.WRITE+S.DSTAT.S.READ +DRV.NULL.DSTAT .DA #S.DSTAT.S.WRITE+S.DSTAT.S.READ+S.DSTAT.S.OPENED .DA #0,#0,#0 >PSTR "NULL DEVICE" .BS 5 @@ -316,23 +358,24 @@ DRV.SYS cld .DA A2osX.BADCALL FORMAT .DA DRV.SYS.Control .DA A2osX.BADCALL INIT - .DA DRV.SYS.Open - .DA A2osX.BADCALL CLOSE + .DA DRV.SYS.OPEN + .DA DRV.SYS.CLOSE .DA DRV.SYS.Read .DA DRV.SYS.Write + .DA A2osX.BADCALL IRQ *-------------------------------------- .2 >LDYAI .3 clc rts *-------------------------------------- -.3 .DA #S.DSTAT.S.WRITE+S.DSTAT.S.READ +.3 .DA #S.DSTAT.S.WRITE+S.DSTAT.S.READ+S.DSTAT.S.OPENED .DA #0,#0,#0 >PSTR "A2osX SYS Screen" .DA #S.DSTAT.T.CHAR .DA #0 .DA KVER *-------------------------------------- -DRV.SYS.Open lda #1 +DRV.SYS.Open lda #DEVID.SYS sta A2osX.SCRNDEVS+1 jsr DRV.SYS.Home *-------------------------------------- @@ -343,10 +386,13 @@ DRV.SYS.Control sta SETTEXT sta SETPAGE2 lda #2 sta A2osX.ASCREEN +DRV.SYS.CLOSE clc rts *-------------------------------------- -DRV.SYS.Read lda A2osX.ASCREEN +DRV.SYS.Read >STYA pIOCTL + + lda A2osX.ASCREEN cmp #2 is SYS active? bne .9 @@ -358,14 +404,49 @@ DRV.SYS.Read lda A2osX.ASCREEN and #$7F - clc - rts + tax + jmp DRV.READ.X .9 lda #0 Error = no event sec rts *-------------------------------------- -DRV.SYS.Write phx +DRV.SYS.WRITE >STYA pIOCTL + + ldy #S.IOCTL.BUFPTR + lda (pIOCTL),y + + sta ZPDRV+4 + iny + lda (pIOCTL),y + sta ZPDRV+5 + + ldy #S.IOCTL.BYTECNT + lda (pIOCTL),y + eor #$ff + tax + iny + lda (pIOCTL),y + eor #$ff + tay + +.2 inx + bne .3 + iny + bne .3 + clc + rts + +.3 lda (ZPDRV) + inc ZPDRV+4 + bne .4 + inc ZPDRV+5 + +.4 jsr DRV.SYS.COUT + +.5 bra .2 +*-------------------------------------- +DRV.SYS.COUT phx phy cmp #' ' bcs .7 @@ -537,6 +618,24 @@ DRV.SYS.CV .BS 1 DRV.SYS.BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0 DRV.SYS.BASEH .HS 08.08.09.09.0A.0A.0B.0B.08.08.09.09.0A.0A.0B.0B.08.08.09.09.0A.0A.0B.0B *-------------------------------------- +DRV.READ.X ldy #S.IOCTL.BYTECNT + lda #1 + sta (pIOCTL),y + iny + dec + sta (pIOCTL),y + + ldy #S.IOCTL.BUFPTR + lda (pIOCTL),y + sta .1+1 + iny + lda (pIOCTL),y + sta .1+2 + +.1 stx $ffff SELF MODIFIED + clc + rts +*-------------------------------------- MAN SAVE /A2OSX.SRC/SYS/KERNEL.S.DRV LOAD /A2OSX.SRC/SYS/KERNEL.S diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt index 72459c58..3c1eadb7 100644 --- a/SYS/KERNEL.S.INIT.txt +++ b/SYS/KERNEL.S.INIT.txt @@ -2,17 +2,6 @@ NEW PREFIX /A2OSX.BUILD AUTO 4,1 *-------------------------------------- -ZPPtr1 .EQ ZPKERNEL -ZPPtr2 .EQ ZPKERNEL+2 -ZPPtr3 .EQ ZPKERNEL+4 -ZPPtr4 .EQ ZPKERNEL+6 -pDrv .EQ ZPKERNEL+8 -pDev .EQ ZPKERNEL+10 -pNode .EQ ZPKERNEL+12 -pIOBuf .EQ ZPKERNEL+14 -*-------------------------------------- -SYS.BASL0 .EQ $800 -*-------------------------------------- Kernel.Init sei ldx #$FF txs @@ -809,10 +798,10 @@ DevMgrInit >LDYAI MSG.DEV sta NODE.BDEV+S.NODE.DEV.BUSID lda DEVPTRS,x - sta NODE.BDEV+S.NODE.DEV.ROMPTR + sta NODE.BDEV+S.NODE.DEV.BUSPTR lda DEVPTRS+1,x - sta NODE.BDEV+S.NODE.DEV.ROMPTR+1 + sta NODE.BDEV+S.NODE.DEV.BUSPTR+1 sta ZPPtr1+1 stz ZPPtr1 @@ -894,7 +883,7 @@ DevMgrInit.USR >LDYAI DRV.BlkDevice *-------------------------------------- DevMgrInit.BLK ldy #$ff lda (ZPPtr1),y - sta NODE.BDEV+S.NODE.DEV.ROMPTR + sta NODE.BDEV+S.NODE.DEV.BUSPTR >LDYAI DRV.BlkDevice jmp DevMgrInit.AddDev @@ -904,7 +893,7 @@ DevMgrInit.SP ldy #$ff clc adc #3 Compute smartport entry point sta .1+1 - sta NODE.BDEV+S.NODE.DEV.ROMPTR + sta NODE.BDEV+S.NODE.DEV.BUSPTR lda ZPPtr1+1 sta .1+2 @@ -935,13 +924,13 @@ DevMgrInit.AddDev >LDYAI NODE.BDEV DevMgrInit.AddNode - ldx DevMgr.Count - sta Dev.Table+1,x + ldx DevMgr.NodeCount + sta Node.Table+1,x tya - sta Dev.Table,x + sta Node.Table,x inx inx - stx DevMgr.Count + stx DevMgr.NodeCount clc rts diff --git a/SYS/KERNEL.S.IO.txt b/SYS/KERNEL.S.IO.txt index 9271bb1c..aba99006 100644 --- a/SYS/KERNEL.S.IO.txt +++ b/SYS/KERNEL.S.IO.txt @@ -6,8 +6,6 @@ IO.SELECT jsr K.GetMemPtr >STYA pNode rts *-------------------------------------- -IO -*-------------------------------------- IO.WRITE lda (pNode) #S.NODE.T tax *-------------------------------------- diff --git a/SYS/KERNEL.S.IRQ.txt b/SYS/KERNEL.S.IRQ.txt index 45b22e1a..8d127484 100644 --- a/SYS/KERNEL.S.IRQ.txt +++ b/SYS/KERNEL.S.IRQ.txt @@ -35,7 +35,7 @@ K.IrqHAuxLC cld lda RDREADAUX pha - sta CLRREADAUX Make sure we can access Dev.Table + sta CLRREADAUX Make sure we can access Node.Table lda RDWRITEAUX pha @@ -188,30 +188,44 @@ K.IrqH.Switch inc IRQ.Tick .8 clc exit with V flag set rts *-------------------------------------- -K.IrqH.DEV >LDYAI Dev.Table - >STYA $fe - - ldx DevMgr.Count +K.IrqH.DEV ldx #0 -.1 ldy #S.DEV.S - lda ($fe),y - and #S.DEV.S.IRQ +.1 lda Node.Table+1,x beq .2 - phx - ldx #DEVMGR.IRQ - jsr .88 + sta $ff + lda Node.Table,x + sta $fe + + ldy #S.NODE.DEV.DRVPTR + lda ($fe),y + pha + + iny + lda ($fe),y + sta $ff + pla + sta $fe + + ldy #IOCTL.IRQ+4+1 + lda ($fe),y + cmp /A2osX.BADCALL + beq .2 + + sta .10+2 + dey + lda ($fe),y + sta .10+1 + +.10 jsr $ffff SELF MODIFIED + plx bcc .8 CC, IRQ cleared by device -.2 lda $fe - clc - adc #S.DEV - sta $fe - bcc .3 - inc $ff +.2 inx + inx -.3 dex +.3 cpx DevMgr.NodeCount bne .1 sec @@ -219,8 +233,6 @@ K.IrqH.DEV >LDYAI Dev.Table .8 clv clear V (no task switching) rts *-------------------------------------- -.88 jmp ($fe) -*-------------------------------------- MAN SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ LOAD /A2OSX.SRC/SYS/KERNEL.S