-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathrel1.src
92 lines (77 loc) · 2.47 KB
/
rel1.src
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
.messg "rel1"
.subttl "rel1"
.page
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 ; clr overflow flg
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
.pag
nrbuf 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 jsr rdlnk ; read trk,sec link
lda track ; test if last buffer
beq nrbu20 ; yes,no dbl buff todo
jsr dblbuf ; start read job on the
jsr rdab ; inactive buffer
jmp dblbuf ; (rts)
nrbu20 rts