Subversion Repositories Kolibri OS

Rev

Rev 1367 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1367 Rev 1371
Line 35... Line 35...
35
include '..\..\..\macros.inc'
35
include '..\..\..\macros.inc'
36
purge add,sub	 ; macros.inc does incorrect substitution
36
purge add,sub	 ; macros.inc does incorrect substitution
37
include 'fasm.inc'
37
include 'fasm.inc'
Line 38... Line 38...
38
 
38
 
-
 
39
include '..\..\..\develop\libraries\box_lib\trunk\editbox.mac'
-
 
40
include '..\..\..\develop\libraries\box_lib\trunk\checkbox.mac'
39
include '..\..\..\develop\libraries\box_lib\trunk\editbox.mac'
41
;include '..\..\..\develop\libraries\box_lib\asm\trunk\editbox_ex.mac'
40
include '..\..\..\develop\libraries\box_lib\load_lib.mac'
42
include '..\..\..\develop\libraries\box_lib\load_lib.mac'
Line 164... Line 166...
164
    call make_fullpaths
166
    call make_fullpaths
165
    mcall 70,file_info_debug
167
    mcall 70,file_info_debug
166
    jmp  still
168
    jmp  still
Line 167... Line 169...
167
 
169
 
168
   norundebug:
-
 
169
    mov  ecx,5
-
 
170
    mov  [ya],ecx
-
 
171
 
-
 
172
    cmp  ah,14
-
 
Line 173... Line 170...
173
    je	 f4
170
   norundebug:
Line 174... Line -...
174
 
-
 
175
    jmp  still
-
 
176
 
-
 
177
f4:
-
 
178
	xor	[bGenerateDebugInfo], 1
-
 
Line 179... Line 171...
179
	mcall	8,,,0x8000000E
171
 
180
	call	draw_checkbox
172
    jmp  still
181
	jmp	still
173
 
182
 
174
 
183
mouse:
175
mouse:
184
  push dword edit1
176
  push dword edit1
185
  call [edit_box_mouse]
177
  call [edit_box_mouse]
-
 
178
  push dword edit2
-
 
179
  call [edit_box_mouse]
186
  push dword edit2
180
  push dword edit3
Line 187... Line 181...
187
  call [edit_box_mouse]
181
  call [edit_box_mouse]
188
  push dword edit3
182
  push dword ch1_dbg
Line 204... Line 198...
204
    mov  edi,title	       ; Draw Window Label Text
198
    mov  edi,title	       ; Draw Window Label Text
205
    mcall
199
    mcall
Line 206... Line 200...
206
 
200
 
Line -... Line 201...
-
 
201
    mcall 9,PROCESSINFO,-1	    
-
 
202
 
-
 
203
    cmp dword[pinfo.box.width],230 ; ïðîâåðÿåì øèðèíó îêíà
-
 
204
    jge @f
-
 
205
      mov dword[pinfo.box.width],230 ; åñëè îêíî î÷åíü óçêîå, óâåëè÷èâàåì øèðèíó äëÿ èçáåæàíèÿ ãëþêîâ
207
    mcall 9,PROCESSINFO,-1	    
206
    @@:
208
 
207
 
209
    mpack ecx,1,1
208
    mpack ecx,1,1
Line 210... Line 209...
210
    mov   ebx,[pinfo.box.width]
209
    mov   ebx,[pinfo.box.width]
211
    sub   ebx,10
210
    sub   ebx,10
212
 
-
 
213
mov eax,8
-
 
214
mov edx,0x4000000B
-
 
215
    madd  ecx, 14,0
-
 
216
;    mcall  ,,,0x4000000C       ; Button: Enter Outfile
-
 
217
    madd  ecx, 14,0
211
 
218
;    mcall  ,,,0x4000000D       ; Button: Enter Path
212
    mov eax,8
219
 
213
    mov edx,0x4000000B
220
    mpack ebx,[pinfo.box.width],MAGIC1
