MacIIROMDiskDriver/entry.s

85 lines
1.3 KiB
ArmAsm
Raw Normal View History

2020-06-26 07:12:08 +00:00
.EQU killCode, 1
.EQU noQueueBit, 9
.EQU kioTrap, 6
.EQU kioResult, 16
.EQU kcsCode, 26
.EQU JIODone, 0x08FC
2021-03-04 17:43:34 +00:00
.GLOBAL RDiskSig
.GLOBAL RDiskDBGNamePos
.GLOBAL RDiskDBGDisPos
.GLOBAL RDiskDBGDisByte
2021-04-02 02:05:21 +00:00
.GLOBAL RDiskCDRNamePos
.GLOBAL RDiskCDRDisPos
.GLOBAL RDiskCDRDisByte
2020-06-26 07:12:08 +00:00
2020-06-30 01:08:50 +00:00
dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000
dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000
2021-03-04 17:43:34 +00:00
RDiskSig:
2020-07-02 07:06:35 +00:00
.ascii "\5RDisk\0"
2020-06-30 01:08:50 +00:00
.align 4
2021-03-04 17:43:34 +00:00
RDiskDBGDisPos:
dc.l 0x00000031
2021-04-02 02:05:21 +00:00
RDiskCDRDisPos:
dc.l 0x00012CAF
2021-04-02 00:15:18 +00:00
RDiskDBGNameAddr:
2021-03-04 17:43:34 +00:00
dc.l 0x4088002A
2021-04-02 02:05:21 +00:00
RDiskCDRNameAddr:
2021-03-04 17:43:34 +00:00
dc.l 0x40892C96
RDiskDBGDisByte:
dc.b 0x44
2021-04-02 02:05:21 +00:00
RDiskCDRDisByte:
2021-03-04 17:43:34 +00:00
dc.b 0x44
2021-03-05 15:07:48 +00:00
RDiskRAMRequired:
.ascii "16"
2020-06-30 01:08:50 +00:00
2021-03-04 17:43:34 +00:00
.align 4
2020-06-26 07:12:08 +00:00
DOpen:
2020-06-30 01:08:50 +00:00
movem.l %A0-%A1, -(%SP)
bsr RDOpen
2020-06-30 01:08:50 +00:00
movem.l (%SP)+, %A0-%A1
2020-06-26 07:12:08 +00:00
rts
DClose:
2020-06-30 01:08:50 +00:00
movem.l %A0-%A1, -(%SP)
bsr RDClose
2020-06-30 01:08:50 +00:00
movem.l (%SP)+, %A0-%A1
2020-06-26 07:12:08 +00:00
rts
DPrime:
2020-06-30 01:08:50 +00:00
movem.l %A0-%A1, -(%SP)
bsr RDPrime
2020-06-30 01:08:50 +00:00
movem.l (%SP)+, %A0-%A1
2020-06-26 07:12:08 +00:00
bra.b IOReturn
DControl:
2020-06-30 01:08:50 +00:00
movem.l %A0-%A1, -(%SP)
bsr RDCtl
2020-06-30 01:08:50 +00:00
movem.l (%SP)+, %A0-%A1
2020-06-26 07:12:08 +00:00
cmpi.w #killCode, kcsCode(%A0)
bne.b IOReturn
rts
DStatus:
2020-06-30 01:08:50 +00:00
movem.l %A0-%A1, -(%SP)
bsr RDStat
2020-06-30 01:08:50 +00:00
movem.l (%SP)+, %A0-%A1
2020-06-26 07:12:08 +00:00
IOReturn:
2020-06-30 01:08:50 +00:00
move.w kioTrap(%A0), %D1
btst #noQueueBit, %D1
2020-06-26 07:12:08 +00:00
beq.b Queued
NotQueued:
tst.w %D0
ble.b ImmedRTS
clr.w %D0
ImmedRTS:
2020-06-30 01:08:50 +00:00
move.w %D0, kioResult(%A0)
2020-06-26 07:12:08 +00:00
rts
Queued:
2020-06-30 01:08:50 +00:00
move.l JIODone, -(%SP)
2020-06-26 07:12:08 +00:00
rts