Subversion Repositories Kolibri OS

Rev

Rev 4882 | Rev 4939 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4882 Rev 4919
1
VERSION equ "0.3Å"
1
VERSION equ "0.3Ĺ"
2
    use32
2
    use32
3
    org     0
3
    org     0
4
    db	    'MENUET01'
4
    db	    'MENUET01'
5
    dd	    1, main, dataend, memory, stacktop, 0, 0
5
    dd	    1, main, dataend, memory, stacktop, 0, 0
6
 
6
 
7
    include "../../proc32.inc"
7
    include "../../proc32.inc"
8
    include "../../macros.inc"
8
    include "../../macros.inc"
9
    include "../../dll.inc"
9
    include "../../dll.inc"
10
    include "../../develop/libraries/box_lib/trunk/box_lib.mac"
10
    include "../../develop/libraries/box_lib/trunk/box_lib.mac"
11
  ;  include "../../debug.inc"
11
  ;  include "../../debug.inc"
12
    include "parser.inc"
12
    include "parser.inc"
13
 
13
 
14
 ;===============================
14
 ;===============================
15
 
15
 
16
    sz_head db "Calc+ [v", VERSION, "]", 0
16
    sz_head db "Calc+ [v", VERSION, "]", 0
17
    buttons db "123456789()%^-+/*0"
17
    buttons db "789456123()%^-+/*0"
18
    edb1    edit_box 184, 8, 12, 0, 0, 0, 0, 0, 500, \
18
    edb1    edit_box 184, 8, 12, 0, 0, 0, 0, 0, 500, \
19
		     exp, group, ed_always_focus + ed_focus, 0, 0
19
		     exp, group, ed_always_focus + ed_focus, 0, 0
20
 
20
 
21
 imports:
21
 imports:
22
    library gui, "box_lib.obj"
22
    library gui, "box_lib.obj"
23
    import  gui, editbox.draw,	"edit_box",	\
23
    import  gui, editbox.draw,	"edit_box",	\
24
		 editbox.key,	"edit_box_key", \
24
		 editbox.key,	"edit_box_key", \
25
		 editbox.mouse, "edit_box_mouse"
25
		 editbox.mouse, "edit_box_mouse"
26
 
26
 
27
 ;===============================
27
 ;===============================
28
 
28
 
29
 main:
29
 main:
30
    mov     [ans.buffer], word "0"
30
    mov     [ans.buffer], word "0"
31
    mov     [ans.size], 15
31
    mov     [ans.size], 15
32
 
32
 
33
    mcall   40, 100111b
33
    mcall   40, 100111b
34
    mcall   48, 3, scn, 192
34
    mcall   48, 3, scn, 192
35
 
35
 
36
    m2m     [edb1.color],	       [scn.gui_face]
36
    m2m     [edb1.color],	       [scn.gui_face]
37
    m2m     [edb1.shift_color],        [scn.gui_select]
37
    m2m     [edb1.shift_color],        [scn.gui_select]
38
    m2m     [edb1.focus_border_color], [scn.gui_face]
38
    m2m     [edb1.focus_border_color], [scn.gui_face]
39
    m2m     [edb1.text_color],	       [scn.gui_fctext]
39
    m2m     [edb1.text_color],	       [scn.gui_fctext]
40
 
40
 
41
    mcall   68, 11
41
    mcall   68, 11
42
    stdcall dll.Load, imports
42
    stdcall dll.Load, imports
43
 
43
 
44
 ;----------------------
44
 ;----------------------
45
 
45
 
46
 update:
46
 update:
47
    mcall   23, 5
47
    mcall   23, 5
48
 
48
 
49
    cmp     eax, EV_REDRAW
49
    cmp     eax, EV_REDRAW
50
    je	    ev_redraw
50
    je	    ev_redraw
51
    cmp     eax, EV_KEY
51
    cmp     eax, EV_KEY
52
    je	    ev_key
52
    je	    ev_key
53
    cmp     eax, EV_BUTTON
53
    cmp     eax, EV_BUTTON
54
    je	    ev_button
54
    je	    ev_button
55
    cmp     eax, EV_MOUSE
55
    cmp     eax, EV_MOUSE
56
    je	    ev_mouse
56
    je	    ev_mouse
57
 
57
 
58
    dec     [timer]
58
    dec     [timer]
59
    cmp     [timer], 0
59
    cmp     [timer], 0
60
    je	    calc
60
    je	    calc
61
 
61
 
62
    jmp     update
