annotate level1/cmds/devs.asm @ 1211:f54f04a78c54

Rodney Hamilton fixes
author boisy
date Mon, 23 Jun 2003 17:45:27 +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 * devs - Show device table entries
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 * 2 Original version
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
9 * 3 Reworked AD
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
10 * 4 Renamed to devs ala OS-9/68K, reworked 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 devs
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
13 ttl Show device table entries
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 tylg set Prgrm+Objct
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
20 atrv set ReEnt+rev
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
21 rev set $01
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
22 edition set 3
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
23
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
24 mod eom,name,tylg,atrv,start,size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
25
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
26 MaxEnts set 64 maximmum entries we display
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 org 0
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
29 memstrt rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
30 outptr rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
31 counter rmb 1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
32 narrow rmb 1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
33 curdte rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
34 ddevtbl rmb 2 device table pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
35 devcount rmb 1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
36 descptr rmb 2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
37 numbytes rmb 1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
38 lnbuff rmb 80
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
39 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
40 datimg rmb 4
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
41 devtbcpy rmb MaxEnts*DEVSIZ
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
42 descrip rmb 256
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
43 syspdesc rmb P$Size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
44 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
45 stack rmb 200
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
46 size equ .
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
47
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
48 name fcs /devs/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
49 fcb edition
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 Header1 fcc /Device Table at: /
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
52 x12Len equ *-Header1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
53 NHeader fcc /Dv Desc Drvr Stat File Usr/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
54 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
55 NHeaderL equ *-NHeader
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
56 NHeader2 fcc /Nm Port Name Mem Mgr Cnt/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
57 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
58 NHeader2L equ *-NHeader2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
59 NUndln fcc /------- ----------- ---- ---/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
60 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
61 NUndlnL equ *-NUndln
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
62 Header fcc /Device Desc Driver Static File Usr/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
63 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
64 HeaderL equ *-Header
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
65 Header2 fcc /Name Port Name Mem Manager Cnt/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
66 fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
67 Header2L equ *-Header2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
68 Undln fcc /----------- ------------- ------- ---/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
69 MyCR fcb C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
70 UndlnL equ *-Undln
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
71 Init fcs /Init/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
72
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
73 start ldd ,x get parameter bytes
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
74 cmpd #$2D3F -?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
75 lbeq Help
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
76 lda #MaxEnts get maximum entries we support
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
77 sta <devcount and save as count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
78 leax Init,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
79 clra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
80 pshs u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
81 os9 F$Link
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
82 bcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
83 lda <DevCnt,u get device count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
84 os9 F$UnLink unlink module
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
85 puls u restore static pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
86 cmpa <devcount is table same or larger than our default?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
87 bge cont branch if so
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
88 sta <devcount else store smaller count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
89 cont stu <memstrt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
90 clr <narrow assume wide
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
91 lda #$01
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
92 ldb #SS.ScSiz
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
93 os9 I$GetStt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
94 bcs cont2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
95 cmpx #HeaderL+1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
96 bge cont2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
97 sta <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
98 cont2 leax >MyCR,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
99 ldy #$0001
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
100 os9 I$WritLn output a CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
101 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
102 leax >Header1,pcr dump out header
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
103 ldy #x12Len
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
104 os9 I$Write
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
105 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
106 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
107 lda #$01
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
108 leax >syspdesc,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
109 os9 F$GPrDsc get system process descriptor
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
110 bcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
111 leax <P$DATImg,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
112 stx <datimg save address of system's DAT image
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
113 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
114 bra L00D3
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
115
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
116 ClnExit clrb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
117 Exit os9 F$Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
118
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
119 L00D3 equ *
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 ldu <memstrt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
122 leau <ddevtbl,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
123 ldd <datimg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
124 ldx #D.DevTbl I/O device table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
125 ldy #$0002 size of the pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
126 os9 F$CpyMem
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
127 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
128 ldu <memstrt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
129 ldd <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
130 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
131 ldd >D.DevTbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
132 std <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
133 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
134 leay <lnbuff,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
135 sty <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
136 lbsr HexWord output D as hex word
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
137 lbsr PrintBuf
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
138
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
139 lda #$01
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
140 leax >MyCR,pcr dump out another CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
141 ldy #$0001
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
142 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
143 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
144
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
145 leax >Header,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
146 ldy #HeaderL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
147 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
148 beq branch1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
149 leax >NHeader,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
150 ldy #NHeaderL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
151 branch1 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
152 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
153
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
154 leax >Header2,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
155 ldy #Header2L
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
156 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
157 beq branch2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
158 leax >NHeader2,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
159 ldy #NHeader2L
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
160 branch2 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
161 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
162 leax >Undln,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
163 ldy #UndlnL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
164 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
165 beq branch3
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
166 leax >NUndln,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
167 ldy #NUndlnL
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
168 branch3 os9 I$WritLn
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
169 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
170
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
171 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
172 ldu <memstrt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
173 lda <devcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
174 ldb #DEVSIZ
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
175 mul
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
176 tfr d,y
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
177 leau >devtbcpy,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
178 ldx <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
179 ldd <datimg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
180 os9 F$CpyMem copy the device table over
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
181 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
182 stu <curdte save pointer to start of DevTbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
183 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
184 ldd <ddevtbl
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
185 std <curdte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
186 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
187 ldb <devcount
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
188 stb <counter total number of entries to get
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
189
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
190 L0155 bsr L0165
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
191 dec <counter
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
192 lbeq ClnExit if done them all, exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
193
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
194 ldx <curdte get current pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
195 leax DEVSIZ,x go to the next one
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
196 stx <curdte save the pointer again
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
197 bra L0155 and loop back
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
198
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
199 L0165 ldu <memstrt get static pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
200 leay <lnbuff,u point to line buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
201 sty <outptr save as ptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
202 lda #C$SPAC space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
203 ldb #5 assume this length
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
204 tst <narrow are we narrow?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
205 beq L0171 branch if not
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
206 ldb #3 else load new size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
207 L0171 sta ,y+ save spaces
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
208 decb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
209 bne L0171
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
210
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
211 ldx <curdte get the current pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
212 ldx V$DESC,x descriptor?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
213 bne L017D if exists, go do it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
214 rts otherwise exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
215
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
216 L017D equ *
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
217 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
218 pshs u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
219 leau >descrip,u to another buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
220 ldd <datimg system DAT image
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
221 ldy #256
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
222 os9 F$CpyMem
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
223 puls u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
224 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
225
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
226 leax >descrip,u point to the start of the buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
227 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
228 stx <descptr save descriptor pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
229 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
230 ldd M$Name,x pointer to the name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
231 leax d,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
232 lda #5 assume this size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
233 tst <narrow are we narrow?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
234 beq branch4 branch if not
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
235 lda #3 else get new size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
236 branch4 bsr Str2Buf dump out the first few bytes of the name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
237
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
238 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
239 leax >descrip,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
240 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
241 ldx <descptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
242 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
243 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
244 bne skip1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
245 lda M$Port,x port address of the device
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
246 lbsr HexByte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
247 ldy <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
248 leay -1,y
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
249 sty <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
250 skip1 ldd M$Port+1,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
251 lbsr HexWord
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
252 lbsr Space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
253 * IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
254 * leax >descrip,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
255 * ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
256 * ldx <descptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
257 * ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
258 ldd M$PDev,x device driver name offset
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
259 leax d,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
260 lda #9
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
261 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
262 beq branch5
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
263 lda #7
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
264 branch5 bsr Str2Buf dump out bytes of the driver name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
265 ldx <curdte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
266 ldd V$STAT,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
267 lbsr HexWord
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
268 lbsr Space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
269 IFGT Level-1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
270 leax >descrip,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
271 ELSE
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
272 ldx <descptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
273 ENDC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
274 ldd M$FMGr,x file manager name offset
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
275 leax d,x point to it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
276 lda #9
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
277 tst <narrow
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
278 beq branch6
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
279 lda #7
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
280 branch6 bsr Str2Buf dump out bytes of the file manager's name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
281 ldx <curdte
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
282 lda V$USRS,x use count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
283 lbsr HexByte print it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
284 ldx <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
285 leax -1,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
286 bra L01E8
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
287
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
288 PrintBuf ldx <outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
289 L01E8 lda #C$CR save a CR in memory
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
290 sta ,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
291 ldu <memstrt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
292 leax <lnbuff,u to the buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
293 ldy #80 80 characters max.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
294 lda #1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
295 os9 I$WritLn dump the buffer out
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
296 lbcs Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
297 rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
298
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
299 * Entry:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
300 * A = number of bytes to write buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
301 * X = ptr to string to write to buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
302 Str2Buf sta <numbytes dump out A bytes at X
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
303 clrb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
304 bra L0207
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
305
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
306 L0204 lbsr Put2Buf
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
307 L0207 incb increment B
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
308 cmpb <numbytes equal to number of bytes?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
309 bcc NSpaces branch if so
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
310 lda ,x+ else get byte at X
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
311 bpl L0204 branch if hi bit clear
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
312 anda #$7F else clear it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
313 lbsr Put2Buf dump it out
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
314 cmpb <numbytes compare against num bytes
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
315 bcc L0221 branch if equal
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
316
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
317 * Fill the rest with spaces
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
318 NSpaces lbsr Space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
319 incb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
320 cmpb <numbytes
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
321 bcs NSpaces
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
322 L0221 rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
323
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
324 HexWord pshs b
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
325 bsr MakeHex
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
326 puls a
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
327 HexByte bsr MakeHex
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
328 Space lda #C$SPAC output a space
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
329 bra Put2Buf
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
330
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
331 MakeHex tfr a,b
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
332 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
333 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
334 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
335 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
336 bsr L0238
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
337 tfr b,a
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
338 L0238 anda #$0F get the number
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
339 cmpa #$0A >10?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
340 bcs L0240 no, make it a number
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
341 adda #$07 if so, make it A-F
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
342 L0240 adda #$30
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
343 * Entry: A = char to put in buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
344 Put2Buf pshs x save X
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
345 ldx <outptr get buffer pointer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
346 sta ,x+ store char and in X
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
347 stx <outptr save new outptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
348 puls pc,x and return
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
349
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
350 Help lda #1 to STDOUT
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
351 leax HMsg,pcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
352 ldy #HLen
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
353 os9 I$Write
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
354 clrb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
355 os9 F$Exit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
356
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
357 HMsg fcc /devs: show devices in device table/
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
358 fdb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
359 HLen equ *-HMsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
360
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
361 emod
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
362 eom equ *
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
363 end