2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
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
|
2018-12-21 14:32:45 +00:00
|
|
|
|
bcs DRV.RamDrive.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
|
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
|
2018-12-10 16:45:37 +00:00
|
|
|
|
>PSTR "Disk ][ 5.25"
|
2017-10-18 15:32:56 +00:00
|
|
|
|
.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-08-25 11:23:59 +00:00
|
|
|
|
.DA K.VER
|
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
|
2018-12-21 14:32:45 +00:00
|
|
|
|
bcs DRV.RamDrive.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-12-21 14:32:45 +00:00
|
|
|
|
DRV.RamDrive.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-08-25 11:23:59 +00:00
|
|
|
|
.DA K.VER
|
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
|
2018-12-21 14:32:45 +00:00
|
|
|
|
bcs DRV.RamDrive.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
|
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
|
2018-08-25 11:23:59 +00:00
|
|
|
|
.DA K.VER
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
* IOCTL to BLK protocol converter
|
2019-05-06 12:58:15 +00:00
|
|
|
|
* in : pIOCTL
|
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
|
2019-05-06 12:58:15 +00:00
|
|
|
|
>STYA pIOCTL
|
|
|
|
|
>STYA .3 smartport Params
|
2018-07-06 14:42:20 +00:00
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
lsr
|
2019-05-06 12:58:15 +00:00
|
|
|
|
sta .2
|
2018-07-06 14:42:20 +00:00
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda DRV.SmartPort.Cnt,x
|
2019-05-06 12:58:15 +00:00
|
|
|
|
sta (pIOCTL) CmdList
|
2018-07-06 14:42:20 +00:00
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
ldy #S.FD.DEV.BUSPTR
|
|
|
|
|
lda (pFD),y
|
2019-05-06 12:58:15 +00:00
|
|
|
|
sta .1+1
|
2017-03-21 16:29:15 +00:00
|
|
|
|
iny
|
2018-07-10 15:33:13 +00:00
|
|
|
|
lda (pFD),y
|
2019-05-06 12:58:15 +00:00
|
|
|
|
sta .1+2
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2019-05-06 12:58:15 +00:00
|
|
|
|
.1 jsr $ffff
|
|
|
|
|
.2 .BS 1
|
|
|
|
|
.3 .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-12-21 14:32:45 +00:00
|
|
|
|
txa
|
|
|
|
|
beq DRV.NULL.STATUS
|
|
|
|
|
jmp (.1-12,x)
|
2018-06-20 15:02:09 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-21 14:32:45 +00:00
|
|
|
|
.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
|
2018-07-05 15:39:36 +00:00
|
|
|
|
.DA DRV.NULL.OPEN
|
|
|
|
|
.DA DRV.NULL.CLOSE
|
|
|
|
|
.DA DRV.NULL.READ
|
|
|
|
|
.DA DRV.NULL.WRITE
|
2016-10-07 15:28:17 +00:00
|
|
|
|
*--------------------------------------
|
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-12-21 14:32:45 +00:00
|
|
|
|
>PSTR "NULL Device"
|
2018-06-18 06:22:50 +00:00
|
|
|
|
.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-08-25 11:23:59 +00:00
|
|
|
|
.DA K.VER
|
2017-01-25 21:46:40 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-21 14:32:45 +00:00
|
|
|
|
DRV.NULL.STATUS >LDYAI DRV.NULL.DIB
|
|
|
|
|
*--------------------------------------
|
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-12-21 14:32:45 +00:00
|
|
|
|
DRV.NULL.READ ldx #C.EOF
|
|
|
|
|
*--------------------------------------
|
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
|
2018-12-21 14:32:45 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.NULL.OPEN
|
|
|
|
|
DRV.NULL.WRITE
|
|
|
|
|
DRV.NULL.CLOSE clc
|
2018-07-05 15:39:36 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-07 15:28:17 +00:00
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.DRV
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
2016-10-07 15:28:17 +00:00
|
|
|
|
ASM
|