62
    jmp     update
63
 
63
 
64
 ;----------------------
64
 ;----------------------
65
 
65
 
66
 ev_redraw:
66
 ev_redraw:
67
    mov     edx, [scn.win_body]
67
    mov     edx, [scn.win_body]
68
    or	    edx, 0x34 shl 24
68
    or	    edx, 0x34 shl 24
69
    mcall    0, <100, 236>, <100, 164>, , , sz_head
69
    mcall    0, <100, 236>, <100, 164>, , , sz_head
70
 
70
 
71
    call    draw_textbox
71
    call    draw_textbox
72
 
72
 
73
    mov     [but_id], 0x4000000A
73
    mov     [but_id], 0x4000000A
74
    mov     [txt_id], buttons
74
    mov     [txt_id], buttons
75
    mov     [txt_x], 16
75
    mov     [txt_x], 16
76
    mov     [but_w], 38
76
    mov     [but_w], 38
77
    stdcall draw_button,   4,  42
77
    stdcall draw_button,   4,  42
78
    stdcall draw_button,  46,  42
78
    stdcall draw_button,  46,  42
79
    stdcall draw_button,  88,  42
79
    stdcall draw_button,  88,  42
80
    stdcall draw_button,   4,  66
80
    stdcall draw_button,   4,  66
81
    stdcall draw_button,  46,  66
81
    stdcall draw_button,  46,  66
82
    stdcall draw_button,  88,  66
82
    stdcall draw_button,  88,  66
83
    stdcall draw_button,   4,  90
83
    stdcall draw_button,   4,  90
84
    stdcall draw_button,  46,  90
84
    stdcall draw_button,  46,  90
85
    stdcall draw_button,  88,  90
85
    stdcall draw_button,  88,  90
86
    stdcall draw_button,  88, 114
86
    stdcall draw_button,  88, 114
87
 
87
 
88
    stdcall draw_button, 144,  42
88
    stdcall draw_button, 144,  42
89
    stdcall draw_button, 186,  42
89
    stdcall draw_button, 186,  42
90
    stdcall draw_button, 144,  66
90
    stdcall draw_button, 144,  66
91
    stdcall draw_button, 186,  66
91
    stdcall draw_button, 186,  66
92
    stdcall draw_button, 144,  90
92
    stdcall draw_button, 144,  90
93
    stdcall draw_button, 186,  90
93
    stdcall draw_button, 186,  90
94
    stdcall draw_button, 144, 114
94
    stdcall draw_button, 144, 114
95
    stdcall draw_button, 186, 114
95
    stdcall draw_button, 186, 114
96
 
96
 
97
    mov     [txt_x], 37
97
    mov     [txt_x], 37
98
    mov     [but_w], 80
98
    mov     [but_w], 80
99
    stdcall draw_button,   4, 114
99
    stdcall draw_button,   4, 114
100
 
100
 
101
    jmp     update
101
    jmp     update
102
 
102
 
103
 ;----------------------
103
 ;----------------------
104
 
104
 
105
 ev_key:
105
 ev_key:
106
    mov     [timer], 10
106
    mov     [timer], 10
107
 
107
 
108
    mcall   2
108
    mcall   2
109
    cmp     ah, 27
109
    cmp     ah, 27
110
    je	    exit
110
    je	    exit
111
    invoke  editbox.key, edb1
111
    invoke  editbox.key, edb1
112
    jmp     update
112
    jmp     update
113
 
113
 
114
 ;----------------------
114
 ;----------------------
115
 
115
 
116
 ev_button:
116
 ev_button:
117
    mov     [timer], 10
117
    mov     [timer], 10
118
 
118
 
119
    mcall   17
119
    mcall   17
120
 
120
 
121
    cmp     ah, 1
121
    cmp     ah, 1
122
    je	    exit
122
    je	    exit
123
 
123
 
124
    cmp     ah, 2
124
    cmp     ah, 2
125
    jne     .not_copy
125
    jne     .not_copy
126
 
126
 
127
 .copy:
127
 .copy:
128
 
128
 
129
    mov     eax, exp
129
    mov     eax, exp
130
    mov     ebx, ans.buffer
130
    mov     ebx, ans.buffer
131
    mov     ecx, 0
131
    mov     ecx, 0
132
  @@:
132
  @@:
133
    mov     dl, [ebx]
133
    mov     dl, [ebx]
134
    mov     [eax], dl
134
    mov     [eax], dl
135
    inc     eax
135
    inc     eax
