Rev 309 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 309 | Rev 349 | ||
---|---|---|---|
1 | ;--- ¤à㣨¥ ¬ ªà®áë --- |
1 | ;--- ¤à㣨¥ ¬ ªà®áë --- |
- | 2 | include '../../../develop/examples/editbox/trunk/editbox.inc' |
|
2 | include 'editbox.inc' |
3 | ;include 'editbox.inc' |
3 | include 'txtbut.inc' |
4 | include 'txtbut.inc' |
4 | ;include 'gp.inc' |
5 | ;include 'gp.inc' |
5 | ;include 'label.inc' |
6 | ;include 'label.inc' |
6 | ;include 'checkbox.inc' |
7 | ;include 'checkbox.inc' |
7 | ;include 'file_sys.inc' |
8 | ;include 'file_sys.inc' |
8 | ;include 'textwork.inc' |
9 | ;include 'textwork.inc' |
9 | ;include 'ini.inc' |
10 | ;include 'ini.inc' |
10 | 11 | ||
11 | ;--- § £®«®¢®ª --- |
12 | ;--- § £®«®¢®ª --- |
12 | macro meos_header par_buf,cur_dir_buf |
13 | macro meos_header par_buf,cur_dir_buf |
13 | { |
14 | { |
14 | use32 |
15 | use32 |
15 | org 0x0 |
16 | org 0x0 |
16 | 17 | ||
17 | db 'MENUET01' |
18 | db 'MENUET01' |
18 | dd 0x01 |
19 | dd 0x01 |
19 | dd __app_start |
20 | dd __app_start |
20 | dd __app_end |
21 | dd __app_end |
21 | dd __app_end |
22 | dd __app_end |
22 | dd __app_end |
23 | dd __app_end |
23 | if |
24 | if |
24 | dd 0x0 |
25 | dd 0x0 |
25 | else |
26 | else |
26 | dd par_buf |
27 | dd par_buf |
27 | end if |
28 | end if |
28 | if |
29 | if |
29 | dd 0x0 |
30 | dd 0x0 |
30 | else |
31 | else |
31 | dd cur_dir_buf |
32 | dd cur_dir_buf |
32 | end if |
33 | end if |
33 | } |
34 | } |
34 | 35 | ||
35 | ;--- ®¯à¥¤¥«¨âì â®çªã ¢å®¤ --- |
36 | ;--- ®¯à¥¤¥«¨âì â®çªã ¢å®¤ --- |
36 | macro app_start |
37 | macro app_start |
37 | { |
38 | { |
38 | __app_start: |
39 | __app_start: |
39 | } |
40 | } |
40 | 41 | ||
41 | ;--- ®¯à¥¤¥«¨âì ª®¥æ ¯à¨«®¦¥¨ï ¨ à §¬¥à á⥪ --- |
42 | ;--- ®¯à¥¤¥«¨âì ª®¥æ ¯à¨«®¦¥¨ï ¨ à §¬¥à á⥪ --- |
42 | macro app_end stack_size |
43 | macro app_end stack_size |
43 | { |
44 | { |
44 | if |
45 | if |
45 | rb 1024 |
46 | rb 1024 |
46 | else |
47 | else |
47 | rb stack_size |
48 | rb stack_size |
48 | end if |
49 | end if |
49 | __app_end: |
50 | __app_end: |
50 | } |
51 | } |
51 | 52 | ||
52 | ;--- § ¢¥àè¨âì ⥪ã騩 ¯®â®ª --- |
53 | ;--- § ¢¥àè¨âì ⥪ã騩 ¯®â®ª --- |
53 | macro app_close |
54 | macro app_close |
54 | { |
55 | { |
55 | xor eax,eax |
56 | xor eax,eax |
56 | dec eax |
57 | dec eax |
57 | int 0x40 |
58 | int 0x40 |
58 | } |
59 | } |
59 | 60 | ||
60 | ;--- ¯®«ãç¨âì ª®¤ ¦ ⮩ ª« ¢¨è¨ --- |
61 | ;--- ¯®«ãç¨âì ª®¤ ¦ ⮩ ª« ¢¨è¨ --- |
61 | macro get_key |
62 | macro get_key |
62 | { |
63 | { |
63 | mov eax,2 |
64 | mov eax,2 |
64 | int 0x40 |
65 | int 0x40 |
65 | } |
66 | } |
66 | 67 | ||
67 | ;--- ¯®«ãç¨âì ª®¤ ¦ ⮩ ª®¯ª¨ --- |
68 | ;--- ¯®«ãç¨âì ª®¤ ¦ ⮩ ª®¯ª¨ --- |
68 | macro get_pressed_button |
69 | macro get_pressed_button |
69 | { |
70 | { |
70 | mov eax,17 |
71 | mov eax,17 |
71 | int 0x40 |
72 | int 0x40 |
72 | } |
73 | } |
73 | 74 | ||
74 | ;--- á®®¡é¨âì á¨á⥬¥ ® ç «¥ ¯¥à¥à¨á®¢ª¨ ®ª --- |
75 | ;--- á®®¡é¨âì á¨á⥬¥ ® ç «¥ ¯¥à¥à¨á®¢ª¨ ®ª --- |
75 | macro start_draw_window |
76 | macro start_draw_window |
76 | { |
77 | { |
77 | mov eax,12 |
78 | mov eax,12 |
78 | xor ebx,ebx |
79 | xor ebx,ebx |
79 | inc ebx |
80 | inc ebx |
80 | int 0x40 |
81 | int 0x40 |
81 | } |
82 | } |
82 | 83 | ||
83 | ;--- á®®¡é¨âì á¨á⥬¥ ® § ¢¥à襨¨ ¯¥à¥à¨á®¢ª¨ ®ª --- |
84 | ;--- á®®¡é¨âì á¨á⥬¥ ® § ¢¥à襨¨ ¯¥à¥à¨á®¢ª¨ ®ª --- |
84 | macro stop_draw_window |
85 | macro stop_draw_window |
85 | { |
86 | { |
86 | mov eax,12 |
87 | mov eax,12 |
87 | mov ebx,2 |
88 | mov ebx,2 |
88 | int 0x40 |
89 | int 0x40 |
89 | } |
90 | } |
90 | 91 | ||
91 | ;--- ãáâ ®¢¨âì ¬ áªã ®¦¨¤ ¥¬ëå ᮡë⨩ --- |
92 | ;--- ãáâ ®¢¨âì ¬ áªã ®¦¨¤ ¥¬ëå ᮡë⨩ --- |
92 | macro set_events_mask mask |
93 | macro set_events_mask mask |
93 | { |
94 | { |
94 | mov eax,40 |
95 | mov eax,40 |
95 | mov ebx,mask |
96 | mov ebx,mask |
96 | int 0x40 |
97 | int 0x40 |
97 | } |
98 | } |
98 | 99 | ||
99 | ;--- ¯®«ãç¨âì ¨ä®à¬ æ¨î ® ¯à®æ¥áᥠ--- |
100 | ;--- ¯®«ãç¨âì ¨ä®à¬ æ¨î ® ¯à®æ¥áᥠ--- |
100 | macro get_procinfo proc_inf_buf,slot_num |
101 | macro get_procinfo proc_inf_buf,slot_num |
101 | { |
102 | { |
102 | mov eax,9 |
103 | mov eax,9 |
103 | mov ebx,proc_inf_buf |
104 | mov ebx,proc_inf_buf |
104 | if |
105 | if |
105 | xor ecx,ecx |
106 | xor ecx,ecx |
106 | dec ecx |
107 | dec ecx |
107 | else |
108 | else |
108 | mov ecx,slot_num |
109 | mov ecx,slot_num |
109 | end if |
110 | end if |
110 | int 0x40 |
111 | int 0x40 |
111 | } |
112 | } |
112 | 113 | ||
113 | macro get_sys_colors col_buf |
114 | macro get_sys_colors col_buf |
114 | { |
115 | { |
115 | mov eax,48 |
116 | mov eax,48 |
116 | mov ebx,3 |
117 | mov ebx,3 |
117 | mov ecx,col_buf |
118 | mov ecx,col_buf |
118 | mov edx,40 |
119 | mov edx,40 |
119 | int 0x40 |
120 | int 0x40 |
120 | } |
121 | } |
121 | 122 | ||
122 | macro get_grab_area |
123 | macro get_grab_area |
123 | { |
124 | { |
124 | mov eax,48 |
125 | mov eax,48 |
125 | mov ebx,7 |
126 | mov ebx,7 |
126 | int 0x40 |
127 | int 0x40 |
127 | } |
128 | } |
128 | 129 | ||
129 | macro get_skin_height |
130 | macro get_skin_height |
130 | { |
131 | { |
131 | mov eax,48 |
132 | mov eax,48 |
132 | mov ebx,4 |
133 | mov ebx,4 |
133 | int 0x40 |
134 | int 0x40 |
134 | } |
135 | } |
135 | 136 | ||
136 | macro min_window |
137 | macro min_window |
137 | { |
138 | { |
138 | mov eax,18 |
139 | mov eax,18 |
139 | mov ebx,10 |
140 | mov ebx,10 |
140 | int 0x40 |
141 | int 0x40 |
141 | } |
142 | } |
142 | 143 | ||
143 | macro activ_window slot_n |
144 | macro activ_window slot_n |
144 | { |
145 | { |
145 | mov eax,18 |
146 | mov eax,18 |
146 | mov ebx,3 |
147 | mov ebx,3 |
147 | if |
148 | if |
148 | else |
149 | else |
149 | mov ecx,slot_n |
150 | mov ecx,slot_n |
150 | end if |
151 | end if |
151 | int 0x40 |
152 | int 0x40 |
152 | } |
153 | } |
153 | 154 | ||
154 | macro get_active_window |
155 | macro get_active_window |
155 | { |
156 | { |
156 | mov eax,18 |
157 | mov eax,18 |
157 | mov ebx,7 |
158 | mov ebx,7 |
158 | int 0x40 |
159 | int 0x40 |
159 | } |
160 | } |
160 | 161 | ||
161 | macro delay time |
162 | macro delay time |
162 | { |
163 | { |
163 | mov eax,5 |
164 | mov eax,5 |
164 | if |
165 | if |
165 | else |
166 | else |
166 | mov ebx,time |
167 | mov ebx,time |
167 | end if |
168 | end if |
168 | int 0x40 |
169 | int 0x40 |
169 | } |
170 | } |
170 | 171 | ||
171 | ;--- ®¦¨¤ âì ᮡëâ¨ï --- |
172 | ;--- ®¦¨¤ âì ᮡëâ¨ï --- |
172 | macro wait_event redraw,key,button,mouse,ipc,other |
173 | macro wait_event redraw,key,button,mouse,ipc,other |
173 | { |
174 | { |
174 | mov eax,10 |
175 | mov eax,10 |
175 | int 0x40 |
176 | int 0x40 |
176 | dec ax |
177 | dec ax |
177 | if |
178 | if |
178 | else |
179 | else |
179 | jz redraw |
180 | jz redraw |
180 | end if |
181 | end if |
181 | dec ax |
182 | dec ax |
182 | if |
183 | if |
183 | else |
184 | else |
184 | jz key |
185 | jz key |
185 | end if |
186 | end if |
186 | dec ax |
187 | dec ax |
187 | if |
188 | if |
188 | else |
189 | else |
189 | jz button |
190 | jz button |
190 | end if |
191 | end if |
191 | dec ax |
192 | dec ax |
192 | dec ax |
193 | dec ax |
193 | dec ax |
194 | dec ax |
194 | if |
195 | if |
195 | else |
196 | else |
196 | jz mouse |
197 | jz mouse |
197 | end if |
198 | end if |
198 | if |
199 | if |
199 | else |
200 | else |
200 | dec ax |
201 | dec ax |
201 | jz ipc |
202 | jz ipc |
202 | end if |
203 | end if |
203 | if |
204 | if |
204 | jmp still |
205 | jmp still |
205 | else |
206 | else |
206 | jmp other |
207 | jmp other |
207 | end if |
208 | end if |
208 | } |
209 | } |
209 | 210 | ||
210 | ;--- ¯®«ãç¨âì à §¬¥àë íªà --- |
211 | ;--- ¯®«ãç¨âì à §¬¥àë íªà --- |
211 | macro get_screen_size |
212 | macro get_screen_size |
212 | { |
213 | { |
213 | mov eax,14 |
214 | mov eax,14 |
214 | int 0x40 |
215 | int 0x40 |
215 | } |
216 | } |
216 | 217 | ||
217 | macro get_screen_prop struc_ptr |
218 | macro get_screen_prop struc_ptr |
218 | { |
219 | { |
219 | mov eax,61 |
220 | mov eax,61 |
220 | push eax eax |
221 | push eax eax |
221 | xor ebx,ebx |
222 | xor ebx,ebx |
222 | inc ebx |
223 | inc ebx |
223 | int 0x40 |
224 | int 0x40 |
224 | mov [struc_ptr],eax |
225 | mov [struc_ptr],eax |
225 | pop eax |
226 | pop eax |
226 | inc ebx |
227 | inc ebx |
227 | int 0x40 |
228 | int 0x40 |
228 | mov [struc_ptr+4],ax |
229 | mov [struc_ptr+4],ax |
229 | pop eax |
230 | pop eax |
230 | inc ebx |
231 | inc ebx |
231 | int 0x40 |
232 | int 0x40 |
232 | mov [struc_ptr+6],eax |
233 | mov [struc_ptr+6],eax |
233 | } |
234 | } |
234 | 235 | ||
235 | macro resize_mem mem_size |
236 | macro resize_mem mem_size |
236 | { |
237 | { |
237 | mov eax,64 |
238 | mov eax,64 |
238 | xor ebx,ebx |
239 | xor ebx,ebx |
239 | inc ebx |
240 | inc ebx |
240 | if |
241 | if |
241 | else |
242 | else |
242 | mov ecx,mem_size |
243 | mov ecx,mem_size |
243 | end if |
244 | end if |
244 | int 0x40 |
245 | int 0x40 |
245 | } |
246 | } |
246 | 247 | ||
247 | evm_redraw equ 1 |
248 | evm_redraw equ 1 |
248 | evm_key equ 10b |
249 | evm_key equ 10b |
249 | evm_button equ 100b |
250 | evm_button equ 100b |
250 | evm_mouse equ 100000b |
251 | evm_mouse equ 100000b |
251 | evm_ipc equ 1000000b |
252 | evm_ipc equ 1000000b |
252 | 253 | ||
253 | struc procinfo |
254 | struc procinfo |
254 | { |
255 | { |
255 | .takts_per_second: dd ? |
256 | .takts_per_second: dd ? |
256 | .window_stack_pos: dw ? |
257 | .window_stack_pos: dw ? |
257 | .slot_number: dw ? |
258 | .slot_number: dw ? |
258 | dw ? |
259 | dw ? |
259 | .name: rb 11 |
260 | .name: rb 11 |
260 | .align: db ? |
261 | .align: db ? |
261 | .addres: dd ? |
262 | .addres: dd ? |
262 | .use_mem: dd ? |
263 | .use_mem: dd ? |
263 | .pid: dd ? |
264 | .pid: dd ? |
264 | .left: dd ? |
265 | .left: dd ? |
265 | .top: dd ? |
266 | .top: dd ? |
266 | .width: dd ? |
267 | .width: dd ? |
267 | .height: dd ? |
268 | .height: dd ? |
268 | .slot_state: dw ? |
269 | .slot_state: dw ? |
269 | rb (1024-56) |
270 | rb (1024-56) |
270 | } |
271 | } |
271 | 272 | ||
272 | struc sys_color_table |
273 | struc sys_color_table |
273 | { |
274 | { |
274 | .frames: dd ? ;+0 |
275 | .frames: dd ? ;+0 |
275 | .grab: dd ? ;+4 |
276 | .grab: dd ? ;+4 |
276 | .grab_button: dd ? ;+8 |
277 | .grab_button: dd ? ;+8 |
277 | .grab_button_text: dd ? ;+12 |
278 | .grab_button_text: dd ? ;+12 |
278 | .grab_text: dd ? ;+16 |
279 | .grab_text: dd ? ;+16 |
279 | .work: dd ? ;+20 |
280 | .work: dd ? ;+20 |
280 | .work_button: dd ?;+24 |
281 | .work_button: dd ?;+24 |
281 | .work_button_text: dd ? ;+28 |
282 | .work_button_text: dd ? ;+28 |
282 | .work_text: dd ? ;+32 |
283 | .work_text: dd ? ;+32 |
283 | .work_graph: dd ? ;+36 |
284 | .work_graph: dd ? ;+36 |
284 | } |
285 | } |
285 | 286 | ||
286 | struc screen_size |
287 | struc screen_size |
287 | { |
288 | { |
288 | .height: dw ? |
289 | .height: dw ? |
289 | .width: dw ? |
290 | .width: dw ? |
290 | } |
291 | } |
291 | 292 | ||
292 | struc screen_prop |
293 | struc screen_prop |
293 | { |
294 | { |
294 | .height: dw ? ;+0 |
295 | .height: dw ? ;+0 |
295 | .width: dw ? ;+2 |
296 | .width: dw ? ;+2 |
296 | .bitspp: dw ? ;+4 |
297 | .bitspp: dw ? ;+4 |
297 | .bytesps: dd ?;+6 |
298 | .bytesps: dd ?;+6 |
298 | } |
299 | } |
299 | 300 | ||
300 | struc ipc_buffer size |
301 | struc ipc_buffer size |
301 | { |
302 | { |
302 | .block: dd ? |
303 | .block: dd ? |
303 | .in_use: dd ? |
304 | .in_use: dd ? |
304 | .messages: rb size |
305 | .messages: rb size |
305 | } |
306 | } |
306 | 307 | ||
307 | ;--- 梥â --- |
308 | ;--- 梥â --- |
308 | cl_white=0xffffff |
309 | cl_white=0xffffff |
309 | cl_black=0x000000>>>>>>>>>>>>> |
310 | cl_black=0x000000>>>>>>>>>>>>> |