annotate level1/cmds/devs.asm @ 2617:b1145d2cb659

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