-
Notifications
You must be signed in to change notification settings - Fork 85
/
ser.listn
144 lines (144 loc) · 2.33 KB
/
ser.listn
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
.PAGE 'SER.LISTN'
;
;
;
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 IDLE
;
;
;
ATNLOW JMP ATNSRV
;
;
; TSTATN()
; [
; IF(ATNMOD)
; [
; IF(PB & $80) ATNS20();
; ELSE RETURN ;
; ]
; ELSE
; [
; IF(PB&$80) RETURN;
; 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 ATNS20
;
;
;
.END