-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathrl1.src
More file actions
128 lines (128 loc) · 2.89 KB
/
rl1.src
File metadata and controls
128 lines (128 loc) · 2.89 KB
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
;11/28/83 ds
;***********************************
;*
;* 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