-
Notifications
You must be signed in to change notification settings - Fork 82
/
tstflg
92 lines (92 loc) · 1.29 KB
/
tstflg
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.PAGE 'TSTFLG'
;*
;*
;**********************************
;*
;* SCFLG
;* SETFLG
;* CLRFLG
;* TSTFLG
;*
;*********************************
;*
;*
SCFLG BCC CLRFLG
;
SETFLG LDX LINDX
ORA FILTYP,X
BNE CLRF10
;
CLRFLG LDX LINDX
EOR #$FF
AND FILTYP,X
CLRF10 STA FILTYP,X
RTS
;
;
TSTFLG LDX LINDX
AND FILTYP,X
RTS
;
;*
;*
;******************************
;*
;*
;* TSTWRT
;*
;******************************
;*
;*
TSTWRT JSR GETACT
TAX
LDA LSTJOB,X
AND #$F0
CMP #$90
RTS
;*
;*
.PAGE 'TEST CHANNEL'
;
; TEST FOR ACTIVE FILES FROM
; LINDX TABLE
;
; C=1 FILE NOT ACTIVE X=18,Y=?,A=?
; C=0 FILE ACTIVE X=ENTFND,Y=LINDX,A=?
;
;
TSTCHN LDX #0 ;START SEARCH AT TOP
TSTC20 STX TEMP+2 ;SAVE TO LOOK ON
LDA LINTAB,X ;GET LINDX
CMP #$FF
BNE TSTC40 ;IF PLUS TEST IT
TSTC30 LDX TEMP+2 ;NOT ACTIVE
INX
CPX #MAXSA-2 ;SEARCHED ALL
BCC TSTC20 ;NO
TSTRTS RTS ;YES
;
;
TSTC40 STX TEMP+2 ;SAVE X
AND #$3F
TAY ;USE LINDX AS INDEX
LDA FILTYP,Y ;RIGHT DRIVE # ?
AND #1
STA TEMP+1
LDX ENTFND ;INDEX ENTRY FOUND
LDA FILDRV,X
AND #1
CMP TEMP+1 ;SAME DRIVE # ?
BNE TSTC30 ;NO
LDA DSEC,Y ;YES - SAME DIR. ENTRY ?
CMP ENTSEC,X
BNE TSTC30 ;NO
LDA DIND,Y
CMP ENTIND,X
BNE TSTC30 ;NO
CLC ;SET FLAG
RTS
;
;
;
.END