214
    mpack ebx,[pinfo.box.width],MAGIC1
221
    msub  ebx,MAGIC1+10+1,0
215
    msub  ebx,MAGIC1+10+1,0
Line 260... Line 254...
260
    cmp   al,MAX_PATH
254
    cmp   al,MAX_PATH
261
    jbe   @f
255
    jbe   @f
262
    mov   al,MAX_PATH
256
    mov   al,MAX_PATH
263
@@: movzx esi,al
257
@@: movzx esi,al
Line 264... Line -...
264
 
-
 
265
    call draw_checkbox
258
 
Line 266... Line 259...
266
    call draw_messages
259
    call draw_messages
267
 
-
 
268
    mov eax,dword[pinfo.box.width]
-
 
269
    cmp eax,250
-
 
270
    jge @f
-
 
271
      mov eax,250
260
 
272
    @@:
261
    mov eax,dword[pinfo.box.width]
273
    sub eax,127
262
    sub eax,127
274
    mov dword[edit1.width],eax
263
    mov dword[edit1.width],eax ; óñòàíàâëèâàåì øèðèíó òåêñòîâûõ ïîëåé
Line 275... Line 264...
275
    mov dword[edit2.width],eax
264
    mov dword[edit2.width],eax
276
    mov dword[edit3.width],eax
265
    mov dword[edit3.width],eax
277
 
266
 
278
    push dword edit1
267
    push dword edit1
279
    call [edit_box_draw]
268
    call [edit_box_draw]
280
    push dword edit2
269
    push dword edit2
-
 
270
    call [edit_box_draw]
-
 
271
    push dword edit3
Line 281... Line 272...
281
    call [edit_box_draw]
272
    call [edit_box_draw]
Line 282... Line 273...
282
    push dword edit3
273
    push dword ch1_dbg
283
    call [edit_box_draw]
274
    call [check_box_draw]
Line 284... Line 275...
284
 
275
 
Line 285... Line -...
285
    mcall  12,2 ; End of Draw
-
 
286
 
-
 
287
    popa
-
 
288
    ret
-
 
289
 
-
 
290
bottom_right dd ?
-
 
291
 
-
 
292
draw_checkbox:
-
 
293
	mcall	8,<5,10>,<14*3+5,10>,14,[sc.work_button]
-
 
294
	cmp	[bGenerateDebugInfo], 0
-
 
295
	jz	@f
-
 
296
	mov	edx, [sc.work_button_text]
-
 
297
	mcall	38,<7,13>,<14*3+7,14*3+13>
-
 
298
	mcall	38,,<14*3+13,14*3+7>
276
    mcall  12,2 ; End of Draw
299
@@:
277
 
300
	mov	ecx, [sc.work_text]
278
    popa
301
	or	ecx, 0x80000000
279
    ret
302
	mcall	4,<20,14*3+7>,,s_dbgdescr
280
 
Line 358... Line 336...
358
 
336
 
359
  s_compile db 'Š®¬¯¨«.'
337
  s_compile db 'Š®¬¯¨«.'
360
  s_run     db ' ã᪠ '
338
  s_run     db ' ã᪠ '
361
  s_debug   db 'Žâ« ¤ª '
339
  s_debug   db 'Žâ« ¤ª '
-
 
340
  s_dbgdescr db '‘®§¤ ¢ âì ®â« ¤®ç­ãî ¨­ä®à¬ æ¨î',0
Line 362... Line 341...
362
  s_dbgdescr	  db	  '‘®§¤ ¢ âì ®â« ¤®ç­ãî ¨­ä®à¬ æ¨î',0
341
  s_dbgdescr_end:
363
 
342
 
364
  err_message_import db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠box_lib.obj',0
343
  err_message_import db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠box_lib.obj',0
