Mercurial > hg > Members > kono > nitros9-code
annotate level2/cmds/wcreate.asm @ 1143:f052edb830d2
Article from 1994 about DAVID with background info about Microware
author | roug |
---|---|
date | Mon, 21 Apr 2003 16:56:47 +0000 |
parents | b62985f61614 |
children | bf6f854a4299 |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * WCreate - Create a window | |
3 * | |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
8 * 3 Original Tandy/Microware version | |
9 | |
10 nam WCreate | |
11 ttl Create a window | |
12 | |
13 * Disassembled 98/09/11 18:26:55 by Disasm v1.6 (C) 1988 by RML | |
14 | |
15 ifp1 | |
16 use defsfile | |
17 endc | |
18 | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
19 DOHELP set 0 |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
20 |
0 | 21 tylg set Prgrm+Objct |
22 atrv set ReEnt+rev | |
23 rev set $01 | |
24 edition set 3 | |
25 | |
26 mod eom,name,tylg,atrv,start,size | |
27 | |
28 u0000 rmb 2 | |
29 u0002 rmb 1 | |
30 u0003 rmb 7 | |
31 u000A rmb 1 | |
32 u000B rmb 1 | |
33 u000C rmb 1 | |
34 u000D rmb 1 | |
35 u000E rmb 480 | |
36 size equ . | |
37 | |
38 name fcs /WCreate/ | |
39 fcb edition | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
40 |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
41 IFNE DOHELP |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
42 HelpMsg fcb C$CR |
0 | 43 fcb C$LF |
44 fcc "WCreate <windpath> [-s=stype] xpos ypos width height fcol bcol [bord]" | |
45 fcb C$CR | |
46 fcb C$LF | |
47 fcc "Use: Create a new window" | |
48 fcb C$CR | |
49 fcb C$LF | |
50 fcc "Options: -s=stype place the window on a new screen, must also" | |
51 fcb C$CR | |
52 fcb C$LF | |
53 fcc " include the border color." | |
54 fcb C$CR | |
55 fcb C$LF | |
56 fcc " -z receive commands from standard input" | |
57 fcb C$CR | |
58 fcb C$LF | |
59 fcc " -? receive help message" | |
60 fcb C$CR | |
61 fcb C$LF | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
62 ENDC |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
63 |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
64 CurOn fdb $1B21 |
0 | 65 |
66 start clr <u000D | |
67 clra | |
68 coma | |
69 sta <u000C | |
70 lbsr L0260 | |
71 lda ,x | |
72 cmpa #PDELIM | |
73 bne L015D | |
74 bsr L01B2 | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
75 bra Exit |
0 | 76 L015D cmpa #'- |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
77 lbne ShowHelp |
0 | 78 leax 1,x |
79 lda ,x+ | |
80 cmpa #$3F | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
81 lbeq ShowHelp |
0 | 82 cmpa #$7A |
83 beq L0177 | |
84 cmpa #$5A | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
85 lbne ShowHelp |
0 | 86 L0177 lda #$01 |
87 sta <u000D | |
88 L017B clra | |
89 leax u000E,u | |
90 ldy #$0050 | |
91 os9 I$ReadLn | |
92 bcs L019C | |
93 lda ,x | |
94 cmpa #$2A | |
95 beq L0177 | |
96 lbsr L0260 | |
97 lda ,x | |
98 cmpa #C$CR | |
99 beq L01A0 | |
100 bsr L01B5 | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
101 bcs Exit |
0 | 102 bra L017B |
103 L019C cmpb #$D3 | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
104 bne Exit |
0 | 105 L01A0 lda #$01 |
106 lbsr L0254 | |
107 lda <u000C | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
108 bmi ExitOk |
0 | 109 os9 I$Close |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
110 bcs Exit |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
111 ExitOk clrb |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
112 Exit os9 F$Exit |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
113 |
0 | 114 L01B2 lbsr L0260 |
115 L01B5 clr <u000A | |
116 clr <u0002 | |
117 lda ,x | |
118 cmpa #PDELIM | |
119 lbne L0269 | |
120 lda #$03 | |
121 pshs u,x,a | |
122 leax $01,x | |
123 os9 I$Attach | |
124 puls u,x,a | |
125 lbcs L0253 | |
126 os9 I$Open | |
127 bcs L0253 | |
128 sta <u000B | |
129 lbsr L0260 | |
130 lda ,x+ | |
131 cmpa #'- | |
132 bne L01FD | |
133 lda ,x+ | |
134 cmpa #$73 | |
135 beq L01EA | |
136 cmpa #$53 | |
137 bne L0269 | |
138 L01EA lda ,x+ | |
139 cmpa #$3D | |
140 bne L0269 | |
141 leay u0002,u | |
142 lbsr L027B | |
143 bcs L0269 | |
144 inc <u000A | |
145 ldb #$07 | |
146 bra L0203 | |
147 L01FD leay u0003,u | |
148 ldb #$06 | |
149 leax -1,x | |
150 L0203 bsr L027B | |
151 bcs L0269 | |
152 decb | |
153 bne L0203 | |
154 leax ,u | |
155 lda #$1B | |
156 sta ,x | |
157 lda #$20 | |
158 sta 1,x | |
159 tst <u000A | |
160 beq L021E | |
161 ldy #$000A | |
162 bra L0222 | |
163 L021E ldy #$0009 | |
164 L0222 lda <u000B | |
165 os9 I$Write | |
166 bcs L0253 | |
167 tst <u000D | |
168 beq L024E | |
169 tst <u000A | |
170 beq L024E | |
171 tst <u000C | |
172 bpl L0239 | |
173 lda #$01 | |
174 bsr L0254 | |
175 L0239 lda <u000B | |
176 bsr L0254 | |
177 bcs L0253 | |
178 tst <u000C | |
179 bmi L0248 | |
180 lda <u000C | |
181 os9 I$Close | |
182 L0248 lda <u000B | |
183 sta <u000C | |
184 bra L0253 | |
185 L024E lda <u000B | |
186 os9 I$Close | |
187 L0253 rts | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
188 L0254 leax >CurOn,pcr |
0 | 189 ldy #$0002 |
190 os9 I$Write | |
191 rts | |
192 L0260 lda ,x+ | |
193 cmpa #$20 | |
194 beq L0260 | |
195 leax -1,x | |
196 rts | |
197 L0269 leas $02,s | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
198 ShowHelp equ * |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
199 IFNE DOHELP |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
200 lda #$01 |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
201 leax >HelpMsg,pcr |
0 | 202 ldy #$0133 |
203 os9 I$Write | |
922
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
204 ENDC |
b62985f61614
Added DOHELP conditional, montype now requires dash before options
boisy
parents:
0
diff
changeset
|
205 lbra ExitOk |
0 | 206 L027B pshs b |
207 clrb | |
208 stb ,y | |
209 L0280 lda ,x+ | |
210 cmpa #$30 | |
211 blt L029B | |
212 cmpa #$39 | |
213 bhi L029B | |
214 suba #$30 | |
215 pshs a | |
216 lda #$0A | |
217 ldb ,y | |
218 mul | |
219 addb ,s+ | |
220 stb ,y | |
221 bvs L02A7 | |
222 bra L0280 | |
223 L029B cmpa #C$CR | |
224 beq L02AA | |
225 cmpa #C$SPAC | |
226 bsr L0260 | |
227 bra L02AA | |
228 bne L02A7 | |
229 L02A7 comb | |
230 bra L02AD | |
231 L02AA clrb | |
232 leay $01,y | |
233 L02AD puls pc,b | |
234 | |
235 emod | |
236 eom equ * | |
237 end | |
238 |