136
    inc     ebx
136
    inc     ebx
137
    inc     ecx
137
    inc     ecx
138
    cmp     [eax - 1], byte 0
138
    cmp     [eax - 1], byte 0
139
    jne     @b
139
    jne     @b
140
 
140
 
141
    dec     ecx
141
    dec     ecx
142
    mov     [edb1.size], ecx
142
    mov     [edb1.size], ecx
143
    m2m     [edb1.pos], [edb1.size]
143
    m2m     [edb1.pos], [edb1.size]
144
 
144
 
145
    jmp     .redraw
145
    jmp     .redraw
146
 
146
 
147
 .not_copy:
147
 .not_copy:
148
 
148
 
149
    cmp     ah, 19
149
    cmp     ah, 19
150
    jne     .not_del
150
    jne     .not_del
151
 
151
 
152
 .del:
152
 .del:
153
 
153
 
154
    cmp     [edb1.pos], 0
154
    cmp     [edb1.pos], 0
155
    je	    update
155
    je	    update
156
    mov     eax, exp
156
    mov     eax, exp
157
    add     eax, [edb1.pos]
157
    add     eax, [edb1.pos]
158
    dec     eax
158
    dec     eax
159
    mov     ebx, exp
159
    mov     ebx, exp
160
    add     ebx, [edb1.size]
160
    add     ebx, [edb1.size]
161
    inc     ebx
161
    inc     ebx
162
  @@:
162
  @@:
163
    cmp     eax, ebx
163
    cmp     eax, ebx
164
    je	    @f
164
    je	    @f
165
    mov     cl, [eax + 1]
165
    mov     cl, [eax + 1]
166
    mov     [eax], cl
166
    mov     [eax], cl
167
    inc     eax
167
    inc     eax
168
    jmp     @b
168
    jmp     @b
169
  @@:
169
  @@:
170
    dec     [edb1.pos]
170
    dec     [edb1.pos]
171
    dec     [edb1.size]
171
    dec     [edb1.size]
172
    m2m     [edb1.shift], [edb1.pos]
172
    m2m     [edb1.shift], [edb1.pos]
173
    jmp     .redraw
173
    jmp     .redraw
174
 
174
 
175
 .not_del:
175
 .not_del:
176
 
176
 
177
    cmp     ah, 10
177
    cmp     ah, 10
178
    jl	    update
178
    jl	    update
179
    cmp     ah, 50
179
    cmp     ah, 50
180
    jg	    update
180
    jg	    update
181
 
181
 
182
    movzx   eax, ah
182
    movzx   eax, ah
183
    add     eax, buttons
183
    add     eax, buttons
184
    sub     eax, 10
184
    sub     eax, 10
185
    mov     al, [eax]
185
    mov     al, [eax]
186
 
186
 
187
    mov     ebx, exp
187
    mov     ebx, exp
188
    add     ebx, [edb1.size]
188
    add     ebx, [edb1.size]
189
    mov     ecx, exp
189
    mov     ecx, exp
190
    add     ecx, [edb1.pos]
190
    add     ecx, [edb1.pos]
191
  @@:
191
  @@:
192
    cmp     ebx, ecx
192
    cmp     ebx, ecx
193
    je	    @f
193
    je	    @f
194
    mov     dl, [ebx - 1]
194
    mov     dl, [ebx - 1]
195
    mov     [ebx], dl
195
    mov     [ebx], dl
196
    dec     ebx
196
    dec     ebx
197
    jmp     @b
197
    jmp     @b
198
  @@:
198
  @@:
199
 
199
 
200
    mov     [ebx], al
200
    mov     [ebx], al
201
    inc     [edb1.size]
201
    inc     [edb1.size]
202
    inc     [edb1.pos]
202
    inc     [edb1.pos]
203
 
203
 
204
 .redraw:
204
 .redraw:
205
    call    draw_textbox
205
    call    draw_textbox
206
    jmp     update
206
    jmp     update
207
 
207
 
208
 ;----------------------
208
 ;----------------------
209
 
209
 
210
 ev_mouse:
210
 ev_mouse:
211
    mcall   2
211
    mcall   2
212
 
212
 
213
    invoke  editbox.mouse, edb1
213
    invoke  editbox.mouse, edb1
214
    jmp     update
214
    jmp     update
215
 
215
 
216
 ;----------------------
216
 ;----------------------
217
 
217
 
218
 exit:
218
 exit:
219
    mcall   -1
219
    mcall   -1
220
 
220
 
