-
Notifications
You must be signed in to change notification settings - Fork 84
/
rel1
130 lines (130 loc) · 1.95 KB
/
rel1
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.PAGE 'REL1'
;***********************************
;*
;* ROUTINE: NXTREC
;*
;*
;*
;*
;*
;***********************************
NXTREC
LDA #OVRFLO
JSR CLRFLG
;
LDA #LRF
JSR TSTFLG
BNE NXTR40
;
LDX LINDX
INC RECL,X ; GOTO NEXT RECORD #
BNE NXTR15
INC RECH,X
;
NXTR15
LDX LINDX
LDA NR,X
BEQ NXTR45 ;THERE IS A NR
;
JSR GETPNT ; GET POINTER
LDX LINDX ;TEST IF SAME BUFFER
CMP NR,X
BCC NXTR20 ; YES, BT<NR
;
JSR NRBUF ; NO,NEXT BUFFER
;
NXTR20 LDX LINDX
LDA NR,X
JSR SETPNT ;ADVANCE TO NEXT REC
LDA (BUFTAB,X) ;READ 1ST DAT BYTE
;
STA DATA ;SAVE FOR READ CHANNEL
LDA #OVRFLO
JSR CLRFLG ; CLEAR
; THE OVERFLOW FLAG
JSR ADDNR ;ADVANCE NR
NXOUT
PHA
BCC NXTR30 ;NO BLOCK BOUNDARY
;
LDA #0
JSR DRDBYT ;CHECK TRACK LINK
BNE NXTR30 ;NOT LAST BLOCK
;
PLA
CMP #2
BEQ NXTR50
NXTR45
LDA #LRF
JSR SETFLG
NXTR40
JSR GETPRE
LDA BUFTAB,X
STA LSTCHR,Y
LDA #CR
STA DATA
RTS
;
NXTR50
JSR NXTR35
LDX LINDX
LDA #0
STA NR,X
RTS
NXTR30
PLA
NXTR35
LDX LINDX
;*
STA NR,X
JMP SETLST
;*
;*
;**********************************
;*
;*
;* NRBUF
;*
;*
;********************************
;*
;*
NRBUF ;READ TRK,SEC LINK
JSR SETDRN
JSR RDLNK
;
;
JSR GAFLGS ; TEST IF DIRTY
BVC NRBU50 ;CLEAN, DONT WRITE OUT
;
JSR WRTOUT ;DIRTY, WRITE OUT
JSR DBLBUF ;TOGGLE ACTIVE BUFFER
;
LDA #2
JSR SETPNT
JSR TSTWRT ;TEST IF LSTJOB IS WRT
BNE NRBU20 ;NOT A WRITE,BUFFER OK
;
JSR RDAB ;READ IN NEEDED BUFFER
JMP WATJOB ;WAIT AROUND TILL DONE
;
NRBU50 JSR DBLBUF ;TOGGLE ACT BUF
JSR TSTWRT ;WAS LSTJOB A WRT?
BNE NRBU70 ;NOT A WRITE
;
JSR RDAB ;READ IN NEEDED BUFFER
JSR WATJOB ;WAIT TILL DONE
;
NRBU70 ;READ TRK,SEC LINK
JSR RDLNK ; TO DO A READ AHEAD
;
LDA TRACK ;TEST IF LAST BUFFER
BEQ NRBU20 ;YES,NO DBL BUFF TODO
;
JSR DBLBUF ;START READ JOB ON THE
JSR RDAB ;INACTIVE BUFFER
JSR DBLBUF
;
NRBU20 RTS
;
.END