-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathserlistn.src
145 lines (102 loc) · 3.11 KB
/
serlistn.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
.page
.subttl 'serlistn.src'
acptr lda #8 ; set byte bit count
sta cont
acp00a jsr tstatn
jsr debnc
and #clkin
bne acp00a
jsr dathi ; make data line hi
lda #1 ; wait 255 us
;------rom -05 8/18/83-------------
jmp patch6
;----------------------------------
acp00 jsr tstatn
lda ifr1
and #$40 ; test if time out
bne acp00b ; ran out,its an eoi
jsr debnc ; test clock low
and #clkin
beq acp00 ; no
bne acp01 ; yes
acp00b jsr datlow ; set data line low as response
ldx #10 ; delay for talker turnaround
acp02 dex
bne acp02
jsr dathi ; set data line hi
acp02a jsr tstatn
jsr debnc ; wait for low clock
and #clkin
beq acp02a
lda #0 ; set eoi received
sta eoiflg
acp01
acp03 lda pb ; wait for clock high
eor #01 ; complement datain
lsr a ; shift into carry
and #$02 ; clkin/2
bne acp03
nop ; fill space left by speed-up
nop ; to fix pal vc20
nop ; 901229-02 rom
ror data
acp03a jsr tstatn
jsr debnc
and #clkin ; wait for clock low
beq acp03a
dec cont ; more to do?
bne acp03
jsr datlow ; set data line low
lda data
rts
listen sei
jsr fndwch ; test if active write channel
bcs lsn15
lda chnrdy,x
ror a
bcs lsn30
lsn15 lda orgsa ; test if open
and #$f0
cmp #$f0
beq lsn30 ; its an open
jmp ilerr ; not active channel
lsn30 jsr acptr ; get a byte
cli
jsr put ; put(data,eoiflg,sa)
jmp listen ; and keep on listen
frmerr
iterr
ilerr lda #00 ; release all bus lines
sta pb
jmp xidle
atnlow jmp atnsrv
; tstatn()
; {
; if(atnmod)
; {
; if(pb & $80)
; { if 1571 then jatns20() else atns20
; }
; else return
; }
; else
; {
; if(pb&$80) return
; else
; { if 1571 then jatnsrv() else atnsrv()
; }
; }
; }
tstatn lda atnmod ; test if in atn mode
beq tsta50 ; no
lda pb ; in atnmod
bpl tatn20 ; atn gone,do what we are told to do
tstrtn rts ; still in atn mode
tsta50 lda pb ; not atnmode
bpl tstrtn ; no atn present
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
jmp ptch30 ; *** rom ds 03/12/85 ***
; jmp atnsrv ; do atn command
tatn20 jmp ptch45 ; *** rom ds 03/12/85 ***
; jmp atns20
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>