221
 ;----------------------
221
 ;----------------------
222
 
222
 
223
 calc:
223
 calc:
224
    stdcall parse
224
    stdcall parse
225
    cmp     [error_n], 0
225
    cmp     [error_n], 0
226
    jne     .error
226
    jne     .error
227
 
227
 
228
    stdcall convert_to_str, eax, ans.buffer
228
    stdcall convert_to_str, eax, ans.buffer
229
    imul    eax, 6
229
    imul    eax, 6
230
    add     eax, 9
230
    add     eax, 9
231
    mov     [ans.size], eax
231
    mov     [ans.size], eax
232
    jmp     .redraw
232
    jmp     .redraw
233
 
233
 
234
 .error:
234
 .error:
235
    cmp     [error_n], 1
235
    cmp     [error_n], 1
236
    je	    .err_1
236
    je	    .err_1
237
    cmp     [error_n], 4
237
    cmp     [error_n], 4
238
    je	    .err_4
238
    je	    .err_4
239
 
239
 
240
    mov     [ans.buffer +  0], dword "Expe"
240
    mov     [ans.buffer +  0], dword "Expe"
241
    mov     [ans.buffer +  4], dword "cted"
241
    mov     [ans.buffer +  4], dword "cted"
242
    mov     [ans.buffer +  8], dword " ')'"
242
    mov     [ans.buffer +  8], dword " ')'"
243
    mov     [ans.buffer + 12], byte 0
243
    mov     [ans.buffer + 12], byte 0
244
    mov     [ans.size], 81
244
    mov     [ans.size], 81
245
 
245
 
246
    cmp     [error_n], 2
246
    cmp     [error_n], 2
247
    je	    .redraw
247
    je	    .redraw
248
    cmp     [error_n], 3
248
    cmp     [error_n], 3
249
    je	    .err_3
249
    je	    .err_3
250
 .err_1:
250
 .err_1:
251
    mov     [ans.buffer +  0], dword "Div."
251
    mov     [ans.buffer +  0], dword "Div."
252
    mov     [ans.buffer +  4], dword " by "
252
    mov     [ans.buffer +  4], dword " by "
253
    mov     [ans.buffer +  8], byte  "0"
253
    mov     [ans.buffer +  8], byte  "0"
254
    mov     [ans.buffer +  9], byte 0
254
    mov     [ans.buffer +  9], byte 0
255
    mov     [ans.size], 63
255
    mov     [ans.size], 63
256
    jmp     .redraw
256
    jmp     .redraw
257
 .err_4:
257
 .err_4:
258
    mov     [ans.buffer +  0], dword "Inpu"
258
    mov     [ans.buffer +  0], dword "Inpu"
259
    mov     [ans.buffer +  4], dword "t er"
259
    mov     [ans.buffer +  4], dword "t er"
260
    mov     [ans.buffer +  8], dword "rror"
260
    mov     [ans.buffer +  8], dword "rror"
261
    mov     [ans.buffer + 12], byte 0
261
    mov     [ans.buffer + 12], byte 0
262
    mov     [ans.size], 81
262
    mov     [ans.size], 81
263
    jmp     .redraw
263
    jmp     .redraw
264
 .err_3:
264
 .err_3:
265
    mov     [ans.buffer + 10], byte "("
265
    mov     [ans.buffer + 10], byte "("
266
    jmp     .redraw
266
    jmp     .redraw
267
 
267
 
268
 .redraw:
268
 .redraw:
269
    call    draw_textbox
269
    call    draw_textbox
270
    jmp     update
270
    jmp     update
271
 
271
 
272
 ;----------------------
272
 ;----------------------
273
 
273
 
274
 proc draw_button, x, y
274
 proc draw_button, x, y
275
    mcall   13, <[x], [but_w]>, <[y], 20>, [scn.gui_frame]
275
    mcall   13, <[x], [but_w]>, <[y], 20>, [scn.gui_frame]
276
 
276
 
277
    add     ebx, 1 shl 16
277
    add     ebx, 1 shl 16
278
    add     ecx, 1 shl 16
278
    add     ecx, 1 shl 16
279
    sub     ebx, 2
279
    sub     ebx, 2
280
    sub     ecx, 2
280
    sub     ecx, 2
281
    mcall   , , , [scn.3d_light]
281
    mcall   , , , [scn.3d_light]
282
 
282
 
283
    add     ebx, 1 shl 16
283
    add     ebx, 1 shl 16
284
    add     ecx, 1 shl 16
