Subversion Repositories Kolibri OS

Rev

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

Rev 5939 Rev 6086
Line 1... Line 1...
1
;Ž£à®¬­ ï ¡« £®¤ à­®áâì ¢á¥¬, ªâ® ¯®¬®£ «: ª®¤®¬/ᮢ¥â®¬/¤¨§ ©­®¬ ...
1
;Ž£à®¬­ ï ¡« £®¤ à­®áâì ¢á¥¬, ªâ® ¯®¬®£ «: ª®¤®¬/ᮢ¥â®¬/¤¨§ ©­®¬ ...
Line 2... Line 2...
2
 
2
 
3
use32
3
use32
4
  org 0x0
4
  org 0x0
5
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
-
 
6
  dd 0x01
-
 
7
  dd start
-
 
8
  dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
-
 
9
  dd mem
5
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
10
  dd stacktop
6
  dd 1, start, i_end, mem, stacktop
11
  dd file_name ; command line
7
  dd file_name ; command line
Line 12... Line 8...
12
  dd sys_path
8
  dd sys_path
13
 
9
 
Line 19... Line 15...
19
 
15
 
20
include '../../proc32.inc'
16
include '../../proc32.inc'
21
;include '../../config.inc'
17
;include '../../config.inc'
22
include '../../macros.inc'
18
include '../../macros.inc'
-
 
19
include '../../dll.inc'
23
include '../../dll.inc'
20
include '../../KOSfuncs.inc'
24
include '../../develop/libraries/box_lib/load_lib.mac'
21
include '../../develop/libraries/box_lib/load_lib.mac'
25
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
22
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
26
include '../../system/desktop/trunk/kglobals.inc'
23
include '../../system/desktop/trunk/kglobals.inc'
27
include '../../system/desktop/trunk/unpacker.inc'
24
include '../../system/desktop/trunk/unpacker.inc'
Line 57... Line 54...
57
	end if
54
	end if
Line 58... Line 55...
58
 
55
 
59
	stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
56
	stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
Line 60... Line 57...
60
	mov [buf],eax
57
	mov [buf],eax
61
 
58
 
62
	mov [run_file_70.Function], 0
59
	mov [run_file_70.Function], SSF_READ_FILE
63
	mov [run_file_70.Position], 0
60
	mov [run_file_70.Position], 0
64
	mov [run_file_70.Flags], 0
61
	mov [run_file_70.Flags], 0
65
	mov [run_file_70.Count], dword size
62
	mov [run_file_70.Count], dword size
66
	m2m [run_file_70.Buffer], eax
63
	m2m [run_file_70.Buffer], eax
67
	mov byte[run_file_70+20], 0
64
	mov byte[run_file_70+20], 0
68
	mov [run_file_70.FileName], file_name
65
	mov [run_file_70.FileName], file_name
69
	mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
66
	mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
70
	cmp ebx,0xffffffff
67
	cmp ebx,0xffffffff
71
	je @f
68
	je @f
72
		;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
69
		;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
Line 82... Line 79...
82
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
79
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
83
icon_tl_sys dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï á¨á⥬­ëå ¨ª®­®ª
80
icon_tl_sys dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï á¨á⥬­ëå ¨ª®­®ª
Line 84... Line 81...
84
 
81
 
85
align 4
82
align 4
86
start:
83
start:
Line 87... Line 84...
87
	mcall 48,3,sc,sizeof.sys_colors_new
84
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.sys_colors_new
88
 
85
 
89
	mcall 68,11
86
	mcall SF_SYS_MISC,SSF_HEAP_INIT
Line 90... Line 87...
90
	or eax,eax
87
	or eax,eax
91
	jz button.exit
88
	jz button.exit
Line 92... Line 89...
92
 
89
 
93
	mcall 66,1,1 ;scan code
90
	mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1 ;scan code
94
	mcall 40,0xC0000027
91
	mcall SF_SET_EVENTS_MASK,0xC0000027
95
 
92
 
Line 105... Line 102...
105
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
102
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨«¨áì ¡¨¡«¨®â¥ª¨
106
mov	ebp,lib0
103
mov	ebp,lib0
107
.test_lib_open:
104
.test_lib_open:
108
	cmp	dword [ebp+ll_struc_size-4],0
105
	cmp	dword [ebp+ll_struc_size-4],0
109
	jz	@f
106
	jz	@f
110
	mcall -1 ;exit not correct
107
	mcall SF_TERMINATE_PROCESS ;exit not correct
111
@@:
108
@@:
112
	add ebp,ll_struc_size
109
	add ebp,ll_struc_size
113
	cmp ebp,load_lib_end
110
	cmp ebp,load_lib_end
114
	jl .test_lib_open
111
	jl .test_lib_open
Line 207... Line 204...
207
	load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2
204
	load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2
208
	mov eax,dword[icon_tl_sys]
205
	mov eax,dword[icon_tl_sys]
209
	mov dword[tree1.data_img],eax
206
	mov dword[tree1.data_img],eax
210
;------------------------------------------------------------------------------
207
;------------------------------------------------------------------------------
211
	copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
208
	copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
212
	mcall 70,tree_file_struct
209
	mcall SF_FILE,tree_file_struct
Line 213... Line 210...
213
 
210
 
214
	cmp ebx,-1
211
	cmp ebx,-1
215
	je .end_dir_init
212
	je .end_dir_init
216
		mov eax,dir_mem
213
		mov eax,dir_mem
Line 270... Line 267...
270
		cmp edx,max_synt_auto_open
267
		cmp edx,max_synt_auto_open
271
		jl @b
268
		jl @b
272
	@@:
269
	@@:
Line 273... Line 270...
273
 
270
 
274
;--- load color option file ---
-
 
275
	mov ebx,dword[fn_col_option]
271
;--- load color option file ---
Line 276... Line 272...
276
	call open_unpac_synt_file
272
	stdcall open_unpac_synt_file,[fn_col_option]
277
 
273
 
278
;--- get cmd line ---
274
;--- get cmd line ---
279
	cmp byte[openfile_path+3],0 ;openfile_path
275
	cmp byte[openfile_path+3],0 ;openfile_path
-
 
276
	je @f ;if file names exist
280
	je @f ;if file names exist
277
		mov esi,openfile_path
281
		mov esi,openfile_path
278
		stdcall auto_open_syntax,esi
282
		call strlen ;eax=strlen
279
		call strlen ;eax=strlen
Line 289... Line 286...
289
red_win:
286
red_win:
290
	call draw_window
287
	call draw_window
Line 291... Line 288...
291
 
288
 
292
align 4
289
align 4
293
still:
290
still:
294
	mcall 10
291
	mcall SF_WAIT_EVENT
295
	cmp dword[exit_code],1
292
	cmp dword[exit_code],1
Line 296... Line 293...
296
	je button.exit
293
	je button.exit
297
 
294
 
Line 307... Line 304...
307
	@@:
304
	@@:
308
	jmp still
305
	jmp still
Line 309... Line 306...
309
 
306
 
310
align 4
307
align 4
311
draw_window:
308
draw_window:
Line 312... Line 309...
312
	mcall 12,1
309
	mcall SF_REDRAW,SSF_BEGIN_DRAW
313
 
310
 
314
	mov edx,[sc.work]
-
 
315
	or  edx,0x73000000
311
	mov edx,[sc.work]
Line 316... Line 312...
316
	mov edi,hed
312
	or  edx,0x73000000
317
	mcall 0,dword[wnd_s_pos],dword[wnd_s_pos+4]
313
	mcall SF_CREATE_WINDOW,dword[wnd_s_pos],dword[wnd_s_pos+4],,,hed
318
 
314
 
Line 319... Line 315...
319
	mcall 9,procinfo,-1
315
	mcall SF_THREAD_INFO,procinfo,-1
320
	mov edi,tedit0 ;§­ ç¥­¨¥ edi ­ã¦­® ¤«ï EvSize ¨ ted_wnd_t
316
	mov edi,tedit0 ;§­ ç¥­¨¥ edi ­ã¦­® ¤«ï EvSize ¨ ted_wnd_t
321
	call EvSize
317
	call EvSize
322
 
-
 
323
	movzx ebx,word[procinfo.client_box.width]
318
 
324
	inc bx
-
 
325
	mcall 13,,ted_wnd_t ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
319
	movzx ebx,word[procinfo.client_box.width]
326
 
-
 
327
	call draw_but_toolbar
320
	inc bx
Line 328... Line 321...
328
	
321
	mcall SF_DRAW_RECT,,ted_wnd_t ;¢¥àå­¨© ¯àאַ㣮«ì­¨ª, ¤«ï ®ç¨á⪨ ¢¥àå­¥© ¯ ­¥«¨
329
	stdcall [kmainmenu_draw], [main_menu]
322
	call draw_but_toolbar
Line 330... Line 323...
330
 
323
	stdcall [kmainmenu_draw], [main_menu]
331
	stdcall [ted_draw], tedit0
324
	stdcall [ted_draw], tedit0
332
 
325
 
Line 361... Line 354...
361
	ret
354
	ret
362
endp
355
endp
Line 363... Line 356...
363
 
356
 
364
align 4
357
align 4
365
key:
358
key:
366
  mcall 66,3 ;66.3 ¯®«ãç¨âì á®áâ®ï­¨¥ ã¯à ¢«ïîé¨å ª« ¢¨è
359
  mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 ¯®«ãç¨âì á®áâ®ï­¨¥ ã¯à ¢«ïîé¨å ª« ¢¨è
367
  xor esi,esi
360
  xor esi,esi
368
  mov ecx,1
361
  mov ecx,1
369
  test al,0x03 ;[Shift]
362
  test al,0x03 ;[Shift]
370
  jz @f
363
  jz @f
Line 383... Line 376...
383
  test al,0x80 ;[NumLock]
376
  test al,0x80 ;[NumLock]
384
  jz @f
377
  jz @f
385
    or esi,KM_NUMLOCK
378
    or esi,KM_NUMLOCK
386
  @@:
379
  @@:
Line 387... Line 380...
387
 
380
 
388
  mcall 26,2,,conv_tabl ;26.2 ¯®«ãç¨âì à áª« ¤ªã ª« ¢¨ âãàë
381
  mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,conv_tabl ;26.2 ¯®«ãç¨âì à áª« ¤ªã ª« ¢¨ âãàë
389
  mcall 2 ;¯®«ãç ¥¬ ª®¤ ­ ¦ â®© ª« ¢¨è¨
382
  mcall SF_GET_KEY
Line 390... Line 383...
390
  stdcall [tl_key], tree1
383
  stdcall [tl_key], tree1
391
 
384
 
392
  test word [edit2.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
385
  test word [edit2.flags],10b;ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
Line 413... Line 406...
413
  jmp still
406
  jmp still
Line 414... Line 407...
414
 
407
 
415
align 4
408
align 4
Line 416... Line 409...
416
button:
409
button:
417
 
410
 
418
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
411
  mcall SF_GET_BUTTON
419
  cmp ah,3
412
  cmp ah,3
420
  jne @f
413
  jne @f
421
    call ted_but_new_file
414
    call ted_but_new_file
Line 529... Line 522...
529
		stdcall mem.Free,[unpac_mem]
522
		stdcall mem.Free,[unpac_mem]
530
	@@:
523
	@@:
Line 531... Line 524...
531
 
524
 
532
	stdcall [ted_delete], tedit0
525
	stdcall [ted_delete], tedit0
533
	stdcall [tl_data_clear], tree1
526
	stdcall [tl_data_clear], tree1
Line 534... Line 527...
534
	mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
527
	mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë
Line 535... Line 528...
535
 
528