annotate level1/cmds/irqs.asm @ 1046:65cc7c2e43df

Added drvr51
author boisy
date Sun, 16 Mar 2003 14:19:49 +0000
parents 7cecd837bcab
children 84ea83668304
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
963
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
1 ********************************************************************
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
2 * irqs - Show interrupt polling table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
3 *
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
4 * $Id$
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
5 *
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
8 * 1 Created KKD
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
9 * 2 Modified GH
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
10 * 3 Streamlined and fixed problems BGP 03/01/07
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
11
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
12 nam irqs
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
13 ttl Show interrupt polling table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
14
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
15 ifp1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
16 use defsfile
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
17 endc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
18
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
19 rev set $01
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
20 edition set 3
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
21
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
22 MaxDEnts set 32 max device entries we will display
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
23 MaxPEnts set 32 max polling entries we will display
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
24
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
25 mod emod,name,prgrm+objct,reent+rev,start,endmem
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
26
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
27 org 0
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
28 usaver rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
29 narrow rmb 1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
30 polcount rmb 1 number of polling entries in polling table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
31 devcount rmb 1 number of device entries in device table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
32 datptr rmb 2 pointer to DAT image in system proc descriptor
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
33 notuse rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
34 outptr rmb 2 points to next available char in buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
35 counter rmb 1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
36 devptr rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
37 tblptr rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
38 dpvars rmb 9
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
39 rptbuf rmb 80
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
40 ddevtbl rmb 2 copy of D.DevTbl in globals
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
41 dpoltbl rmb 2 copy of D.PolTbl in globals
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
42 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
43 poltable rmb 32*POLSIZ
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
44 devtable rmb 32*DEVSIZ
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
45 modulep rmb 256
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
46 syspdesc rmb P$Size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
47 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
48 sstack rmb 200
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
49 endmem equ .
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
50
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
51 name fcs "irqs"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
52 fcb edition
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
53
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
54 PollHdr fcc "Polling Table at: "
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
55 PollHdrL equ *-PollHdr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
56 Device fcc " Device Table at: "
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
57 DeviceL equ *-Device
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
58 NTopline fcc " Device Drvr IRQ Flip"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
59 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
60 NToplineL equ *-NTopline
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
61 NLine2 fcc "Port Mem Name Vect Mask Pr"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
62 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
63 NLine2L equ *-NLine2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
64 NLine3 fcc "---- ---- ----------- ---- --"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
65 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
66 NLine3L equ *-NLine3
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
67 Topline fcc " Device Driver IRQ Flip "
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
68 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
69 ToplineL equ *-Topline
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
70 Line2 fcc "Port Mem Name Vector &Mask Pty"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
71 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
72 Line2L equ *-Line2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
73 Line3 fcc "---- ---- ------------ ----- ---"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
74 crtn fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
75 Line3L equ *-Line3
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
76 Init fcs /Init/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
77
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
78 start stu <usaver at 0000 in direct page
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
79 * First things first: get Polling Table and Device Table counts in the
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
80 * Init module
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
81 lda #MaxDEnts get max dev ents
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
82 sta <devcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
83 lda #MaxPEnts get max poll ents
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
84 sta <polcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
85 clra module type/lang byte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
86 leax Init,pcr point to name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
87 os9 F$Link link to it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
88 bcs errexit branch if error
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
89 ldd PollCnt,u get poll count in A, dev count in B
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
90 os9 F$UnLink unlink it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
91 ldu <usaver
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
92 cmpa <polcount is actual size greater or equal than our max?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
93 bge chkdev branch if so
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
94 sta <polcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
95 chkdev cmpb <devcount is actual size greater or equal than our max?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
96 bge cont branch if so
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
97 stb <devcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
98 cont clr <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
99 lda #$01
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
100 ldb #SS.ScSiz
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
101 os9 I$GetStt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
102 bcs cont2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
103 cmpx #Line3L+1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
104 bge cont2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
105 sta <narrow we're narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
106 cont2 leax >crtn,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
107 ldy #$0001
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
108 os9 I$WritLn write a carriage return
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
109 bcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
110 leax >PollHdr,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
111 ldy #PollHdrL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
112 os9 I$Write write polling table header
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
113 bcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
114 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
115 lda #$01 process ID #1 - system process
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
116 leax syspdesc,u point to buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
117 os9 F$GPrDsc get a copy of it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
118 bcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
119 leax P$DatImg,x point to DAT image
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
120 stx <datptr save off pointer for later
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
121 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
122 bra z00C5
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
123 okexit clrb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
124 errexit os9 F$Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
125 z00C5 leay rptbuf,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
126 sty <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
127 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
128 leau ddevtbl,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
129 ldd <datptr get ptr P$datimg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
130 ldx #D.DevTbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
131 ldy #$0004 include D.Poltbl 4 bytes to copy
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
132 os9 F$CpyMem get the two globals
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
133 bcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
134 ldu <usaver restore u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
135 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
136 ldd >D.DevTbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
137 std <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
138 ldd >D.PolTbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
139 std <dpoltbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
140 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
141 ldd <dpoltbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
142 lbsr OutHex cnvrt 4 dgts of poll tbl addr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
143 lbsr z01B1 output poll tbl address in ASCII
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
144 * troubleshooting printout
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
145 leax >Device,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
146 ldy #DeviceL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
147 lda #1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
148 os9 I$Write
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
149 leax rptbuf,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
150 stx <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
151 ldd <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
152 lbsr OutHex
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
153 lbsr z01B1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
154 * to here
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
155 lda #1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
156 leax >crtn,pcr stick another \n on it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
157 ldy #$0001
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
158 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
159 bcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
160 leax >Topline,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
161 ldy #ToplineL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
162 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
163 beq branch1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
164 leax >NTopline,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
165 ldy #NToplineL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
166 branch1 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
167 bcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
168 leax >Line2,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
169 ldy #Line2L
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
170 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
171 beq branch2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
172 leax >NLine2,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
173 ldy #NLine2L
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
174 branch2 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
175 bcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
176 leax >Line3,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
177 ldy #Line3L
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
178 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
179 beq branch3
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
180 leax >NLine3,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
181 ldy #NLine3L
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
182 branch3 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
183 lbcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
184 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
185 * Copy polling table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
186 lda <polcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
187 ldb #POLSIZ
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
188 mul
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
189 tfr d,y
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
190 ldx <dpoltbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
191 ldd <datptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
192 leau poltable,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
193 os9 F$CpyMem
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
194 ldu <usaver
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
195 lbcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
196 * Copy device table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
197 lda <devcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
198 ldb #DEVSIZ
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
199 mul
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
200 tfr d,y
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
201 ldx <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
202 ldd <datptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
203 leau devtable,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
204 os9 F$CpyMem
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
205 ldu <usaver
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
206 lbcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
207 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
208
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
209 * Go through IRQ polling table until we find a non-empty slot or the end
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
210 ldb <polcount get polling count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
211 stb <counter save off in our counter variable
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
212 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
213 leax poltable,u point X to polling table we copied
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
214 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
215 ldx <dpoltbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
216 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
217 z0165 ldd Q$STAT,x get static pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
218 beq z016B branch if empty
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
219 bsr ShowIRQ else process it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
220 z016B dec <counter decrement couunter
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
221 lbeq okexit exit if end
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
222 leax POLSIZ,x else advance X
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
223 bra z0165 and get some more
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
224
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
225 * Here we process the IRQ polling entry at X
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
226 ShowIRQ leay rptbuf,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
227 sty <outptr reset output buffer pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
228 ldd Q$POLL,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
229 lbsr OutHex convert 2 bytes port addr->ascii
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
230 ldd Q$STAT,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
231 lbsr OutHex convert 2 bytes memsiz->ascii
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
232 lbsr OutSpace extra space in line
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
233 bsr z01CA now do name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
234 ldd Q$SERV,x get irq vector
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
235 lbsr OutHex convert it to ascii
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
236 lbsr OutSpace extra space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
237 lda Q$FLIP,x get flip
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
238 lbsr z0247 convert 1 byte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
239 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
240 bne branch4
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
241 lbsr OutSpace space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
242 branch4 lda Q$MASK,x get mask
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
243 lbsr z0241 convert 1 byte + space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
244 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
245 bne branch5
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
246 lbsr OutSpace extra space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
247 branch5 lda Q$PRTY,x get priority byte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
248 lbsr z0247 convert 1 byte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
249 z01B1 pshs x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
250 ldx <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
251 lda #C$CR terminate this line
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
252 sta ,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
253 leax rptbuf,u ptr to outbuff
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
254 ldy #80 max 80 chars
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
255 lda #$01 stdout
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
256 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
257 lbcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
258 puls x,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
259
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
260 z01CA pshs x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
261 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
262 leax poltable,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
263 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
264 ldx <dpoltbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
265 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
266 ldb <devcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
267 pshs b
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
268 * now we make an assumption that data
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
269 * areas for the same driver will be
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
270 * in the same page of memory, so compare
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
271 * only the high bytes of the address
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
272 ldb Q$STAT,x get irq dat addr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
273 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
274 leax devtable,u devtbl buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
275 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
276 ldx <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
277 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
278 z01D6 cmpb V$STAT,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
279 beq Match if match, found device
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
280 leax DEVSIZ,x else inc to next tbl entry
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
281 dec ,s and decrement coounter
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
282 bne z01D6 continue if more
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
283 leas $01,s get rid of stack data
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
284 ldy <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
285 leay 8,y this leaves name visible
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
286 sty <outptr until new one found
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
287 puls x,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
288
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
289 z01E9 ldy <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
290 ldb #08
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
291 lda #C$SPAC a space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
292 z01EA sta ,y+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
293 decb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
294 bne z01EA
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
295 sty <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
296 rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
297
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
298 Match puls b fix stack
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
299 ldx V$DRIV,x get driver module pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
300 beq z01E9 branch if none
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
301 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
302 pshs u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
303 leau modulep,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
304 ldd <datptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
305 * hopefully the driver name is in the 1st 256 bytes
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
306 ldy #256
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
307 os9 F$CpyMem
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
308 puls u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
309 lbcs errexit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
310 leax modulep,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
311 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
312 ldd M$Name,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
313 leax d,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
314 lda #8
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
315 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
316 beq storeit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
317 lda #7
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
318 storeit sta <counter
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
319 clrb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
320 bra z0220
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
321 z021D bsr z025B
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
322 z0220 incb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
323 cmpb <counter
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
324 bcc z0232
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
325 lda ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
326 bpl z021D
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
327 anda #$7F
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
328 bsr z025B
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
329 cmpb <counter
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
330 bcc z023A
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
331 z0232 bsr OutSpace
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
332 incb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
333 cmpb <counter
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
334 bcs z0232
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
335 z023A puls x,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
336
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
337 * HexCvt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
338 * Entry:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
339 * D = number to convert to hex
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
340 * X = pointer to buffer where hex string is stored
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
341 * Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
342 OutHex pshs b convert to ascii
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
343 bsr z0247 make 2 digits
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
344 puls a
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
345 z0241 bsr z0247 make 2 more
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
346 OutSpace lda #C$SPAC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
347 bra z025B
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
348 z0247 tfr a,b
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
349 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
350 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
351 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
352 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
353 bsr z0251
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
354 tfr b,a
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
355 z0251 anda #$0F
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
356 cmpa #$0A
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
357 bcs z0259
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
358 adda #$07
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
359 z0259 adda #$30
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
360 z025B pshs x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
361 ldx <outptr get outbuf ptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
362 sta ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
363 stx <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
364 puls pc,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
365
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
366 emod
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
367 emod equ *
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
368 end