Subversion Repositories Kolibri OS

Rev

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

Rev 420 Rev 427
Line 19... Line 19...
19
  .stack_top   dd ?    ;+24
19
  .stack_top   dd ?    ;+24
20
  .i_param     dd ?    ;+28
20
  .i_param     dd ?    ;+28
21
  .i_icon      dd ?    ;+32
21
  .i_icon      dd ?    ;+32
22
}
22
}
Line 23... Line -...
23
 
-
 
24
struc TSS
-
 
25
{
-
 
26
  ._back   rw 2
-
 
27
  ._esp0   rd 1
-
 
28
  ._ss0    rw 2
-
 
29
  ._esp1   rd 1
-
 
30
  ._ss1    rw 2
-
 
31
  ._esp2   rd 1
-
 
32
  ._ss2    rw 2
-
 
33
  ._cr3    rd 1
-
 
34
  ._eip    rd 1
-
 
35
  ._eflags rd 1
-
 
36
  ._eax    rd 1
-
 
37
  ._ecx    rd 1
-
 
38
  ._edx    rd 1
-
 
39
  ._ebx    rd 1
-
 
40
  ._esp    rd 1
-
 
41
  ._ebp    rd 1
-
 
42
  ._esi    rd 1
-
 
43
  ._edi    rd 1
-
 
44
  ._es     rw 2
-
 
45
  ._cs     rw 2
-
 
46
  ._ss     rw 2
-
 
47
  ._ds     rw 2
-
 
48
  ._fs     rw 2
-
 
49
  ._gs     rw 2
-
 
50
  ._ldt    rw 2
-
 
51
  ._trap   rw 1
-
 
52
  ._io     rw 1
-
 
53
}
-
 
54
 
-
 
55
virtual at 0
-
 
56
  TSS  TSS
-
 
Line 57... Line 23...
57
end virtual
23
 
58
 
24
 
59
struc APP_PARAMS
25
struc APP_PARAMS
60
{ .app_cmdline   ;0x00
26
{ .app_cmdline   ;0x00
Line 482... Line 448...
482
           ret
448
           ret
483
endp
449
endp
Line 484... Line 450...
484
 
450
 
485
align 4
451
align 4
-
 
452
set_cr3:
486
set_cr3:
453
 
487
           mov esi, [CURRENT_TASK]
-
 
488
           mov ebx, esi
-
 
489
           shl esi,8
-
 
490
           mov [SLOT_BASE+esi+0xB8],eax
-
 
491
           imul   ebx,tss_step
-
 
492
           add    ebx,tss_data
454
           mov ebx, [current_slot]
493
           mov [ebx+28], eax
455
           mov [ebx+APPDATA.dir_table], eax
-
 
456
           mov cr3, eax
-
 
457
 
-
 
458
;           mov esi, [CURRENT_TASK]
-
 
459
;           mov ebx, esi
-
 
460
;           shl esi,8
-
 
461
;           mov [SLOT_BASE+esi+0xB8],eax
-
 
462
;           imul   ebx,tss_step
-
 
463
;           add    ebx,tss_data
-
 
464
;           mov [ebx+28], eax
494
           mov cr3, eax
465
;           mov cr3, eax
Line 495... Line 466...
495
           ret
466
           ret
496
 
467
 
Line 862... Line 833...
862
           test eax, eax
833
           test eax, eax
863
           jz .failed
834
           jz .failed
Line 864... Line 835...
864
 
835
 
Line 865... Line 836...
865
           mov [slot], eax
836
           mov [slot], eax
866
 
-
 
867
           mov    esi,[CURRENT_TASK]
-
 
868
           shl    esi,8
837
 
Line 869... Line 838...
869
           add    esi,SLOT_BASE
838
           mov    esi,[current_slot]
870
           mov    ebx,esi             ;ebx=esi - pointer to extended information about current thread
839
           mov    ebx,esi             ;ebx=esi - pointer to extended information about current thread
871
 
840