-
Notifications
You must be signed in to change notification settings - Fork 85
/
autoit
48 lines (48 loc) · 968 Bytes
/
autoit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PAGE 'AUTOIT'
;RSR TEST SUBROUTINES
;
; THIS AUTO INIT SUBROUTINE WILL
; CHECK IF DRVNUM DRIVE IS INITED
;
; IF CATALOG CALLS THIS ROUTINE
; BEFORE ANY HEADER INFO IS TRANSFERED
; THIS ROUTINE WORKS.
;
; THIS ROUTINE WILL END IN ERROR
; IF ANY ERROR BUT DISK ID OCCURS
;
AUTOIT LDX #$FF ;FLAG FOR ERROR RTN
STX JOBRTN
JSR INITSU ;.A=DRVNUM< >=ERROR
CMP #03 ;CHK MISSING DISK
BEQ CATID3
CATID5 CMP #2 ;CHK FOR OKAY
BCC CATID4
CATID2 JMP ERROR ;MUST BE AN ERROR
CATID3 LDY DRVCNT ;CHK FOR SINGLE
BEQ CATID2
LDA #0 ;ONLY ONE GOOD DRIVE?
STA DRVCNT
LDA DRVNUM ;FLIP TO CHK OTHER DRV
EOR #1
STA DRVNUM
JMP AUTOIT
;
CATID4 TXA ;X PRESERVED
ASL A ;MULT *8
ASL A
ASL A
TAY
LDA DRVNUM
ASL A
TAX
LDA HDRS,Y ;CHK DISK ID
CMP DSKID,X ;AGAINST OLD ID
BNE CATID1
LDA HDRS+1,Y
CMP DSKID+1,X
BNE CATID1
RTS ;SAME ID
CATID1 JMP INITDR ;DIFF SO INIT
;
.END