mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel version 0.9 : DevMgr & Device drivers
This commit is contained in:
parent
748e80b376
commit
f06d8b92f2
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.DEV.po
BIN
A2OSX.DEV.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -17,7 +17,7 @@ STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN
|
||||
#STARTPROC GETTY COM2 ${A2OSX}SBIN/LOGIN
|
||||
#INSDRV PIC.DRV
|
||||
# Network Section
|
||||
#INSDRV UTHERNET.DRV 000E3A123456
|
||||
INSDRV UTHERNET.DRV 000E3A123456
|
||||
#INSDRV UTHERNET2.DRV 0008DC123456
|
||||
#INSDRV UTHER2.AI.DRV 0008DC123456
|
||||
#INSDRV LANCEGS.DRV
|
||||
|
@ -35,6 +35,7 @@ CS.START cld
|
||||
.DA CS.QUIT
|
||||
L.MSG0 .DA MSG0
|
||||
L.MSG1 .DA MSG1
|
||||
L.MSG2 .DA MSG2
|
||||
L.DEV.NAME .DA DEV.NAME
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
@ -46,18 +47,22 @@ CS.RUN >LDYA L.MSG0
|
||||
|
||||
>LDYAI DevMgr.Table
|
||||
>STYA ZPPTR1
|
||||
|
||||
stz DEV.ID
|
||||
|
||||
.1 lda DEV.ID
|
||||
|
||||
>SYSCALL GetDevByIDA
|
||||
bcs .8
|
||||
>STYA ZPPTR1
|
||||
bcc .10
|
||||
jmp .8
|
||||
.10 >STYA ZPPTR1
|
||||
|
||||
ldy #S.DEV.JMP+1
|
||||
>PUSHB (ZPPTR1),y
|
||||
sta GetDevStatusJmp+2
|
||||
dey
|
||||
>PUSHB (ZPPTR1),y
|
||||
sta GetDevStatusJmp+1
|
||||
|
||||
ldy #S.DEV.F
|
||||
lda (ZPPTR1),y
|
||||
@ -84,16 +89,46 @@ CS.RUN >LDYA L.MSG0
|
||||
|
||||
>LDYA L.MSG1
|
||||
>SYSCALL CPrintFYA
|
||||
bcs .9
|
||||
|
||||
jsr GetDevStatus
|
||||
bcs .7
|
||||
>STYA ZPPTR2
|
||||
|
||||
ldy #S.DEVSTAT.VERSION+1
|
||||
>PUSHB (ZPPTR2),y
|
||||
dey
|
||||
>PUSHB (ZPPTR2),y
|
||||
|
||||
lda ZPPTR2
|
||||
clc
|
||||
adc #S.DEVSTAT.IDSTRING
|
||||
tay
|
||||
lda ZPPTR2+1
|
||||
adc #0
|
||||
|
||||
>PUSHYA
|
||||
|
||||
ldy #S.DEVSTAT.SUBTYPE
|
||||
>PUSHB (ZPPTR2),y
|
||||
dey
|
||||
>PUSHB (ZPPTR2),y
|
||||
|
||||
>LDYA L.MSG2
|
||||
>SYSCALL CPrintFYA
|
||||
bcs .9
|
||||
|
||||
.7 lda #13
|
||||
>SYSCALL PutCA
|
||||
inc DEV.ID
|
||||
|
||||
lda ZPPTR1
|
||||
clc
|
||||
adc #S.DEV
|
||||
sta ZPPTR1
|
||||
bcc .1
|
||||
bcc .3
|
||||
inc ZPPTR1+1
|
||||
bra .1
|
||||
.3 jmp .1
|
||||
|
||||
|
||||
.8 lda #0 tell TSKMGR that all done ok, but
|
||||
@ -106,9 +141,13 @@ CS.EVENT sec
|
||||
CS.QUIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
GetDevStatus ldx #DEVMGR.STATUS
|
||||
GetDevStatusJmp jmp $ffff
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
MSG0 >CSTR "ID Status Flags Name Address\n"
|
||||
MSG1 >CSTR "%03d %b %b %4S $%H\n"
|
||||
MSG0 >CSTR "ID Status Flags Name Addr. Typ/Sub IDString Version\n"
|
||||
MSG1 >CSTR "%03d %b %b %4S $%H "
|
||||
MSG2 >CSTR "$%h/$%h %16S %03d.%03d"
|
||||
*--------------------------------------
|
||||
DEV.ID .BS 1
|
||||
DEV.NAME .BS 5
|
||||
|
@ -1,6 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.SRC
|
||||
NEW
|
||||
LOMEM $A00
|
||||
INC 1
|
||||
AUTO 6
|
||||
.LIST OFF
|
||||
@ -800,7 +800,7 @@ STAT .DA #S.DEVSTAT.S.WRITE+S.DEVSTAT.S.READ
|
||||
>PSTR "ANSI 80c Console"
|
||||
.DA #0
|
||||
.DA #0
|
||||
.DA 0900
|
||||
.DA $0900
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE DRV/CONSOLE.DRV.S
|
||||
|
@ -44,11 +44,12 @@ Dev.Detect >STYA ARGS
|
||||
ldx #$70
|
||||
|
||||
.1 txa IO based detection, avoid scanning in Disk Controller IO!!!!
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
|
||||
lda A2osX.SLOTS,y
|
||||
bne .2
|
||||
|
||||
@ -75,6 +76,14 @@ Dev.Detect >STYA ARGS
|
||||
rts
|
||||
|
||||
.3 stx DEVSLOTx0
|
||||
txa
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
lda #A2osX.SLOTS.NET
|
||||
sta A2osX.SLOTS,y
|
||||
|
||||
>LDYAI PP.ID+2 Get Revision# of ths chip...
|
||||
>STYA PacketPagePTR,x
|
||||
@ -130,7 +139,9 @@ DEV.HEADER.NAME .DA #4
|
||||
*--------------------------------------
|
||||
* Driver Code
|
||||
*--------------------------------------
|
||||
DRV.CS.START .DA STATUS
|
||||
DRV.CS.START cld
|
||||
jmp (.1,x)
|
||||
.1 .DA STATUS
|
||||
.DA READBLOCK
|
||||
.DA WRITEBLOCK
|
||||
.DA BADCALL
|
||||
@ -372,11 +383,11 @@ DRV.CS.END
|
||||
DEVSLOTx0 .BS 1
|
||||
Size .BS 2
|
||||
Counter .BS 2
|
||||
*--------------------------------------
|
||||
DEVSTAT .DA #S.DEV.S.BLOCK+S.DEV.S.WRITE+S.DEV.S.READ
|
||||
.BS 3 size
|
||||
>PSTR "Uthernet/CS8900A"
|
||||
.DA #S.DEVSTAT.TYPE.NET
|
||||
*--------------------------------------
|
||||
.BS 1 Subtype
|
||||
.BS 2 Version
|
||||
*--------------------------------------
|
||||
|
@ -137,6 +137,9 @@ A2osX.SLOTS.ATCARD .EQ $82
|
||||
A2osX.SLOTS.DII .EQ $C0
|
||||
A2osX.SLOTS.BLK .EQ $C1
|
||||
A2osX.SLOTS.SP .EQ $C2
|
||||
A2osX.SLOTS.COM .EQ $E0
|
||||
A2osX.SLOTS.XY .EQ $E1
|
||||
A2osX.SLOTS.NET .EQ $E2
|
||||
A2osX.SLOTS.DISABLE .EQ $FF
|
||||
*--------------------------------------
|
||||
H.BIN.HEADER .EQ 0
|
||||
|
@ -118,7 +118,7 @@ note : '$VAR' does NOT expand Variable
|
||||
| Mouse.DRV | Working | | 0.8 |
|
||||
| DHGR.DRV | In Progress | except bitblt... | 0.8 |
|
||||
| LanCeGS.DRV | Working | | 0.8 |
|
||||
| Uthernet.DRV | Working | | 0.8 |
|
||||
| Uthernet.DRV | Working | | 0.9 |
|
||||
| Uthernet2.DRV | Working | | 0.8 |
|
||||
| Uther2.AI.DRV | In Progress | With ARP/IP Offloading | 0.8 |
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.SRC
|
||||
NEW
|
||||
LOMEM $A00
|
||||
INC 1
|
||||
AUTO 6
|
||||
.LIST OFF
|
||||
@ -470,6 +470,7 @@ PrintF.SS ldy #$00 PSTR
|
||||
|
||||
cpy PADLEN
|
||||
bne .1
|
||||
clc
|
||||
rts
|
||||
|
||||
.2 lda PADLEN
|
||||
|
@ -1,6 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.SRC
|
||||
NEW
|
||||
LOMEM $A00
|
||||
INC 1
|
||||
AUTO 6
|
||||
.LIST OFF
|
||||
@ -9,7 +9,7 @@ DevMgr.SYS.BASL0 .EQ $800
|
||||
*--------------------------------------
|
||||
DevMgr.NUL.Code cld
|
||||
jmp (.1,x)
|
||||
.1 .DA DevMgr.BADCALL STATUS
|
||||
.1 .DA DevMgr.NUL.Status
|
||||
.DA DevMgr.BADCALL READBLOCK
|
||||
.DA DevMgr.BADCALL WRITEBLOCK
|
||||
.DA DevMgr.BADCALL FORMAT
|
||||
@ -22,6 +22,18 @@ DevMgr.NUL.Code cld
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
DevMgr.NUL.Status
|
||||
>LDYAI DevMgr.NUL.Stat
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
DevMgr.NUL.Stat .DA #S.DEV.S.WRITE+S.DEV.S.READ
|
||||
.DA #0,#0,#0
|
||||
>PSTR "NUL DEVICE "
|
||||
.DA #0
|
||||
.DA #0
|
||||
.DA $0900
|
||||
*--------------------------------------
|
||||
DevMgr.SYS.Code cld
|
||||
jmp (.1,x)
|
||||
.1 .DA DevMgr.SYS.Status
|
||||
@ -40,7 +52,7 @@ DevMgr.BADCALL lda #MLI.ERR.BADCALL
|
||||
rts
|
||||
*--------------------------------------
|
||||
DevMgr.SYS.Status
|
||||
>LDYA DevMgr.SYS.Stat
|
||||
>LDYAI DevMgr.SYS.Stat
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -49,7 +61,7 @@ DevMgr.SYS.Stat .DA #S.DEV.S.WRITE+S.DEV.S.READ
|
||||
>PSTR "A2osX SYS Screen"
|
||||
.DA #0
|
||||
.DA #0
|
||||
.DA 0900
|
||||
.DA $0900
|
||||
*--------------------------------------
|
||||
DevMgr.SYS.Open stz DevMgr.SYS.CPULOADI
|
||||
stz DevMgr.SYS.CH
|
||||
|
Loading…
Reference in New Issue
Block a user