Rev 132 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 132 | Rev 485 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | dd 0x5000 ; memory for app |
23 | dd 0x5000 ; memory for app |
24 | dd 0x5000 ; esp |
24 | dd 0x5000 ; esp |
25 | dd 0x0 , 0x0 ; I_Param , I_Icon |
25 | dd 0x0 , 0x0 ; I_Param , I_Icon |
Line 26... | Line 26... | ||
26 | 26 | ||
27 | include 'lang.inc' |
27 | include 'lang.inc' |
28 | include 'macros.inc' |
28 | include '..\..\..\macros.inc' |
Line 29... | Line 29... | ||
29 | remote_ip db 192,168,0,1 |
29 | remote_ip db 192,168,0,1 |
Line 30... | Line 30... | ||
30 | 30 | ||
31 | 31 | ||
32 | START: ; start of execution |
32 | START: ; start of execution |
33 | 33 | ||
34 | mov eax, 53 ; open receiver socket |
34 | mov eax, 53 ; open receiver socket |
35 | mov ebx, 0 |
35 | mov ebx, 0 |
36 | mov ecx, 0x6100 ; local port |
36 | mov ecx, 0x6100 ; local port |
37 | mov edx, 0x6000 ; remote port |
37 | mov edx, 0x6000 ; remote port |
Line -... | Line 38... | ||
- | 38 | mov esi, dword [remote_ip] ; remote IP |
|
38 | mov esi, dword [remote_ip] ; remote IP |
39 | mcall |
Line 39... | Line 40... | ||
39 | int 0x40 |
40 | mov [socket],eax |
Line 40... | Line 41... | ||
40 | mov [socket],eax |
41 | mov [0],eax ; save for remote code |
41 | mov [0],eax ; save for remote code |
42 | |
42 | 43 | red: |
|
Line 43... | Line 44... | ||
43 | call draw_window ; at first, draw the window |
44 | call draw_window ; at first, draw the window |
44 | 45 | ||
45 | still: |
46 | still: |
46 | 47 | ||
Line 56... | Line 57... | ||
56 | jz button |
57 | jz button |
Line 57... | Line 58... | ||
57 | 58 | ||
58 | mov eax,53 ; data from cluster terminal ? |
59 | mov eax,53 ; data from cluster terminal ? |
59 | mov ebx,2 |
60 | mov ebx,2 |
60 | mov ecx,[socket] |
61 | mov ecx,[socket] |
Line 61... | Line 62... | ||
61 | int 0x40 |
62 | mcall |
62 | 63 | ||
Line 63... | Line 64... | ||
63 | cmp eax,0 |
64 | cmp eax,0 |
Line 64... | Line -... | ||
64 | jne data_arrived |
- | |
65 | - | ||
66 | jmp still |
- | |
67 | - | ||
68 | red: |
65 | jne data_arrived |
69 | call draw_window |
66 | |
70 | jmp still |
67 | jmp still |
71 | 68 | ||
Line 72... | Line 69... | ||
72 | key: |
69 | key: |
Line 73... | Line 70... | ||
73 | mov eax,2 |
70 | mov eax,2 |
74 | int 0x40 |
71 | mcall |
75 | jmp still |
72 | jmp still |
76 | 73 | ||
77 | button: |
74 | button: |
78 | 75 | ||
Line 79... | Line 76... | ||
79 | mov eax,53 |
76 | mov eax,53 |
Line 80... | Line 77... | ||
80 | mov ebx,1 |
77 | mov ebx,1 |
81 | mov ecx,[socket] |
78 | mov ecx,[socket] |
82 | int 0x40 |
79 | mcall |
Line 83... | Line 80... | ||
83 | mov eax,-1 |
80 | or eax,-1 |
Line 84... | Line 81... | ||
84 | int 0x40 |
81 | mcall |
Line 85... | Line 82... | ||
85 | 82 | ||
86 | 83 | ||
87 | data_arrived: |
84 | data_arrived: |
88 | 85 | ||
Line 89... | Line 86... | ||
89 | mov eax,5 ; wait a second for everything to arrive |
86 | mov eax,5 ; wait a second for everything to arrive |
90 | mov ebx,10 |
87 | mov ebx,10 |
Line 91... | Line 88... | ||
91 | int 0x40 |
88 | mcall |
92 | 89 | ||
93 | mov edi,I_END |
90 | mov edi,I_END |
94 | 91 | ||
Line 95... | Line 92... | ||
95 | get_data: |
92 | get_data: |
96 | 93 | ||
Line 97... | Line 94... | ||
97 | mov eax,53 |
94 | mov eax,53 |
Line 116... | Line 113... | ||
116 | mov ebx,10*65536+60 |
113 | mov ebx,10*65536+60 |
117 | add ebx,[y] |
114 | add ebx,[y] |
118 | mov ecx,0x000000 |
115 | mov ecx,0x000000 |
119 | mov edx,inp_con |
116 | mov edx,inp_con |
120 | mov esi,inp_con.len |
117 | mov esi,inp_con.len |
121 | int 0x40 |
118 | mcall |
122 | add [y],10 |
119 | add [y],10 |
Line 123... | Line 120... | ||
123 | 120 | ||
Line 124... | Line 121... | ||
124 | jmp still |
121 | jmp still |
Line 130... | Line 127... | ||
130 | mov ebx,10*65536+60 |
127 | mov ebx,10*65536+60 |
131 | add ebx,[y] |
128 | add ebx,[y] |
132 | mov ecx,0x000000 |
129 | mov ecx,0x000000 |
133 | mov edx,inp_shut |
130 | mov edx,inp_shut |
134 | mov esi,inp_shut.len |
131 | mov esi,inp_shut.len |
135 | int 0x40 |
132 | mcall |
136 | add [y],10 |
133 | add [y],10 |
Line 137... | Line 134... | ||
137 | 134 | ||
138 | mov eax,18 |
135 | mov eax,18 |
139 | mov ebx,9 |
136 | mov ebx,9 |
140 | mov ecx,2 |
137 | mov ecx,2 |
Line 141... | Line 138... | ||
141 | int 0x40 |
138 | mcall |
Line 142... | Line 139... | ||
142 | 139 | ||
143 | jmp still |
140 | jmp still |
Line 149... | Line 146... | ||
149 | mov ebx,10*65536+60 |
146 | mov ebx,10*65536+60 |
150 | add ebx,[y] |
147 | add ebx,[y] |
151 | mov ecx,0x000000 |
148 | mov ecx,0x000000 |
152 | mov edx,inp_reb |
149 | mov edx,inp_reb |
153 | mov esi,inp_reb.len |
150 | mov esi,inp_reb.len |
154 | int 0x40 |
151 | mcall |
155 | add [y],10 |
152 | add [y],10 |
Line 156... | Line 153... | ||
156 | 153 | ||
157 | mov eax,18 |
154 | mov eax,18 |
158 | mov ebx,9 |
155 | mov ebx,9 |
159 | mov ecx,3 |
156 | mov ecx,3 |
160 | int 0x40 |
157 | mcall |
Line 161... | Line 158... | ||
161 | jmp still |
158 | jmp still |
162 | 159 | ||
163 | no_reb: |
160 | no_reb: |
Line 167... | Line 164... | ||
167 | mov ebx,10*65536+60 |
164 | mov ebx,10*65536+60 |
168 | add ebx,[y] |
165 | add ebx,[y] |
169 | mov ecx,0x000000 |
166 | mov ecx,0x000000 |
170 | mov edx,inp_savefi |
167 | mov edx,inp_savefi |
171 | mov esi,inp_savefi.len |
168 | mov esi,inp_savefi.len |
172 | int 0x40 |
169 | mcall |
173 | add [y],10 |
170 | add [y],10 |
Line 174... | Line 171... | ||
174 | 171 | ||
175 | mov eax,18 |
172 | mov eax,18 |
176 | mov ebx,9 |
173 | mov ebx,9 |
177 | mov ecx,1 |
174 | mov ecx,1 |
178 | int 0x40 |
175 | mcall |
Line 179... | Line 176... | ||
179 | jmp still |
176 | jmp still |
180 | 177 | ||
181 | no_savefi: |
178 | no_savefi: |
Line 185... | Line 182... | ||
185 | mov ebx,10*65536+60 |
182 | mov ebx,10*65536+60 |
186 | add ebx,[y] |
183 | add ebx,[y] |
187 | mov ecx,0x000000 |
184 | mov ecx,0x000000 |
188 | mov edx,inp_savehi |
185 | mov edx,inp_savehi |
189 | mov esi,inp_savehi.len |
186 | mov esi,inp_savehi.len |
190 | int 0x40 |
187 | mcall |
191 | add [y],10 |
188 | add [y],10 |
Line 192... | Line 189... | ||
192 | 189 | ||
193 | mov eax,18 |
190 | mov eax,18 |
194 | mov ebx,6 |
191 | mov ebx,6 |
195 | mov ecx,2 |
192 | mov ecx,2 |
Line 196... | Line 193... | ||
196 | int 0x40 |
193 | mcall |
Line 197... | Line 194... | ||
197 | 194 | ||
198 | jmp still |
195 | jmp still |
Line 204... | Line 201... | ||
204 | mov ebx,10*65536+60 |
201 | mov ebx,10*65536+60 |
205 | add ebx,[y] |
202 | add ebx,[y] |
206 | mov ecx,0x000000 |
203 | mov ecx,0x000000 |
207 | mov edx,inp_hotreb |
204 | mov edx,inp_hotreb |
208 | mov esi,inp_hotreb.len |
205 | mov esi,inp_hotreb.len |
209 | int 0x40 |
206 | mcall |
210 | add [y],10 |
207 | add [y],10 |
Line 211... | Line 208... | ||
211 | 208 | ||
212 | mov eax,18 |
209 | mov eax,18 |
213 | mov ebx,9 |
210 | mov ebx,9 |
214 | mov ecx,4 |
211 | mov ecx,4 |
215 | int 0x40 |
212 | mcall |
Line 216... | Line 213... | ||
216 | jmp still |
213 | jmp still |
217 | 214 | ||
218 | no_hotreb: |
215 | no_hotreb: |
Line 222... | Line 219... | ||
222 | mov ebx,10*65536+60 |
219 | mov ebx,10*65536+60 |
223 | add ebx,[y] |
220 | add ebx,[y] |
224 | mov ecx,0x000000 |
221 | mov ecx,0x000000 |
225 | mov edx,inp_exit |
222 | mov edx,inp_exit |
226 | mov esi,inp_exit.len |
223 | mov esi,inp_exit.len |
227 | int 0x40 |
224 | mcall |
228 | add [y],10 |
225 | add [y],10 |
Line 229... | Line 226... | ||
229 | 226 | ||
230 | call button |
227 | call button |
Line 235... | Line 232... | ||
235 | mov ebx,10*65536+60 |
232 | mov ebx,10*65536+60 |
236 | add ebx,[y] |
233 | add ebx,[y] |
237 | mov ecx,0x000000 |
234 | mov ecx,0x000000 |
238 | mov edx,inp_com |
235 | mov edx,inp_com |
239 | mov esi,inp_com.len |
236 | mov esi,inp_com.len |
240 | int 0x40 |
237 | mcall |
241 | add [y],10 |
238 | add [y],10 |
Line 242... | Line 239... | ||
242 | 239 | ||
Line 243... | Line 240... | ||
243 | jmp still |
240 | jmp still |
Line 249... | Line 246... | ||
249 | 246 | ||
Line 250... | Line 247... | ||
250 | draw_window: |
247 | draw_window: |
251 | 248 | ||
252 | mov eax,12 ; function 12:tell os about windowdraw |
249 | mov eax,12 ; function 12:tell os about windowdraw |
Line 253... | Line 250... | ||
253 | mov ebx,1 ; 1, start of draw |
250 | mov ebx,1 ; 1, start of draw |
254 | int 0x40 |
251 | mcall |
255 | 252 | ||
256 | ; DRAW WINDOW |
253 | ; DRAW WINDOW |
257 | mov eax,0 ; function 0 : define and draw window |
254 | mov eax,0 ; function 0 : define and draw window |
258 | mov ebx,100*65536+300 ; [x start] *65536 + [x size] |
- | |
259 | mov ecx,100*65536+330 ; [y start] *65536 + [y size] |
255 | mov ebx,100*65536+300 ; [x start] *65536 + [x size] |
260 | mov edx,0x03ffffff ; color of work area RRGGBB |
- | |
261 | mov esi,0x80aabbcc ; color of grab bar RRGGBB,8->color gl |
- | |
262 | mov edi,0x00aabbcc ; color of frames RRGGBB |
256 | mov ecx,100*65536+330 ; [y start] *65536 + [y size] |
263 | int 0x40 |
- | |
264 | - | ||
265 | mov eax,8 |
- | |
266 | mov ebx,(286-19)*65536+12 |
- | |
267 | mov ecx,4*65536+12 |
- | |
268 | mov edx,1 |
257 | mov edx,0x13ffffff ; color of work area RRGGBB |
269 | mov esi,0xaabbcc |
- | |
270 | ; int 0x40 |
- | |
271 | - | ||
272 | ; WINDOW LABEL |
- | |
273 | mov eax,4 ; function 4 : write text to window |
- | |
274 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
- | |
275 | mov ecx,0x00ffffff ; color of text RRGGBB |
- | |
Line 276... | Line 258... | ||
276 | mov edx,labeltext ; pointer to text beginning |
258 | mov edi,title ; WINDOW LABEL |
277 | mov esi,lte-labeltext ; text length |
259 | mcall |
- | 260 | ||
278 | int 0x40 |
261 | |
279 | 262 | ; Re-draw the screen text |
|
280 | ; Re-draw the screen text |
263 | cld |
281 | cld |
264 | mov eax,4 |
282 | mov ebx,10*65536+30 ; draw info text with function 4 |
265 | mov ebx,10*65536+30 ; draw info text with function 4 |
283 | mov ecx,0x000000 |
266 | mov ecx,0x000000 |
284 | mov edx,text |
- | |
285 | mov esi,40 |
267 | mov edx,text |
286 | newline: |
268 | mov esi,40 |
287 | mov eax,4 |
269 | newline: |
288 | int 0x40 |
270 | mcall |
Line 289... | Line 271... | ||
289 | add ebx,16 |
271 | add ebx,16 |
290 | add edx,40 |
272 | add edx,40 |
291 | cmp [edx],byte 'x' |
273 | cmp [edx],byte 'x' |
Line 292... | Line 274... | ||
292 | jnz newline |
274 | jnz newline |
Line 293... | Line 275... | ||
293 | 275 | ||
Line 313... | Line 295... | ||
313 | db 'Used port : 0x6100 ' |
295 | db 'Used port : 0x6100 ' |
314 | db 'Status: ' |
296 | db 'Status: ' |
315 | db 'x' ; <- END MARKER, DONT DELETE |
297 | db 'x' ; <- END MARKER, DONT DELETE |
316 | end if |
298 | end if |
Line 317... | Line 299... | ||
317 | 299 | ||
318 | labeltext: db 'Remote Control Center(Server)' |
- | |
Line 319... | Line 300... | ||
319 | lte: |
300 | title db 'Remote Control Center(Server)',0 |
320 | 301 | ||
321 | socket dd 0x0 |
302 | socket dd 0x0 |