365
  err_message_found_lib db 'Žè¨¡ª  ¯à¨ ¯®¨áª¥ box_lib.obj',0 ;áâப , ª®â®à ï ¡ã¤¥â ¢ áä®à¬¨à®¢ ­­®¬ ®ª­¥, ¥á«¨ ¡¨¡«¨®â¥ª  ­¥ ¡ã¤¥â ­ ©¤¥­ 
344
  err_message_found_lib db 'Žè¨¡ª  ¯à¨ ¯®¨áª¥ box_lib.obj',0 ;áâப , ª®â®à ï ¡ã¤¥â ¢ áä®à¬¨à®¢ ­­®¬ ®ª­¥, ¥á«¨ ¡¨¡«¨®â¥ª  ­¥ ¡ã¤¥â ­ ©¤¥­ 
Line 377... Line 356...
377
 
356
 
378
  s_compile db 'COMPILE'
357
  s_compile db 'COMPILE'
379
  s_run     db '  RUN  '
358
  s_run     db '  RUN  '
380
  s_debug   db ' DEBUG '
359
  s_debug   db ' DEBUG '
-
 
360
  s_dbgdescr db 'Generate debug information',0
Line 381... Line 361...
381
  s_dbgdescr	  db	  'Generate debug information',0
361
  s_dbgdescr_end:
382
 
362
 
383
  err_message_import db 'Error on load import library box_lib.obj',0
363
  err_message_import db 'Error on load import library box_lib.obj',0
384
  err_message_found_lib db 'Sorry I cannot found library box_lib.obj',0 ;áâப , ª®â®à ï ¡ã¤¥â ¢ áä®à¬¨à®¢ ­­®¬ ®ª­¥, ¥á«¨ ¡¨¡«¨®â¥ª  ­¥ ¡ã¤¥â ­ ©¤¥­ 
364
  err_message_found_lib db 'Sorry I cannot found library box_lib.obj',0 ;áâப , ª®â®à ï ¡ã¤¥â ¢ áä®à¬¨à®¢ ­­®¬ ®ª­¥, ¥á«¨ ¡¨¡«¨®â¥ª  ­¥ ¡ã¤¥â ­ ©¤¥­ 
Line 392... Line 372...
392
  edit_box_draw  dd aEdit_box_draw
372
  edit_box_draw  dd aEdit_box_draw
393
  edit_box_key	 dd aEdit_box_key
373
  edit_box_key	 dd aEdit_box_key
394
  edit_box_mouse dd aEdit_box_mouse
374
  edit_box_mouse dd aEdit_box_mouse
395
  ;version_ed     dd aVersion_ed
375
  ;version_ed     dd aVersion_ed
Line 396... Line 376...
396
 
376
 
397
  ;check_box_draw  dd aCheck_box_draw
377
  check_box_draw  dd aCheck_box_draw
398
  ;check_box_mouse dd aCheck_box_mouse
378
  check_box_mouse dd aCheck_box_mouse
Line 399... Line 379...
399
  ;version_ch      dd aVersion_ch
379
  ;version_ch      dd aVersion_ch
Line 400... Line 380...
400
 
380
 
401
  dd 0,0
381
  dd 0,0
402
 
382
 
403
  aEdit_box_draw  db 'edit_box',0
383
  aEdit_box_draw  db 'edit_box',0
Line 404... Line 384...
404
  aEdit_box_key   db 'edit_box_key',0
384
  aEdit_box_key   db 'edit_box_key',0
405
  aEdit_box_mouse db 'edit_box_mouse',0
385
  aEdit_box_mouse db 'edit_box_mouse',0
406
  ;aVersion_ed     db 'version_ed',0
386
  ;aVersion_ed     db 'version_ed',0
Line 407... Line 387...
407
 
387
 
408
  ;aCheck_box_draw  db 'check_box_draw',0
388
  aCheck_box_draw  db 'check_box_draw',0
409
  ;aCheck_box_mouse db 'check_box_mouse',0
389
  aCheck_box_mouse db 'check_box_mouse',0
-
 
390
  ;aVersion_ch      db 'version_ch',0
