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
|
|
19 tylg set Prgrm+Objct
|
|
20 atrv set ReEnt+rev
|
|
21 rev set $01
|
|
22 edition set 3
|
|
23
|
|
24 mod eom,name,tylg,atrv,start,size
|
|
25
|
|
26 u0000 rmb 2
|
|
27 u0002 rmb 1
|
|
28 u0003 rmb 7
|
|
29 u000A rmb 1
|
|
30 u000B rmb 1
|
|
31 u000C rmb 1
|
|
32 u000D rmb 1
|
|
33 u000E rmb 480
|
|
34 size equ .
|
|
35
|
|
36 name fcs /WCreate/
|
|
37 fcb edition
|
|
38 L0015 fcb C$CR
|
|
39 fcb C$LF
|
|
40 fcc "WCreate <windpath> [-s=stype] xpos ypos width height fcol bcol [bord]"
|
|
41 fcb C$CR
|
|
42 fcb C$LF
|
|
43 fcc "Use: Create a new window"
|
|
44 fcb C$CR
|
|
45 fcb C$LF
|
|
46 fcc "Options: -s=stype place the window on a new screen, must also"
|
|
47 fcb C$CR
|
|
48 fcb C$LF
|
|
49 fcc " include the border color."
|
|
50 fcb C$CR
|
|
51 fcb C$LF
|
|
52 fcc " -z receive commands from standard input"
|
|
53 fcb C$CR
|
|
54 fcb C$LF
|
|
55 fcc " -? receive help message"
|
|
56 fcb C$CR
|
|
57 fcb C$LF
|
|
58 L0148 fdb $1B21
|
|
59
|
|
60 start clr <u000D
|
|
61 clra
|
|
62 coma
|
|
63 sta <u000C
|
|
64 lbsr L0260
|
|
65 lda ,x
|
|
66 cmpa #PDELIM
|
|
67 bne L015D
|
|
68 bsr L01B2
|
|
69 bra L01AF
|
|
70 L015D cmpa #'-
|
|
71 lbne L026B
|
|
72 leax 1,x
|
|
73 lda ,x+
|
|
74 cmpa #$3F
|
|
75 lbeq L026B
|
|
76 cmpa #$7A
|
|
77 beq L0177
|
|
78 cmpa #$5A
|
|
79 lbne L026B
|
|
80 L0177 lda #$01
|
|
81 sta <u000D
|
|
82 L017B clra
|
|
83 leax u000E,u
|
|
84 ldy #$0050
|
|
85 os9 I$ReadLn
|
|
86 bcs L019C
|
|
87 lda ,x
|
|
88 cmpa #$2A
|
|
89 beq L0177
|
|
90 lbsr L0260
|
|
91 lda ,x
|
|
92 cmpa #C$CR
|
|
93 beq L01A0
|
|
94 bsr L01B5
|
|
95 bcs L01AF
|
|
96 bra L017B
|
|
97 L019C cmpb #$D3
|
|
98 bne L01AF
|
|
99 L01A0 lda #$01
|
|
100 lbsr L0254
|
|
101 lda <u000C
|
|
102 bmi L01AE
|
|
103 os9 I$Close
|
|
104 bcs L01AF
|
|
105 L01AE clrb
|
|
106 L01AF os9 F$Exit
|
|
107 L01B2 lbsr L0260
|
|
108 L01B5 clr <u000A
|
|
109 clr <u0002
|
|
110 lda ,x
|
|
111 cmpa #PDELIM
|
|
112 lbne L0269
|
|
113 lda #$03
|
|
114 pshs u,x,a
|
|
115 leax $01,x
|
|
116 os9 I$Attach
|
|
117 puls u,x,a
|
|
118 lbcs L0253
|
|
119 os9 I$Open
|
|
120 bcs L0253
|
|
121 sta <u000B
|
|
122 lbsr L0260
|
|
123 lda ,x+
|
|
124 cmpa #'-
|
|
125 bne L01FD
|
|
126 lda ,x+
|
|
127 cmpa #$73
|
|
128 beq L01EA
|
|
129 cmpa #$53
|
|
130 bne L0269
|
|
131 L01EA lda ,x+
|
|
132 cmpa #$3D
|
|
133 bne L0269
|
|
134 leay u0002,u
|
|
135 lbsr L027B
|
|
136 bcs L0269
|
|
137 inc <u000A
|
|
138 ldb #$07
|
|
139 bra L0203
|
|
140 L01FD leay u0003,u
|
|
141 ldb #$06
|
|
142 leax -1,x
|
|
143 L0203 bsr L027B
|
|
144 bcs L0269
|
|
145 decb
|
|
146 bne L0203
|
|
147 leax ,u
|
|
148 lda #$1B
|
|
149 sta ,x
|
|
150 lda #$20
|
|
151 sta 1,x
|
|
152 tst <u000A
|
|
153 beq L021E
|
|
154 ldy #$000A
|
|
155 bra L0222
|
|
156 L021E ldy #$0009
|
|
157 L0222 lda <u000B
|
|
158 os9 I$Write
|
|
159 bcs L0253
|
|
160 tst <u000D
|
|
161 beq L024E
|
|
162 tst <u000A
|
|
163 beq L024E
|
|
164 tst <u000C
|
|
165 bpl L0239
|
|
166 lda #$01
|
|
167 bsr L0254
|
|
168 L0239 lda <u000B
|
|
169 bsr L0254
|
|
170 bcs L0253
|
|
171 tst <u000C
|
|
172 bmi L0248
|
|
173 lda <u000C
|
|
174 os9 I$Close
|
|
175 L0248 lda <u000B
|
|
176 sta <u000C
|
|
177 bra L0253
|
|
178 L024E lda <u000B
|
|
179 os9 I$Close
|
|
180 L0253 rts
|
|
181 L0254 leax >L0148,pcr
|
|
182 ldy #$0002
|
|
183 os9 I$Write
|
|
184 rts
|
|
185 L0260 lda ,x+
|
|
186 cmpa #$20
|
|
187 beq L0260
|
|
188 leax -1,x
|
|
189 rts
|
|
190 L0269 leas $02,s
|
|
191 L026B lda #$01
|
|
192 leax >L0015,pcr
|
|
193 ldy #$0133
|
|
194 os9 I$Write
|
|
195 lbra L01AE
|
|
196 L027B pshs b
|
|
197 clrb
|
|
198 stb ,y
|
|
199 L0280 lda ,x+
|
|
200 cmpa #$30
|
|
201 blt L029B
|
|
202 cmpa #$39
|
|
203 bhi L029B
|
|
204 suba #$30
|
|
205 pshs a
|
|
206 lda #$0A
|
|
207 ldb ,y
|
|
208 mul
|
|
209 addb ,s+
|
|
210 stb ,y
|
|
211 bvs L02A7
|
|
212 bra L0280
|
|
213 L029B cmpa #C$CR
|
|
214 beq L02AA
|
|
215 cmpa #C$SPAC
|
|
216 bsr L0260
|
|
217 bra L02AA
|
|
218 bne L02A7
|
|
219 L02A7 comb
|
|
220 bra L02AD
|
|
221 L02AA clrb
|
|
222 leay $01,y
|
|
223 L02AD puls pc,b
|
|
224
|
|
225 emod
|
|
226 eom equ *
|
|
227 end
|
|
228
|