From 6b5af373a43bd4e383a0a01197f6c4f812c34db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Mon, 17 Dec 2018 17:39:46 +0100 Subject: [PATCH] Kernel 0.92 --- DRV/MOUSE.DRV.S.txt | 55 +++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/DRV/MOUSE.DRV.S.txt b/DRV/MOUSE.DRV.S.txt index 618311fc..3196e37a 100644 --- a/DRV/MOUSE.DRV.S.txt +++ b/DRV/MOUSE.DRV.S.txt @@ -12,7 +12,7 @@ AUTO 4,1 .INB INC/XY.MOUSE.I .INB INC/LIBGUI.I *-------------------------------------- -ZPTmpPtr1 .EQ ZPDRV +ZPSlotPtr .EQ ZPDRV *-------------------------------------- * File Header (16 Bytes) *-------------------------------------- @@ -22,9 +22,9 @@ CS.START cld .DA #1 DRV Layout Version 1 .DA 0 .DA CS.END-CS.START Code Length - .DA DEV.HEADER-CS.START Device Header Offset - .DA DRV.CS.START-CS.START Driver Code Offset - .DA DRV.CS.END-DRV.CS.START Drv Code Length + .DA 0 + .DA 0 + .DA 0 *-------------------------------------- * Relocation Table *-------------------------------------- @@ -37,27 +37,27 @@ L.DEV.HEADER.NAME .DA DEV.HEADER.NAME Dev.Detect >LDYA L.MSG.DETECT >SYSCALL printf - stz ZPTmpPtr1 + stz ZPSlotPtr lda #$C1 -.1 sta ZPTmpPtr1+1 +.1 sta ZPSlotPtr+1 ldx #DEVSIG.Value-DEVSIG.Offset-1 .2 ldy DEVSIG.Offset,x - lda (ZPTmpPtr1),y + lda (ZPSlotPtr),y cmp DEVSIG.Value,x bne .3 dex bpl .2 - lda ZPTmpPtr1+1 + lda ZPSlotPtr+1 sta GOMOUSE+2 sta GOMOUSE.Cn+1 sta GOMOUSE.JMP+2 and #$0F sta DEVSLOT0n ora #$30 - sta DEV.HEADER.NAME+3 + sta FD.DEV.NAME+3 asl asl asl @@ -67,10 +67,22 @@ Dev.Detect >LDYA L.MSG.DETECT >PUSHW L.DEV.HEADER.NAME >LDYA L.MSG.DETECT.OK >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 -.3 lda ZPTmpPtr1+1 no match, try next slot.... +.3 lda ZPSlotPtr+1 no match, try next slot.... inc cmp #$C8 bne .1 @@ -89,16 +101,21 @@ MSG.DETECT.KO .AZ "No Mouse Found.\r\n" DEVSIG.Offset .HS 05070B0CFB DEVSIG.Value .HS 38180120D6 *-------------------------------------- -* Device Header (16 Bytes) -*-------------------------------------- -DEV.HEADER cld - jmp (DRV.CS.START,x) - .DA #0 - .BS 6 -DEV.HEADER.NAME .AZ "MOUX" +FD.DEV .DA #S.FD.T.CDEV + .DA #0 HANDLER + .DA #0 BUSID + .DA #0 DEVID + .DA 0 BUSPTR + .BS 2 DRVPTR + .DA 0 DCBPTR + .DA 0 BUFPTR +FD.DEV.NAME .AZ "MOU7" *-------------------------------------- * Driver Code *-------------------------------------- +ZPIOCTL .EQ ZPDRV +ZPTmpPtr1 .EQ ZPDRV+2 +*-------------------------------------- DRV.CS.START .DA STATUS .DA READBLOCK .DA A2osX.BADCALL @@ -320,5 +337,5 @@ DEVSTAT .DA #0 .DA #91 *-------------------------------------- MAN -SAVE USR/SRC/BIN/DRV/MOUSE.DRV.S +SAVE USR/SRC/DRV/MOUSE.DRV.S ASM