annotate level1/cmds/irqs.asm @ 2898:28ed72477814 lwtools-port

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