Subversion Repositories Kolibri OS

Rev

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

Rev 31 Rev 97
Line 27... Line 27...
27
     mov  ebx, 3
27
     mov  ebx, 3
28
     mov  ecx, sc
28
     mov  ecx, sc
29
     mov  edx, sizeof.system_colors
29
     mov  edx, sizeof.system_colors
30
     int  0x40
30
     int  0x40
Line 31... Line 31...
31
 
31
 
32
     mov  eax, 58		 ; load MENU.DAT
32
     mov  eax, 70	  ; load MENU.DAT
33
     mov  ebx, fileinfo
33
     mov  ebx, fileinfo
34
     int  0x40
34
     int  0x40
-
 
35
     test eax, eax	   ; error ?
-
 
36
     jz  @f
35
     test eax, eax		 ; error ?
37
     cmp  eax,6
-
 
38
     jnz  close
36
     jnz  close
39
  @@:
37
     test ebx, ebx		 ; length = 0 ?
40
     test ebx, ebx	   ; length = 0 ?
38
     jz   close
41
     jz   close
39
     mov  ecx, ebx
42
     mov  ecx, ebx
40
     mov  edi, mem_end
43
     mov  edi, mem_end
Line 231... Line 234...
231
    sub  ecx, esi
234
    sub  ecx, esi
232
    inc  ecx		     ; length of filename
235
    inc  ecx		 ; length of filename
233
    mov  edi, fileinfo_start.name
236
    mov  edi, fileinfo_start.name
234
    rep  movsb		     ; copy string
237
    rep  movsb		   ; copy string
235
    mov  byte [edi], 0	     ; store terminator
238
    mov  byte [edi], 0	       ; store terminator
236
 
-
 
237
;    mov  eax,fileinfo_start.name
-
 
238
;    cmp  eax,'/rd/'
-
 
239
;    jne  run_hd
-
 
240
;    mov  ebx,fileinfo_start.name+6
-
 
241
;    mov  eax,19
-
 
242
;    xor  ecx,ecx
-
 
243
;    jmp  run_for_all
-
 
244
;run_hd:
-
 
245
    mov  eax, 58	     ; start program
239
    mov  eax, 70	 ; start program
246
    mov  ebx, fileinfo_start
240
    mov  ebx, fileinfo_start
247
;run_for_all:
-
 
248
    int  0x40
241
    int  0x40
249
    mcall 5,100
242
;    mcall 5,100
250
;    mov  eax,5
-
 
251
;    mov  ebx,100
-
 
252
;    int  0x40
-
 
253
 
-
 
254
    or	 [close_now], 1      ; set close flag
243
    or	   [close_now], 1      ; set close flag
255
 
-
 
256
    pop  edi
244
    pop  edi
257
    mov  [mousemask], 0
245
    mov  [mousemask], 0
258
    jmp  close
246
    jmp  close
Line 259... Line 247...
259
 
247
 
Line 308... Line 296...
308
    mov  [edx + prev_sel], al ; clear previous selected element
296
    mov  [edx + prev_sel], al ; clear previous selected element
309
    mov  [edx + child], 0
297
    mov  [edx + child], 0
Line 310... Line 298...
310
 
298
 
311
    cmp  [thread_stack], 0x1e000
299
    cmp  [thread_stack], 0x1e000
312
    jne  thread_stack_not_full
300
    jne  thread_stack_not_full
Line 313... Line 301...
313
    mov  [thread_stack], 0xc000
301
    mov  [thread_stack], 0xE000
314
 
302
 
315
thread_stack_not_full:
303
thread_stack_not_full:
316
    add  [thread_stack], 0x2000 ; start new thread
304
    add  [thread_stack], 0x2000 ; start new thread
Line 528... Line 516...
528
    ret
516
    ret
Line 529... Line 517...
529
 
517
 
Line 530... Line 518...
530
 
518
 
531
;*** DATA AREA ****************************************************************
519
;*** DATA AREA ****************************************************************
Line 532... Line 520...
532
 
520
 
533
thread_stack   dd   0xc000
521
thread_stack   dd   0xE000
534
processes      dd   0
522
processes      dd   0
-
 
523
 
535
 
524
fileinfo:
536
fileinfo:
525
 .subfunction	 dd   0 	      ; 0=READ
537
 .mode	       dd   0	       ; 0=READ
-
 
538
 .start_block  dd   0x0        ; 512 block to read 0+
526
 .start 	 dd   0 	      ; start byte
539
 .size	       dd   (0x10000-mem_end)/512 ;0x80; blocks to read (0x10000 bytes max)
527
 .size_high	 dd   0 	      ; rezerved
Line 540... Line 528...
540
 .return       dd   mem_end    ; return data pointer
528
 .size		 dd   0x10000-mem_end ; blocks to read
541
 .work	       dd   workarea   ; work area for os - 16384 bytes
529
 .return	 dd   mem_end	      ; return data pointer
542
 .name:
530
 .name:
543
     db   '/RD/1/MENU.DAT',0   ; ASCIIZ dir & filename
531
     db   '/RD/1/MENU.DAT',0   ; ASCIIZ dir & filename
544
 
532
 
545
fileinfo_start:
533
fileinfo_start:
546
 .mode	       dd   16	       ; 16=START APPLICATION
534
 .subfunction	 dd   7 	 ; 7=START APPLICATION
547
 .start_block  dd   0x0        ; nop
535
 .flags 	 dd   0 	 ; flags
Line 548... Line 536...
548
 .size	       dd   0x0        ; nop
536
 .params	 dd   0x0	 ; nop
Line 561... Line 549...
561
sc system_colors
549
sc system_colors
Line 562... Line 550...
562
 
550
 
563
menu_data:
551
menu_data:
Line 564... Line -...
564
  rb 0x4000  ;x10000
-
 
565
 
-
 
566
workarea:
-
 
567
  rb 0x4000  ;0x10000
552
  rb 0x4000  ;x10000
568
 
553
 
569
virtual at 0	      ; PROCESSES TABLE (located at menu_data)
554
virtual at 0	      ; PROCESSES TABLE (located at menu_data)
570
  pointer      dd ?   ; +0    pointer in file
555
  pointer      dd ?   ; +0    pointer in file
571
  rows	       db ?   ; +4    numer of strings
556
  rows		 db ?	; +4    numer of strings