284
    add     ecx, 1 shl 16
285
    dec     ebx
285
    dec     ebx
286
    dec     ecx
286
    dec     ecx
287
    mcall   , , , [scn.3d_dark]
287
    mcall   , , , [scn.3d_dark]
288
 
288
 
289
    dec     ebx
289
    dec     ebx
290
    dec     ecx
290
    dec     ecx
291
    mcall   , , , [scn.win_face]
291
    mcall   , , , [scn.win_face]
292
 
292
 
293
    mcall   1, [x], [y], [scn.win_body]
293
    mcall   1, [x], [y], [scn.win_body]
294
 
294
 
295
    add     ebx, [but_w]
295
    add     ebx, [but_w]
296
    dec     ebx
296
    dec     ebx
297
    mcall
297
    mcall
298
 
298
 
299
    add     ecx, 20
299
    add     ecx, 20
300
    dec     ecx
300
    dec     ecx
301
    mcall
301
    mcall
302
 
302
 
303
    sub     ebx, [but_w]
303
    sub     ebx, [but_w]
304
    inc     ebx
304
    inc     ebx
305
    mcall
305
    mcall
306
 
306
 
307
    mov     ebx, [x]
307
    mov     ebx, [x]
308
    inc     ebx
308
    inc     ebx
309
    shl     ebx, 16
309
    shl     ebx, 16
310
    add     ebx, [but_w]
310
    add     ebx, [but_w]
311
    sub     ebx, 3
311
    sub     ebx, 3
312
    mov     ecx, [y]
312
    mov     ecx, [y]
313
    inc     ecx
313
    inc     ecx
314
    shl     ecx, 16
314
    shl     ecx, 16
315
    add     ecx, 20
315
    add     ecx, 20
316
    sub     ecx, 3
316
    sub     ecx, 3
317
    mov     edx, [but_id]
317
    mov     edx, [but_id]
318
    mcall   8
318
    mcall   8
319
 
319
 
320
    mov     ebx, [x]
320
    mov     ebx, [x]
321
    add     ebx, [txt_x]
321
    add     ebx, [txt_x]
322
    shl     ebx, 16
322
    shl     ebx, 16
323
    add     ebx, [y]
323
    add     ebx, [y]
324
    add     ebx, 7
324
    add     ebx, 7
325
    mcall   4, , [scn.win_text], [txt_id], 1
325
    mcall   4, , [scn.win_text], [txt_id], 1
326
 
326
 
327
    inc     dword [txt_id]
327
    inc     dword [txt_id]
328
    inc     dword [but_id]
328
    inc     dword [but_id]
329
 
329
 
330
    ret
330
    ret
331
 endp
331
 endp
332
 
332
 
333
 ;----------------------
333
 ;----------------------
334
 
334
 
335
 proc draw_textbox
335
 proc draw_textbox
336
    mcall   13, <  4, 220>, <  8,  23>, [scn.gui_frame]
336
    mcall   13, <  4, 220>, <  8,  23>, [scn.gui_frame]
337
    mov     edx, [scn.gui_face]
337
    mov     edx, [scn.gui_face]
338
    cmp     [error_n], 0
338
    cmp     [error_n], 0
339
    je	    @f
339
    je	    @f
340
    mov     edx, 0xFFAAAA
340
    mov     edx, 0xFFAAAA
341
  @@:
341
  @@:
342
    mcall   13, <  5, 218>, <  9, 21>
342
    mcall   13, <  5, 218>, <  9, 21>
343
    mcall     , <  5, 218>, <  9,  1>, [scn.3d_face]
343
    mcall     , <  5, 218>, <  9,  1>, [scn.3d_face]
344
    mcall     , <  5,	1>, < 10, 20>
344
    mcall     , <  5,	1>, < 10, 20>
345
    mcall     , <  5, 218>, < 31,  1>, [scn.3d_light]
345
    mcall     , <  5, 218>, < 31,  1>, [scn.3d_light]
346
 
346
 
347
    mov     ebx, 224
347
    mov     ebx, 224
348
    sub     ebx, [ans.size]
348
    sub     ebx, [ans.size]
349
    shl     ebx, 16
349
    shl     ebx, 16
350
    inc     ebx
350
    inc     ebx
351
    mcall     , 	  , < 9, 21>, [scn.gui_frame]
351
    mcall     , 	  , < 9, 21>, [scn.gui_frame]
352
    add     ebx, [ans.size]
352
    add     ebx, [ans.size]
