mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-14 13:29:02 +00:00
Kernel 0.92
This commit is contained in:
parent
65e347ad36
commit
6b5af373a4
@ -12,7 +12,7 @@ AUTO 4,1
|
|||||||
.INB INC/XY.MOUSE.I
|
.INB INC/XY.MOUSE.I
|
||||||
.INB INC/LIBGUI.I
|
.INB INC/LIBGUI.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPTmpPtr1 .EQ ZPDRV
|
ZPSlotPtr .EQ ZPDRV
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* File Header (16 Bytes)
|
* File Header (16 Bytes)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -22,9 +22,9 @@ CS.START cld
|
|||||||
.DA #1 DRV Layout Version 1
|
.DA #1 DRV Layout Version 1
|
||||||
.DA 0
|
.DA 0
|
||||||
.DA CS.END-CS.START Code Length
|
.DA CS.END-CS.START Code Length
|
||||||
.DA DEV.HEADER-CS.START Device Header Offset
|
.DA 0
|
||||||
.DA DRV.CS.START-CS.START Driver Code Offset
|
.DA 0
|
||||||
.DA DRV.CS.END-DRV.CS.START Drv Code Length
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Relocation Table
|
* Relocation Table
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -37,27 +37,27 @@ L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
|
|||||||
Dev.Detect >LDYA L.MSG.DETECT
|
Dev.Detect >LDYA L.MSG.DETECT
|
||||||
>SYSCALL printf
|
>SYSCALL printf
|
||||||
|
|
||||||
stz ZPTmpPtr1
|
stz ZPSlotPtr
|
||||||
lda #$C1
|
lda #$C1
|
||||||
.1 sta ZPTmpPtr1+1
|
.1 sta ZPSlotPtr+1
|
||||||
|
|
||||||
ldx #DEVSIG.Value-DEVSIG.Offset-1
|
ldx #DEVSIG.Value-DEVSIG.Offset-1
|
||||||
|
|
||||||
.2 ldy DEVSIG.Offset,x
|
.2 ldy DEVSIG.Offset,x
|
||||||
lda (ZPTmpPtr1),y
|
lda (ZPSlotPtr),y
|
||||||
cmp DEVSIG.Value,x
|
cmp DEVSIG.Value,x
|
||||||
bne .3
|
bne .3
|
||||||
dex
|
dex
|
||||||
bpl .2
|
bpl .2
|
||||||
|
|
||||||
lda ZPTmpPtr1+1
|
lda ZPSlotPtr+1
|
||||||
sta GOMOUSE+2
|
sta GOMOUSE+2
|
||||||
sta GOMOUSE.Cn+1
|
sta GOMOUSE.Cn+1
|
||||||
sta GOMOUSE.JMP+2
|
sta GOMOUSE.JMP+2
|
||||||
and #$0F
|
and #$0F
|
||||||
sta DEVSLOT0n
|
sta DEVSLOT0n
|
||||||
ora #$30
|
ora #$30
|
||||||
sta DEV.HEADER.NAME+3
|
sta FD.DEV.NAME+3
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
@ -67,10 +67,22 @@ Dev.Detect >LDYA L.MSG.DETECT
|
|||||||
>PUSHW L.DEV.HEADER.NAME
|
>PUSHW L.DEV.HEADER.NAME
|
||||||
>LDYA L.MSG.DETECT.OK
|
>LDYA L.MSG.DETECT.OK
|
||||||
>SYSCALL printf
|
>SYSCALL printf
|
||||||
clc
|
|
||||||
|
>PUSHWI DRV.END
|
||||||
|
>PUSHWI DRV.CS.END
|
||||||
|
>PUSHWI DRV.CS.START
|
||||||
|
>LDYA L.DRV.CS.START
|
||||||
|
>SYSCALL InsDrv
|
||||||
|
bcs .9
|
||||||
|
>STYA FD.DEV+S.FD.DEV.DRVPTR
|
||||||
|
|
||||||
|
>PUSHW L.FD.DEV.NAME
|
||||||
|
>LDYA L.FD.DEV
|
||||||
|
>SYSCALL MKDEV
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.3 lda ZPTmpPtr1+1 no match, try next slot....
|
.3 lda ZPSlotPtr+1 no match, try next slot....
|
||||||
inc
|
inc
|
||||||
cmp #$C8
|
cmp #$C8
|
||||||
bne .1
|
bne .1
|
||||||
@ -89,16 +101,21 @@ MSG.DETECT.KO .AZ "No Mouse Found.\r\n"
|
|||||||
DEVSIG.Offset .HS 05070B0CFB
|
DEVSIG.Offset .HS 05070B0CFB
|
||||||
DEVSIG.Value .HS 38180120D6
|
DEVSIG.Value .HS 38180120D6
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Device Header (16 Bytes)
|
FD.DEV .DA #S.FD.T.CDEV
|
||||||
*--------------------------------------
|
.DA #0 HANDLER
|
||||||
DEV.HEADER cld
|
.DA #0 BUSID
|
||||||
jmp (DRV.CS.START,x)
|
.DA #0 DEVID
|
||||||
.DA #0
|
.DA 0 BUSPTR
|
||||||
.BS 6
|
.BS 2 DRVPTR
|
||||||
DEV.HEADER.NAME .AZ "MOUX"
|
.DA 0 DCBPTR
|
||||||
|
.DA 0 BUFPTR
|
||||||
|
FD.DEV.NAME .AZ "MOU7"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Driver Code
|
* Driver Code
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
ZPIOCTL .EQ ZPDRV
|
||||||
|
ZPTmpPtr1 .EQ ZPDRV+2
|
||||||
|
*--------------------------------------
|
||||||
DRV.CS.START .DA STATUS
|
DRV.CS.START .DA STATUS
|
||||||
.DA READBLOCK
|
.DA READBLOCK
|
||||||
.DA A2osX.BADCALL
|
.DA A2osX.BADCALL
|
||||||
@ -320,5 +337,5 @@ DEVSTAT .DA #0
|
|||||||
.DA #91
|
.DA #91
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE USR/SRC/BIN/DRV/MOUSE.DRV.S
|
SAVE USR/SRC/DRV/MOUSE.DRV.S
|
||||||
ASM
|
ASM
|
||||||
|
Loading…
Reference in New Issue
Block a user