annotate level2/cmds/wcreate.asm @ 430:a71313ae3643

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