-
 
391
 
-
 
392
edit1 edit_box 153, 56, 1, 0xffffff, 0xff, 0x80ff, 0, 0x8000, (outfile-infile-1), infile, mouse_dd, 0, 11,11
-
 
393
edit2 edit_box 153, 56, 17, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path-outfile-1), outfile, mouse_dd, 0, 7,7
-
 
394
edit3 edit_box 153, 56, 33, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path_end-path-1), path, mouse_dd, 0, 6,6
-
 
395
;ch1_dbg check_box 5, 49, 6, 12, 0xffffff, 0x80ff, 0, s_dbgdescr,(s_dbgdescr_end-s_dbgdescr)
-
 
396
ch1_dbg:
-
 
397
  .left:	   dw  5
-
 
398
  .top: 	   dw 49
-
 
399
  .ch_text_margin: dd 6
-
 
400
  .ch_size:	   dd 12
-
 
401
  .color:	   dd 0xffffff
Line 410... Line 402...
410
  ;aVersion_ch      db 'version_ch',0
402
  .border_color:   dd 0x80ff
Line 411... Line 403...
411
 
403
  .text_color:	   dd 0
412
edit1 edit_box 153, 56, 1, 0xffffff, 0xff, 0x80ff, 0, 0xa000, (outfile-infile-1), infile, mouse_dd, 0, 11,11
404
  .text:	   dd s_dbgdescr
413
edit2 edit_box 153, 56, 17, 0xffffff, 0xff, 0x80ff, 0, 0xa000,(path-outfile-1), outfile, mouse_dd, 0, 7,7
405
  .ch_text_length: dd (s_dbgdescr_end-s_dbgdescr)
414
edit3 edit_box 153, 56, 33, 0xffffff, 0xff, 0x80ff, 0, 0xa000,(path_end-path-1), path, mouse_dd, 0, 6,6
406
  .flags:	   dd 0
415
 
407
 
416
mouse_dd dd 0 ;íóæíî äëÿ Shift-à â editbox
408
mouse_dd dd 0 ;íóæíî äëÿ Shift-à â editbox
417
 
409
 
418
infile	  db 'example.asm'
410
infile	  db 'example.asm'
Line 419... Line -...
419
  times MAX_PATH+$-infile  db 0
-
 
420
outfile db 'example'
-
 
421
  times MAX_PATH+$-outfile db 0
-
 
Line 422... Line 411...
422
path	db '/rd/1/'
411
  times MAX_PATH-$+infile  db 0
423
  times MAX_PATH+$-path    db 0
412
outfile db 'example'
424
path_end:
413
  times MAX_PATH-$+outfile db 0
425
lf db 13,10,0
414
path	db '/rd/1/'
Line 466... Line 455...
466
    mov    [start_time],eax
455
    mov    [start_time],eax
Line 467... Line 456...
467
 
456
 
468
    call   preprocessor
457
    call   preprocessor
469
    call   parser
458
    call   parser
470
    call   assembler
459
    call   assembler
471
    cmp    [bGenerateDebugInfo], 0
460
    bt	   dword[ch1_dbg.flags],1 ;cmp [bGenerateDebugInfo], 0
472
    jz	   @f
461
    jae    @f			  ;jz @f
473
    call   symbol_dump
462
    call   symbol_dump
474
@@:
463
@@:
Line 475... Line 464...
475
    call   formatter
464
    call   formatter
Line 542... Line 531...
542
 
531
 
Line 543... Line 532...
543
_counter db 4,'0000'
532
_counter db 4,'0000'
544
 
533
 
545
_mode	       dd NORMAL_MODE
534
_mode	       dd NORMAL_MODE
Line 546... Line 535...
546
_run_outfile  dd 0
535
_run_outfile  dd 0
547
bGenerateDebugInfo db 0
536
;bGenerateDebugInfo db 0
548
 
537
 
549
sub_table:
538
sub_table: