2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
* DRV.DiskII
|
2018-06-19 05:55:12 +00:00
|
|
|
|
* X = IOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
* Y,A = PTR to S.IOCTL
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.DiskII cld
|
2018-07-09 15:25:38 +00:00
|
|
|
|
cpx #IOCTL.FORMAT
|
|
|
|
|
bcs .9
|
2018-07-06 14:42:20 +00:00
|
|
|
|
>STYA pIOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
jmp (.1,x)
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.1 .DA DRV.DiskII.STATUS
|
|
|
|
|
.DA DRV.BLK READ
|
|
|
|
|
.DA DRV.BLK WRITE
|
2018-07-09 15:25:38 +00:00
|
|
|
|
.9 jmp A2osX.BadCall
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.DiskII.STATUS
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>LDYAI DRV.DiskII.DIB
|
2018-07-06 14:42:20 +00:00
|
|
|
|
jmp DRV.STATUS.YA
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.DiskII.DIB .DA #S.DIB.S.BLOCK+S.DIB.S.WRITE+S.DIB.S.READ
|
2017-10-18 15:32:56 +00:00
|
|
|
|
.DA 280
|
|
|
|
|
.DA #0
|
|
|
|
|
>PSTR "Disk II 5.25"
|
|
|
|
|
.BS 4
|
2018-07-19 15:33:55 +00:00
|
|
|
|
.DA #S.DIB.T.DISKII
|
2017-10-18 15:32:56 +00:00
|
|
|
|
.DA #0
|
2018-06-20 15:02:09 +00:00
|
|
|
|
.DA KVER
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
* DRV.RamDrive
|
2018-06-19 05:55:12 +00:00
|
|
|
|
* X = IOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
* Y,A = PTR to S.IOCTL
|
2017-11-07 16:28:34 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.RamDrive cld
|
2018-07-09 15:25:38 +00:00
|
|
|
|
cpx #IOCTL.CONTROL
|
|
|
|
|
bcs .9
|
2018-07-06 14:42:20 +00:00
|
|
|
|
>STYA pIOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
jmp (.1,x)
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.1 .DA DRV.RamDrive.STATUS
|
|
|
|
|
.DA DRV.BLK READ
|
|
|
|
|
.DA DRV.BLK WRITE
|
|
|
|
|
.DA DRV.BLK FORMAT
|
2018-07-09 15:25:38 +00:00
|
|
|
|
.9 jmp A2osX.BadCall
|
2017-11-07 16:28:34 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.RamDrive.STATUS
|
|
|
|
|
jsr DRV.Blk
|
2017-11-07 16:28:34 +00:00
|
|
|
|
bcs .9
|
2018-07-19 15:33:55 +00:00
|
|
|
|
stx DRV.RamDrive.DIB+S.DIB.SIZE
|
|
|
|
|
sty DRV.RamDrive.DIB+S.DIB.SIZE+1
|
2017-11-07 16:28:34 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>LDYAI DRV.RamDrive.DIB
|
2018-07-06 14:42:20 +00:00
|
|
|
|
jmp DRV.STATUS.YA
|
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.RamDrive.DIB
|
|
|
|
|
.DA #S.DIB.S.BLOCK+S.DIB.S.WRITE+S.DIB.S.READ
|
2017-11-07 16:28:34 +00:00
|
|
|
|
.BS 3
|
|
|
|
|
>PSTR "ProDOS /RAM Disk"
|
2018-07-19 15:33:55 +00:00
|
|
|
|
.DA #S.DIB.T.RAM
|
2017-11-07 16:28:34 +00:00
|
|
|
|
.DA #0
|
2018-06-25 05:59:43 +00:00
|
|
|
|
.DA KVER
|
2017-11-07 16:28:34 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
* DRV.BlkDevice
|
2018-06-19 05:55:12 +00:00
|
|
|
|
* X = IOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
* Y,A = PTR to S.IOCTL
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.BlkDevice cld
|
2018-07-09 15:25:38 +00:00
|
|
|
|
cpx #IOCTL.CONTROL
|
|
|
|
|
bcs .9
|
2018-07-06 14:42:20 +00:00
|
|
|
|
>STYA pIOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
jmp (.1,x)
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.1 .DA DRV.BlkDevice.STATUS
|
|
|
|
|
.DA DRV.BLK READ
|
|
|
|
|
.DA DRV.BLK WRITE
|
|
|
|
|
.DA DRV.BLK FORMAT
|
2018-07-09 15:25:38 +00:00
|
|
|
|
.9 jmp A2osX.BadCall
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.BlkDevice.STATUS
|
|
|
|
|
jsr DRV.Blk
|
2017-10-18 15:32:56 +00:00
|
|
|
|
bcs .9
|
2018-07-19 15:33:55 +00:00
|
|
|
|
stx DRV.BlkDevice.DIB+S.DIB.SIZE
|
|
|
|
|
sty DRV.BlkDevice.DIB+S.DIB.SIZE+1
|
2017-10-18 15:32:56 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>LDYAI DRV.BlkDevice.DIB
|
2018-07-06 14:42:20 +00:00
|
|
|
|
jmp DRV.STATUS.YA
|
2017-10-18 15:32:56 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.BlkDevice.DIB
|
|
|
|
|
.DA #S.DIB.S.BLOCK+S.DIB.S.WRITE+S.DIB.S.READ
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.BS 3
|
|
|
|
|
>PSTR "ProDOS Block Dev"
|
2018-07-19 15:33:55 +00:00
|
|
|
|
.DA #S.DIB.T.PRODOS
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.DA #0
|
|
|
|
|
.DA KVER
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
* IOCTL to BLK protocol converter
|
|
|
|
|
* in : pIOCTL (AUX)
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.BLK txa
|
2017-10-18 15:32:56 +00:00
|
|
|
|
lsr
|
2018-07-06 14:42:20 +00:00
|
|
|
|
sta DRV.BLK.PARAMS CMD
|
2017-10-18 15:32:56 +00:00
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
ldy #S.FD.DEV.DEVID Drive 1, or 2
|
2018-07-11 15:13:29 +00:00
|
|
|
|
lda (pFD),y
|
2017-10-18 15:32:56 +00:00
|
|
|
|
dec O or 1
|
|
|
|
|
lsr in Carry
|
|
|
|
|
php
|
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
ldy #S.FD.DEV.BUSID
|
2018-07-11 15:13:29 +00:00
|
|
|
|
lda (pFD),y
|
2017-10-18 15:32:56 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
plp
|
|
|
|
|
ror DSSS0000
|
|
|
|
|
|
2018-07-06 14:42:20 +00:00
|
|
|
|
sta DRV.BLK.PARAMS+1 UNITNUM
|
|
|
|
|
|
|
|
|
|
ldx #3
|
|
|
|
|
|
|
|
|
|
ldy #S.IOCTL.BUFPTR+3
|
|
|
|
|
|
|
|
|
|
.1 lda (pIOCTL),y BUF,BLKNUM
|
|
|
|
|
sta DRV.BLK.PARAMS+2,x
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
ldy #S.FD.DEV.BUSPTR
|
2018-07-06 14:42:20 +00:00
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
lda (pFD),y
|
2018-07-06 14:42:20 +00:00
|
|
|
|
sta .3+1
|
|
|
|
|
iny
|
2018-07-10 15:33:13 +00:00
|
|
|
|
lda (pFD),y
|
2018-07-06 14:42:20 +00:00
|
|
|
|
sta .3+2
|
|
|
|
|
|
|
|
|
|
jsr GO.ProDOS
|
|
|
|
|
|
|
|
|
|
ldx #5
|
|
|
|
|
|
|
|
|
|
.2 lda DRV.BLK.PARAMS,x
|
|
|
|
|
sta $42,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
|
|
|
|
|
.3 jsr $ffff SELF MODIFIED
|
|
|
|
|
|
|
|
|
|
jsr GO.A2osX
|
2017-10-18 15:32:56 +00:00
|
|
|
|
rts
|
2018-07-06 14:42:20 +00:00
|
|
|
|
|
|
|
|
|
DRV.BLK.PARAMS .BS 6
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2017-03-21 16:29:15 +00:00
|
|
|
|
* Smartport Driver
|
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SmartPort cld
|
2018-07-06 14:42:20 +00:00
|
|
|
|
>STYA DRV.SmartPort.Go.IOCTL
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
lsr
|
|
|
|
|
sta DRV.SmartPort.Go.Cmd
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda DRV.SmartPort.Cnt,x
|
|
|
|
|
sta DRV.SmartPort.Go.Cmd
|
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
ldy #S.FD.DEV.BUSPTR
|
|
|
|
|
lda (pFD),y
|
2017-03-21 16:29:15 +00:00
|
|
|
|
sta .8+1
|
|
|
|
|
iny
|
2018-07-10 15:33:13 +00:00
|
|
|
|
lda (pFD),y
|
2017-03-21 16:29:15 +00:00
|
|
|
|
sta .8+2
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-03-21 16:29:15 +00:00
|
|
|
|
.8 jsr $ffff
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SmartPort.Go.Cmd
|
2017-03-21 16:29:15 +00:00
|
|
|
|
.BS 1
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.SmartPort.Go.IOCTL
|
|
|
|
|
.BS 2
|
2017-03-21 16:29:15 +00:00
|
|
|
|
rts
|
2018-07-06 14:42:20 +00:00
|
|
|
|
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SmartPort.Cnt
|
2017-09-13 06:17:46 +00:00
|
|
|
|
.HS 03030301030101010404
|
2017-03-21 16:29:15 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-05 15:39:36 +00:00
|
|
|
|
* NULL DEVICE
|
|
|
|
|
* - OPEN,WRITE,CLOSE always succeed.
|
|
|
|
|
* - READ returns EOF.
|
2017-11-21 16:27:07 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
DRV.NULL cld
|
2018-07-06 14:42:20 +00:00
|
|
|
|
>STYA pIOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
jmp (.1,x)
|
|
|
|
|
*--------------------------------------
|
2018-07-05 15:39:36 +00:00
|
|
|
|
.1 .DA DRV.NULL.STATUS
|
2017-09-13 06:17:46 +00:00
|
|
|
|
.DA A2osX.BADCALL READBLOCK
|
|
|
|
|
.DA A2osX.BADCALL WRITEBLOCK
|
|
|
|
|
.DA A2osX.BADCALL FORMAT
|
|
|
|
|
.DA A2osX.BADCALL CONTROL
|
|
|
|
|
.DA A2osX.BADCALL INIT
|
2018-07-05 15:39:36 +00:00
|
|
|
|
.DA DRV.NULL.OPEN
|
|
|
|
|
.DA DRV.NULL.CLOSE
|
|
|
|
|
.DA DRV.NULL.READ
|
|
|
|
|
.DA DRV.NULL.WRITE
|
|
|
|
|
.DA A2osX.BADCALL IRQ
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.NULL.STATUS >LDYAI DRV.NULL.DIB
|
2018-07-06 14:42:20 +00:00
|
|
|
|
jmp DRV.STATUS.YA
|
2018-07-05 15:39:36 +00:00
|
|
|
|
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.NULL.READ ldx #C.EOF
|
2018-07-05 15:39:36 +00:00
|
|
|
|
jmp DRV.READ.X
|
|
|
|
|
|
|
|
|
|
DRV.NULL.OPEN
|
|
|
|
|
DRV.NULL.WRITE
|
|
|
|
|
DRV.NULL.CLOSE clc
|
2017-01-25 21:46:40 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.NULL.DIB .DA #S.DIB.S.WRITE+S.DIB.S.READ+S.DIB.S.OPENED
|
2017-01-25 21:46:40 +00:00
|
|
|
|
.DA #0,#0,#0
|
2018-06-18 06:22:50 +00:00
|
|
|
|
>PSTR "NULL DEVICE"
|
|
|
|
|
.BS 5
|
2018-07-19 15:33:55 +00:00
|
|
|
|
.DA #S.DIB.T.CHAR
|
2017-01-25 21:46:40 +00:00
|
|
|
|
.DA #0
|
2018-06-14 15:31:36 +00:00
|
|
|
|
.DA KVER
|
2017-01-25 21:46:40 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-21 16:27:07 +00:00
|
|
|
|
* SYS DEVICE
|
|
|
|
|
*--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
DRV.SYS cld
|
2018-07-06 14:42:20 +00:00
|
|
|
|
>STYA pIOCTL
|
2018-06-20 15:02:09 +00:00
|
|
|
|
jmp (.1,x)
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.1 .DA DRV.SYS.STATUS
|
2017-09-13 06:17:46 +00:00
|
|
|
|
.DA A2osX.BADCALL READBLOCK
|
|
|
|
|
.DA A2osX.BADCALL WRITEBLOCK
|
|
|
|
|
.DA A2osX.BADCALL FORMAT
|
2018-06-20 15:02:09 +00:00
|
|
|
|
.DA DRV.SYS.Control
|
2017-09-13 06:17:46 +00:00
|
|
|
|
.DA A2osX.BADCALL INIT
|
2018-07-05 15:39:36 +00:00
|
|
|
|
.DA DRV.SYS.OPEN
|
|
|
|
|
.DA DRV.SYS.CLOSE
|
2018-06-20 15:02:09 +00:00
|
|
|
|
.DA DRV.SYS.Read
|
|
|
|
|
.DA DRV.SYS.Write
|
2018-07-05 15:39:36 +00:00
|
|
|
|
.DA A2osX.BADCALL IRQ
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.SYS.STATUS >LDYAI DRV.SYS.DIB
|
2018-07-06 14:42:20 +00:00
|
|
|
|
jmp DRV.STATUS.YA
|
2017-01-12 17:43:45 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-05 15:39:36 +00:00
|
|
|
|
DRV.SYS.Open lda #DEVID.SYS
|
2018-06-20 15:02:09 +00:00
|
|
|
|
sta A2osX.SCRNDEVS+1
|
2018-07-19 15:33:55 +00:00
|
|
|
|
jsr DRV.SYS.FF
|
2016-11-13 21:03:31 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.Control sta SETTEXT
|
2016-11-13 21:03:31 +00:00
|
|
|
|
sta SETALTCHAR
|
|
|
|
|
sta SET80DISP
|
|
|
|
|
sta CLR80STORE
|
2018-06-20 15:02:09 +00:00
|
|
|
|
sta SETPAGE2
|
|
|
|
|
lda #2
|
2016-12-05 17:04:42 +00:00
|
|
|
|
sta A2osX.ASCREEN
|
2018-07-05 15:39:36 +00:00
|
|
|
|
DRV.SYS.CLOSE
|
2016-10-07 15:28:17 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-09 15:25:38 +00:00
|
|
|
|
DRV.SYS.Read lda A2osX.ASCREEN
|
2018-06-20 15:02:09 +00:00
|
|
|
|
cmp #2 is SYS active?
|
2016-10-07 15:28:17 +00:00
|
|
|
|
bne .9
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
lda OPENAPPLE
|
|
|
|
|
bmi .9 Open apple key, not for us...
|
|
|
|
|
lda KBD
|
|
|
|
|
bpl .9
|
|
|
|
|
sta KBDSTROBE
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
and #$7F
|
2017-02-08 16:42:32 +00:00
|
|
|
|
|
2018-07-05 15:39:36 +00:00
|
|
|
|
tax
|
|
|
|
|
jmp DRV.READ.X
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
.9 lda #0 Error = no event
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-09 15:25:38 +00:00
|
|
|
|
DRV.SYS.WRITE ldy #S.IOCTL.BUFPTR
|
2018-07-05 15:39:36 +00:00
|
|
|
|
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
|
|
|
|
|
|
2018-07-13 14:38:24 +00:00
|
|
|
|
.3 lda (ZPDRV+4)
|
2018-07-05 15:39:36 +00:00
|
|
|
|
inc ZPDRV+4
|
|
|
|
|
bne .4
|
|
|
|
|
inc ZPDRV+5
|
|
|
|
|
|
|
|
|
|
.4 jsr DRV.SYS.COUT
|
|
|
|
|
|
|
|
|
|
.5 bra .2
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.SYS.COUT phx
|
2016-10-07 15:28:17 +00:00
|
|
|
|
phy
|
|
|
|
|
cmp #' '
|
2018-07-19 15:33:55 +00:00
|
|
|
|
bcs .1
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
jsr DRV.SYS.CTRL
|
2016-10-07 15:28:17 +00:00
|
|
|
|
bra .8
|
2017-11-22 16:27:50 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
.1 ora #$80
|
2018-06-20 15:02:09 +00:00
|
|
|
|
ldy DRV.SYS.CH
|
|
|
|
|
ldx DRV.SYS.CV
|
|
|
|
|
jsr DRV.SYS.SetCharAtYX
|
2018-07-19 15:33:55 +00:00
|
|
|
|
jsr DRV.SYS.FS
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
.8 ply
|
|
|
|
|
plx
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.SYS.CTRL ldx #DRV.SYS.CTRLCNT-1
|
|
|
|
|
|
|
|
|
|
.1 cmp DRV.SYS.CTRLS,x
|
|
|
|
|
beq .2
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.2 txa
|
|
|
|
|
asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (.3,x)
|
|
|
|
|
|
|
|
|
|
.3 .DA DRV.SYS.ENQ 5
|
|
|
|
|
.DA DRV.SYS.BS 8
|
|
|
|
|
.DA DRV.SYS.LF 10
|
|
|
|
|
.DA DRV.SYS.FF 12
|
|
|
|
|
.DA DRV.SYS.CR 13
|
|
|
|
|
.DA DRV.SYS.FS 21
|
|
|
|
|
.DA DRV.SYS.ESC 27
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.SYS.ENQ clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.SYS.BS ldx DRV.SYS.CH
|
|
|
|
|
beq .1
|
|
|
|
|
dec DRV.SYS.CH
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.1 ldy DRV.SYS.CV
|
|
|
|
|
cpy #1
|
|
|
|
|
bne .2
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.2 lda #79
|
|
|
|
|
sta DRV.SYS.CH
|
|
|
|
|
dec DRV.SYS.CV
|
|
|
|
|
|
|
|
|
|
.3 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.SYS.LF ldx DRV.SYS.CV
|
|
|
|
|
cpx #23
|
|
|
|
|
beq DRV.SYS.Scroll
|
|
|
|
|
inc DRV.SYS.CV
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.SYS.FF ldx #23
|
|
|
|
|
|
|
|
|
|
.1 jsr DRV.SYS.ClrLineAtX
|
|
|
|
|
dex
|
2017-02-28 16:58:36 +00:00
|
|
|
|
bne .1
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2018-06-20 15:02:09 +00:00
|
|
|
|
stz DRV.SYS.CH
|
2018-07-19 15:33:55 +00:00
|
|
|
|
lda #1
|
|
|
|
|
sta DRV.SYS.CV
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.CR jsr DRV.SYS.ClrEOL
|
|
|
|
|
stz DRV.SYS.CH
|
2017-02-28 16:58:36 +00:00
|
|
|
|
rts
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.SYS.FS lda DRV.SYS.CH
|
|
|
|
|
cmp #79
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
stz DRV.SYS.CH
|
|
|
|
|
bra DRV.SYS.LF
|
|
|
|
|
|
|
|
|
|
.1 inc DRV.SYS.CH
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.SYS.ESC
|
|
|
|
|
|
|
|
|
|
clc
|
2016-10-07 15:28:17 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.ClrEOL ldx DRV.SYS.CV
|
2016-10-07 15:28:17 +00:00
|
|
|
|
lda #$A0
|
2018-06-20 15:02:09 +00:00
|
|
|
|
ldy DRV.SYS.CH
|
2016-10-07 15:28:17 +00:00
|
|
|
|
.1 cpy #79
|
|
|
|
|
beq .2
|
2018-06-20 15:02:09 +00:00
|
|
|
|
jsr DRV.SYS.SetCharAtYX
|
2016-10-07 15:28:17 +00:00
|
|
|
|
iny
|
|
|
|
|
bne .1
|
|
|
|
|
.2 rts
|
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.ScrollAux
|
2017-11-23 16:51:52 +00:00
|
|
|
|
sta SETREADAUX
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPDRV+2),y
|
|
|
|
|
sta (ZPDRV),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-16 05:52:52 +00:00
|
|
|
|
DRV.SYS.Scroll ldx #DRV.SYS.Scroll-DRV.SYS.ScrollAux-1
|
|
|
|
|
|
|
|
|
|
.1 lda DRV.SYS.ScrollAux,x
|
|
|
|
|
sta $102,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
ldx #1
|
|
|
|
|
|
|
|
|
|
.2 jsr DRV.SYS.SetBaseX
|
2017-11-22 16:27:50 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
inx
|
2018-06-20 15:02:09 +00:00
|
|
|
|
lda DRV.SYS.BASEL,x
|
2016-10-07 15:28:17 +00:00
|
|
|
|
sta ZPDRV+2
|
2018-06-20 15:02:09 +00:00
|
|
|
|
lda DRV.SYS.BASEH,x
|
2016-10-07 15:28:17 +00:00
|
|
|
|
sta ZPDRV+3
|
|
|
|
|
|
2017-11-23 16:51:52 +00:00
|
|
|
|
ldy #39
|
|
|
|
|
|
2017-11-22 16:27:50 +00:00
|
|
|
|
sta SETWRITEAUX
|
2017-11-23 16:51:52 +00:00
|
|
|
|
jsr $102
|
2017-11-22 16:27:50 +00:00
|
|
|
|
sta CLRWRITEAUX
|
2016-10-07 15:28:17 +00:00
|
|
|
|
|
2017-02-07 07:27:27 +00:00
|
|
|
|
ldy #39
|
2017-11-21 16:27:07 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
.3 lda (ZPDRV+2),y
|
|
|
|
|
sta (ZPDRV),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .3
|
|
|
|
|
|
|
|
|
|
cpx #23
|
2018-07-16 05:52:52 +00:00
|
|
|
|
bne .2 Fall in ClrLineAtX for last line
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.ClrLineAtX
|
|
|
|
|
jsr DRV.SYS.SetBaseX
|
2017-02-07 07:27:27 +00:00
|
|
|
|
|
2017-11-21 16:27:07 +00:00
|
|
|
|
lda #$A0
|
|
|
|
|
ldy #39
|
|
|
|
|
|
2017-11-22 16:27:50 +00:00
|
|
|
|
.1 sta SETWRITEAUX
|
2016-10-07 15:28:17 +00:00
|
|
|
|
sta (ZPDRV),y
|
2017-11-22 16:27:50 +00:00
|
|
|
|
sta CLRWRITEAUX
|
2016-10-07 15:28:17 +00:00
|
|
|
|
sta (ZPDRV),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
2017-11-21 16:27:07 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.SetCharAtYX
|
2016-10-07 15:28:17 +00:00
|
|
|
|
cmp #$40
|
|
|
|
|
bcc .1
|
|
|
|
|
cmp #$5F
|
|
|
|
|
bcs .1
|
|
|
|
|
and #$3F
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-11-05 21:23:21 +00:00
|
|
|
|
.1 phy
|
2016-10-07 15:28:17 +00:00
|
|
|
|
pha
|
2018-06-20 15:02:09 +00:00
|
|
|
|
jsr DRV.SYS.SetBaseX
|
2016-10-07 15:28:17 +00:00
|
|
|
|
tya
|
|
|
|
|
lsr
|
|
|
|
|
tay
|
2017-11-21 16:27:07 +00:00
|
|
|
|
|
2017-11-05 21:23:21 +00:00
|
|
|
|
pla
|
|
|
|
|
|
2017-11-21 16:27:07 +00:00
|
|
|
|
bcs .2
|
|
|
|
|
|
2017-11-22 16:27:50 +00:00
|
|
|
|
sta SETWRITEAUX
|
2016-10-07 15:28:17 +00:00
|
|
|
|
sta (ZPDRV),y
|
2017-11-22 16:27:50 +00:00
|
|
|
|
sta CLRWRITEAUX
|
2018-06-25 05:59:43 +00:00
|
|
|
|
|
2017-11-05 21:23:21 +00:00
|
|
|
|
ply
|
|
|
|
|
rts
|
|
|
|
|
|
2017-11-21 16:27:07 +00:00
|
|
|
|
.2 sta (ZPDRV),y
|
2017-11-05 21:23:21 +00:00
|
|
|
|
ply
|
2016-10-07 15:28:17 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.SetBaseX
|
|
|
|
|
lda DRV.SYS.BASEL,x
|
2017-11-22 16:27:50 +00:00
|
|
|
|
sta ZPDRV
|
2018-06-20 15:02:09 +00:00
|
|
|
|
lda DRV.SYS.BASEH,x
|
2017-11-22 16:27:50 +00:00
|
|
|
|
sta ZPDRV+1
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.SYS.DIB .DA #S.DIB.S.WRITE+S.DIB.S.READ+S.DIB.S.OPENED
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.DA #0,#0,#0
|
|
|
|
|
>PSTR "A2osX SYS Screen"
|
2018-07-19 15:33:55 +00:00
|
|
|
|
.DA #S.DIB.T.CHAR
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.DA #0
|
|
|
|
|
.DA KVER
|
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
DRV.SYS.CH .BS 1
|
|
|
|
|
DRV.SYS.CV .BS 1
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-20 15:02:09 +00:00
|
|
|
|
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
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DRV.SYS.CTRLCNT .EQ 7
|
|
|
|
|
DRV.SYS.CTRLS .HS 05080A0C0D151B
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.STATUS.YA >STYA .2+1
|
|
|
|
|
|
|
|
|
|
ldy #S.IOCTL.STATCODE
|
|
|
|
|
lda (pIOCTL),y
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
cmp #S.IOCTL.STATCODE.GETDIB
|
|
|
|
|
bne .9
|
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
ldx #S.DIB-1
|
2018-07-06 14:42:20 +00:00
|
|
|
|
.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 $ffff,x SELF MODIFIED
|
|
|
|
|
.3 sta $ffff,x SELF MODIFIED
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 lda #MLI.E.BADCTL
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-05 15:39:36 +00:00
|
|
|
|
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
|
|
|
|
|
*--------------------------------------
|
2016-10-07 15:28:17 +00:00
|
|
|
|
MAN
|
2018-06-18 15:48:00 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.DRV
|
2017-03-29 15:48:15 +00:00
|
|
|
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
2016-10-07 15:28:17 +00:00
|
|
|
|
ASM
|