-
Notifications
You must be signed in to change notification settings - Fork 85
/
sstest
51 lines (51 loc) · 916 Bytes
/
sstest
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
.PAGE 'SSTEST'
;
;*********************************
;* SSTEST: TEST SSNUM & SSIND FOR*
;* RESIDENCE & RANGE. *
;* VARS: SSNUM,SSIND,DIRBUF *
;* *
;* FLAGS: .N RNG .V RES ER *
;* 0 OK 0 YES ER0 *
;* 0 MAYBE 1 NO ER1 *
;* 1 NO 0 YES ER2 *
;* 1 NO 1 NO ER3 *
;*********************************
;
SSTEST
JSR BIGREL ; BIG RELATIVE FILE?
BNE ST50 ; NO
LDA GRPNUM
JSR RDSS1
BEQ ST50
BIT ER3
RTS
ST50
JSR SSSET ; SET POINTER & SS #
CMP SSNUM
BNE ST20 ; NOT THIS SS
LDY SSIND
LDA (DIRBUF),Y
BEQ ST10
BIT ER0 ;OK, RESIDENT
RTS
ST10
BIT ER2 ; OUT OF RANGE, RES
RTS
ST20
LDA SSNUM
CMP #NSSL
BCS ST30
ASL A
TAY
LDA #4
STA DIRBUF
LDA (DIRBUF),Y
BNE ST40
ST30
BIT ER3 ; WAY OUT OF RANGE
RTS
ST40
BIT ER1 ; NOT RES, RANGE???
RTS
.END