353
    add     ebx, 1 shl 16
353
    add     ebx, 1 shl 16
354
    sub     ebx, 3
354
    sub     ebx, 3
355
    mcall     , 	  ,	    , [scn.3d_light]
355
    mcall     , 	  ,	    , [scn.3d_light]
356
    cmp     [error_n], 0
356
    cmp     [error_n], 0
357
    jne     .btn_not
357
    jne     .btn_not
358
    mcall   8, , , 0x40000002
358
    mcall   8, , , 0x40000002
359
 .btn_not:
359
 .btn_not:
360
    add     ebx, 1 shl 16
360
    add     ebx, 1 shl 16
361
    add     ecx, 1 shl 16
361
    add     ecx, 1 shl 16
362
    dec     ebx
362
    dec     ebx
363
    dec     ecx
363
    dec     ecx
364
    mcall   13, 	  ,	    , [scn.win_face]
364
    mcall   13, 	  ,	    , [scn.win_face]
365
    shr     ecx, 16
365
    shr     ecx, 16
366
    mov     bx, cx
366
    mov     bx, cx
367
    add     ebx, 3 shl 16 + 6
367
    add     ebx, 3 shl 16 + 6
368
    mov     ecx, [scn.win_text]
368
    mov     ecx, [scn.win_text]
369
    or	    ecx, 1b shl 31
369
    or	    ecx, 1b shl 31
370
    mcall   4, , , ans.buffer
370
    mcall   4, , , ans.buffer
371
 
371
 
372
    mcall    1,   4,  8, [scn.win_body]
372
    mcall    1,   4,  8, [scn.win_body]
373
    mcall     , 223
373
    mcall     , 223
374
    mcall     ,    , 30, [scn.3d_light]
374
    mcall     ,    , 30, [scn.3d_light]
375
    mcall     ,   4
375
    mcall     ,   4
376
 
376
 
377
    mov     ebx, 214
377
    mov     ebx, 214
378
    sub     ebx, [ans.size]
378
    sub     ebx, [ans.size]
379
    cmp     ebx, 24
379
    cmp     ebx, 24
380
    jg	    @f
380
    jg	    @f
381
    mov     ebx, 24
381
    mov     ebx, 24
382
  @@:
382
  @@:
383
    mov     [edb1.width], ebx
383
    mov     [edb1.width], ebx
384
    m2m     [edb1.color],	       [scn.gui_face]
384
    m2m     [edb1.color],	       [scn.gui_face]
385
    m2m     [edb1.focus_border_color], [scn.gui_face]
385
    m2m     [edb1.focus_border_color], [scn.gui_face]
386
    cmp     [error_n],	0
386
    cmp     [error_n],	0
387
    je	    @f
387
    je	    @f
388
    mov     [edb1.color],	       0xFFAAAA
388
    mov     [edb1.color],	       0xFFAAAA
389
    mov     [edb1.focus_border_color], 0xFFAAAA
389
    mov     [edb1.focus_border_color], 0xFFAAAA
390
  @@:
390
  @@:
391
    invoke  editbox.draw, edb1
391
    invoke  editbox.draw, edb1
392
 
392
 
393
    ret
393
    ret
394
 endp
394
 endp
395
 
395
 
396
 ;----------------------
396
 ;----------------------
397
 
397
 
398
 dataend:
398
 dataend:
399
 
399
 
400
 ;===============================
400
 ;===============================
401
 
401
 
402
	    rb 2048
402
	    rb 2048
403
 stacktop:
403
 stacktop:
404
 
404
 
405
 exp	    rb 512
405
 exp	    rb 512
406
 exp_pos    rd 1
406
 exp_pos    rd 1
407
 exp_lvl    rd 1
407
 exp_lvl    rd 1
408
 group	    rd 1
408
 group	    rd 1
409
 
409
 
410
 ans.buffer:rb 512
410
 ans.buffer:rb 512
411
 ans.size   rd 1
411
 ans.size   rd 1
412
 error_n    rd 1
412
 error_n    rd 1
413
 
413
 
414
 scn	    sys_colors_new
414
 scn	    sys_colors_new
415
 timer	    rd 1
415
 timer	    rd 1
416
 but_id     rd 1
416
 but_id     rd 1
417
 but_w	    rd 1
417
 but_w	    rd 1
418
 txt_id     rd 1
418
 txt_id     rd 1
419
 txt_x	    rd 1
419
 txt_x	    rd 1
420
 
420
 
421
 memory:
421
 memory: