Subversion Repositories Kolibri OS

Rev

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

Rev 378 Rev 379
Line 502... Line 502...
502
include 'vmodeld.inc'
502
include 'vmodeld.inc'
503
;!!!!!!!!!!!!!!!!!!!!!!!
503
;!!!!!!!!!!!!!!!!!!!!!!!
Line 504... Line 504...
504
 
504
 
Line 505... Line 505...
505
; LOAD FONTS I and II
505
; LOAD FONTS I and II
506
 
506
 
507
        mov   [0x3000],dword 1
507
        mov   [CURRENT_TASK],dword 1
Line 508... Line 508...
508
        mov   [0x3004],dword 1
508
        mov   [TASK_COUNT],dword 1
509
        mov   [0x3010],dword 0x3020
509
        mov   [TASK_BASE],dword TASK_DATA
510
 
510
 
511
        mov   esi,char
511
        mov   esi,char
Line 634... Line 634...
634
        mov ebx, PROC_BASE+256+APP_OBJ_OFFSET
634
        mov ebx, PROC_BASE+256+APP_OBJ_OFFSET
635
        mov  dword [0x80000+256+APPDATA.fd_obj], ebx
635
        mov  dword [0x80000+256+APPDATA.fd_obj], ebx
636
        mov  dword [0x80000+256+APPDATA.bk_obj], ebx
636
        mov  dword [0x80000+256+APPDATA.bk_obj], ebx
Line 637... Line 637...
637
 
637
 
638
        ; task list
638
        ; task list
639
        mov  [0x3020+TASKDATA.wnd_number], 1 ; on screen number
639
        mov  [TASK_DATA+TASKDATA.wnd_number], 1 ; on screen number
640
        mov  [0x3020+TASKDATA.pid], 1        ; process id number
640
        mov  [TASK_DATA+TASKDATA.pid], 1        ; process id number
Line 641... Line 641...
641
        mov  [0x3020+TASKDATA.mem_start], 0  ; process base address
641
        mov  [TASK_DATA+TASKDATA.mem_start], 0  ; process base address
642
 
642
 
643
        mov  edi,tss_data+tss_step
643
        mov  edi,tss_data+tss_step
644
        mov ecx, (tss_step)/4
644
        mov ecx, (tss_step)/4
Line 717... Line 717...
717
        movsd
717
        movsd
718
        movsd
718
        movsd
719
        call    load_skin
719
        call    load_skin
Line 720... Line 720...
720
 
720
 
721
; LOAD FIRST APPLICATION
721
; LOAD FIRST APPLICATION
722
        mov   [0x3000],dword 1
722
        mov   [CURRENT_TASK],dword 1
723
        mov   [0x3004],dword 1
723
        mov   [TASK_COUNT],dword 1
724
        cli
724
        cli
725
        cmp   byte [0x2f0000+0x9030],1
725
        cmp   byte [0x2f0000+0x9030],1
Line 726... Line 726...
726
        jne   no_load_vrr_m
726
        jne   no_load_vrr_m
Line 742... Line 742...
742
        mov   eax, 0xDEADBEEF        ; otherwise halt
742
        mov   eax, 0xDEADBEEF        ; otherwise halt
743
        hlt
743
        hlt
744
first_app_found:
744
first_app_found:
745
        cli
745
        cli
Line 746... Line 746...
746
 
746
 
747
        ;mov   [0x3004],dword 2
747
        ;mov   [TASK_COUNT],dword 2
Line 748... Line 748...
748
        mov   [0x3000],dword 1       ; set OS task fisrt
748
        mov   [CURRENT_TASK],dword 1       ; set OS task fisrt
749
 
749
 
750
 
750
 
Line 1059... Line 1059...
1059
    jne   sopl8
1059
    jne   sopl8
1060
    mov   [esp+36],dword 1
1060
    mov   [esp+36],dword 1
1061
    ret
1061
    ret
Line 1062... Line 1062...
1062
 
1062
 
1063
  sopl8:
1063
  sopl8:
1064
    mov   edx,[0x3010]
1064
    mov   edx,[TASK_BASE]
1065
    mov   edx,[edx+0x4]
1065
    mov   edx,[edx+0x4]
1066
    and   ebx,65535
1066
    and   ebx,65535
1067
    cld
1067
    cld
Line 1324... Line 1324...
1324
     ; ebx color
1324
     ; ebx color
1325
     ; ecx start of text
1325
     ; ecx start of text
1326
     ; edx length
1326
     ; edx length
1327
     ; edi 1 force
1327
     ; edi 1 force
Line 1328... Line 1328...
1328
 
1328
 
1329
;        mov     edi,[0x3000]
1329
;        mov     edi,[CURRENT_TASK]
1330
;        shl     edi,8
1330
;        shl     edi,8
1331
;        add     ax,word[edi+0x80000+APPDATA.wnd_clientbox.top]
1331
;        add     ax,word[edi+0x80000+APPDATA.wnd_clientbox.top]
1332
;        rol     eax,16
1332
;        rol     eax,16
1333
;        add     ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
1333
;        add     ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
Line 1337... Line 1337...
1337
     mov   ecx,64+4
1337
     mov   ecx,64+4
1338
     sub   ecx,eax
1338
     sub   ecx,eax
1339
     add   ecx,esp
1339
     add   ecx,esp
1340
     mov   eax,[esp+64+32-8+4]
1340
     mov   eax,[esp+64+32-8+4]
1341
     push  edx                       ; add window start x & y
1341
     push  edx                       ; add window start x & y
1342
     mov   edx,[0x3010]
1342
     mov   edx,[TASK_BASE]
1343
     mov   ebx,[edx-twdw+WDATA.box.left]
1343
     mov   ebx,[edx-twdw+WDATA.box.left]
1344
        add     ebx, [(edx-0x3000)*8+0x80000+APPDATA.wnd_clientbox.left]
1344
        add     ebx, [(edx-CURRENT_TASK)*8+0x80000+APPDATA.wnd_clientbox.left]
1345
     shl   ebx,16
1345
     shl   ebx,16
1346
     add   ebx,[edx-twdw+WDATA.box.top]
1346
     add   ebx,[edx-twdw+WDATA.box.top]
1347
        add     ebx, [(edx-0x3000)*8+0x80000+APPDATA.wnd_clientbox.top]
1347
        add     ebx, [(edx-CURRENT_TASK)*8+0x80000+APPDATA.wnd_clientbox.top]
1348
     add   eax,ebx
1348
     add   eax,ebx
1349
     pop   edx
1349
     pop   edx
1350
     mov   ebx,[esp+64+32-12+4]
1350
     mov   ebx,[esp+64+32-12+4]
1351
        and     ebx, not 0x80000000     ; force counted string
1351
        and     ebx, not 0x80000000     ; force counted string
1352
        mov     esi, [esp+64+4+4]
1352
        mov     esi, [esp+64+4+4]
Line 1403... Line 1403...
1403
 
1403
 
1404
     cmp  eax,2                      ; KEYBOARD
1404
     cmp  eax,2                      ; KEYBOARD
1405
     jnz  nsyse2
1405
     jnz  nsyse2
1406
     cmp  ebx,1
1406
     cmp  ebx,1
1407
     jnz  kbnobase
1407
     jnz  kbnobase
1408
     mov  edi,[0x3010]
1408
     mov  edi,[TASK_BASE]
1409
     add  ecx,[edi+TASKDATA.mem_start]
1409
     add  ecx,[edi+TASKDATA.mem_start]
1410
     mov  eax,ecx
1410
     mov  eax,ecx
1411
     mov  ebx,keymap
1411
     mov  ebx,keymap
1412
     mov  ecx,128
1412
     mov  ecx,128
1413
     call memmove
1413
     call memmove
1414
     ret
1414
     ret
1415
   kbnobase:
1415
   kbnobase:
1416
     cmp  ebx,2
1416
     cmp  ebx,2
1417
     jnz  kbnoshift
1417
     jnz  kbnoshift
1418
     mov  edi,[0x3010]
1418
     mov  edi,[TASK_BASE]
1419
     add  ecx,[edi+TASKDATA.mem_start]
1419
     add  ecx,[edi+TASKDATA.mem_start]
1420
     mov  eax,ecx
1420
     mov  eax,ecx
1421
     mov  ebx,keymap_shift
1421
     mov  ebx,keymap_shift
1422
     mov  ecx,128
1422
     mov  ecx,128
1423
     call memmove
1423
     call memmove
1424
     ret
1424
     ret
1425
   kbnoshift:
1425
   kbnoshift:
1426
     cmp  ebx,3
1426
     cmp  ebx,3
1427
     jne  kbnoalt
1427
     jne  kbnoalt
1428
     mov  edi,[0x3010]
1428
     mov  edi,[TASK_BASE]
1429
     add  ecx,[edi+TASKDATA.mem_start]
1429
     add  ecx,[edi+TASKDATA.mem_start]
1430
     mov  eax,ecx
1430
     mov  eax,ecx
1431
     mov  ebx,keymap_alt
1431
     mov  ebx,keymap_alt
1432
     mov  ecx,128
1432
     mov  ecx,128
Line 1606... Line 1606...
1606
 
1606
 
1607
     cmp  eax,2
1607
     cmp  eax,2
1608
     jne  ngsyse2
1608
     jne  ngsyse2
1609
     cmp  ebx,1
1609
     cmp  ebx,1
1610
     jnz  kbnobaseret
1610
     jnz  kbnobaseret
1611
     mov  edi,[0x3010]
1611
     mov  edi,[TASK_BASE]
1612
     add  ecx,[edi+TASKDATA.mem_start]
1612
     add  ecx,[edi+TASKDATA.mem_start]
1613
     mov  ebx,ecx
1613
     mov  ebx,ecx
1614
     mov  eax,keymap
1614
     mov  eax,keymap
1615
     mov  ecx,128
1615
     mov  ecx,128
1616
     call memmove
1616
     call memmove
1617
     ret
1617
     ret
1618
   kbnobaseret:
1618
   kbnobaseret:
1619
     cmp  ebx,2
1619
     cmp  ebx,2
1620
     jnz  kbnoshiftret
1620
     jnz  kbnoshiftret
1621
     mov  edi,[0x3010]
1621
     mov  edi,[TASK_BASE]
1622
     add  ecx,[edi+TASKDATA.mem_start]
1622
     add  ecx,[edi+TASKDATA.mem_start]
1623
     mov  ebx,ecx
1623
     mov  ebx,ecx
1624
     mov  eax,keymap_shift
1624
     mov  eax,keymap_shift
1625
     mov  ecx,128
1625
     mov  ecx,128
1626
     call memmove
1626
     call memmove
1627
     ret
1627
     ret
1628
   kbnoshiftret:
1628
   kbnoshiftret:
1629
     cmp  ebx,3
1629
     cmp  ebx,3
1630
     jne  kbnoaltret
1630
     jne  kbnoaltret
1631
     mov  edi,[0x3010]
1631
     mov  edi,[TASK_BASE]
1632
     add  ecx,[edi+TASKDATA.mem_start]
1632
     add  ecx,[edi+TASKDATA.mem_start]
1633
     mov  ebx,ecx
1633
     mov  ebx,ecx
1634
     mov  eax,keymap_alt
1634
     mov  eax,keymap_alt
1635
     mov  ecx,128
1635
     mov  ecx,128
Line 1731... Line 1731...
1731
           ret
1731
           ret
1732
mswin:
1732
mswin:
1733
           mov  eax,[0xfb0a]
1733
           mov  eax,[0xfb0a]
1734
           shl  eax,16
1734
           shl  eax,16
1735
           mov  ax,[0xfb0c]
1735
           mov  ax,[0xfb0c]
1736
           mov  esi,[0x3010]
1736
           mov  esi,[TASK_BASE]
1737
           mov  bx, word [esi-twdw+WDATA.box.left]
1737
           mov  bx, word [esi-twdw+WDATA.box.left]
1738
           shl  ebx,16
1738
           shl  ebx,16
1739
           mov  bx, word [esi-twdw+WDATA.box.top]
1739
           mov  bx, word [esi-twdw+WDATA.box.top]
1740
           sub  eax,ebx
1740
           sub  eax,ebx
Line 1882... Line 1882...
1882
    ret
1882
    ret
Line 1883... Line 1883...
1883
 
1883
 
Line 1884... Line 1884...
1884
 
1884
 
1885
sys_end:
1885
sys_end:
Line 1886... Line 1886...
1886
 
1886
 
1887
     mov   eax,[0x3010]
1887
     mov   eax,[TASK_BASE]
1888
     mov   [eax+TASKDATA.state], 3  ; terminate this program
1888
     mov   [eax+TASKDATA.state], 3  ; terminate this program
Line 1929... Line 1929...
1929
 
1929
 
1930
sysfn_shutdown:         ; 18.1 = BOOT
1930
sysfn_shutdown:         ; 18.1 = BOOT
1931
     mov  [0x2f0000+0x9030],byte 0
1931
     mov  [0x2f0000+0x9030],byte 0
Line 1932... Line 1932...
1932
  for_shutdown_parameter:
1932
  for_shutdown_parameter:
1933
 
1933
 
1934
     mov  eax,[0x3004]
1934
     mov  eax,[TASK_COUNT]
1935
     add  eax,2
1935
     add  eax,2
1936
     mov  [shutdown_processes],eax
1936
     mov  [shutdown_processes],eax
1937
     mov  [0xFF00],al
1937
     mov  [0xFF00],al
Line 1942... Line 1942...
1942
  endg
1942
  endg
Line 1943... Line 1943...
1943
 
1943
 
1944
sysfn_terminate:        ; 18.2 = TERMINATE
1944
sysfn_terminate:        ; 18.2 = TERMINATE
1945
     cmp  ebx,2
1945
     cmp  ebx,2
1946
     jb   noprocessterminate
1946
     jb   noprocessterminate
1947
     mov  edx,[0x3004]
1947
     mov  edx,[TASK_COUNT]
1948
     cmp  ebx,edx
1948
     cmp  ebx,edx
1949
     ja   noprocessterminate
1949
     ja   noprocessterminate
1950
     mov  eax,[0x3004]
1950
     mov  eax,[TASK_COUNT]
1951
     shl  ebx,5
1951
     shl  ebx,5
1952
     mov  edx,[ebx+0x3000+TASKDATA.pid]
1952
     mov  edx,[ebx+CURRENT_TASK+TASKDATA.pid]
1953
     add  ebx,0x3000+TASKDATA.state
1953
     add  ebx,CURRENT_TASK+TASKDATA.state
1954
     cmp  byte [ebx], 9
1954
     cmp  byte [ebx], 9
Line 1955... Line 1955...
1955
     jz   noprocessterminate
1955
     jz   noprocessterminate
1956
 
1956
 
Line 1993... Line 1993...
1993
    ret
1993
    ret
Line 1994... Line 1994...
1994
 
1994
 
1995
sysfn_activate:         ; 18.3 = ACTIVATE WINDOW
1995
sysfn_activate:         ; 18.3 = ACTIVATE WINDOW
1996
     cmp  ebx,2
1996
     cmp  ebx,2
1997
     jb   .nowindowactivate
1997
     jb   .nowindowactivate
1998
     cmp  ebx,[0x3004]
1998
     cmp  ebx,[TASK_COUNT]
Line 1999... Line 1999...
1999
     ja   .nowindowactivate
1999
     ja   .nowindowactivate
Line 2000... Line 2000...
2000
 
2000
 
2001
     mov   [window_minimize], 2   ; restore window if minimized
2001
     mov   [window_minimize], 2   ; restore window if minimized
2002
 
2002
 
Line 2003... Line 2003...
2003
     movzx esi, word [0xC000 + ebx*2]
2003
     movzx esi, word [0xC000 + ebx*2]
2004
     cmp   esi, [0x3004]
2004
     cmp   esi, [TASK_COUNT]
2005
     je    .nowindowactivate ; already active
2005
     je    .nowindowactivate ; already active
Line 2027... Line 2027...
2027
;!!!!!!!!!!!!!!!!!!!!!!!!
2027
;!!!!!!!!!!!!!!!!!!!!!!!!
2028
   include 'blkdev/rdsave.inc'
2028
   include 'blkdev/rdsave.inc'
2029
;!!!!!!!!!!!!!!!!!!!!!!!!
2029
;!!!!!!!!!!!!!!!!!!!!!!!!
Line 2030... Line 2030...
2030
 
2030
 
2031
sysfn_getactive:        ; 18.7 = get active window
2031
sysfn_getactive:        ; 18.7 = get active window
2032
     mov  eax, [0x3004]
2032
     mov  eax, [TASK_COUNT]
2033
   movzx  eax, word [0xC400 + eax*2]
2033
   movzx  eax, word [0xC400 + eax*2]
2034
     mov  [esp+36],eax
2034
     mov  [esp+36],eax
Line 2035... Line 2035...
2035
     ret
2035
     ret
Line 2068... Line 2068...
2068
     mov ecx,10
2068
     mov ecx,10
2069
     cld
2069
     cld
2070
     rep movsb
2070
     rep movsb
2071
     ret
2071
     ret
2072
   for_all_tables:
2072
   for_all_tables:
2073
     mov edi,[0x3010]
2073
     mov edi,[TASK_BASE]
2074
     mov edi,[edi+TASKDATA.mem_start]
2074
     mov edi,[edi+TASKDATA.mem_start]
2075
     add edi,ecx
2075
     add edi,ecx
2076
     mov esi,0x40000
2076
     mov esi,0x40000
2077
     ret
2077
     ret
2078
  full_table:
2078
  full_table:
Line 2087... Line 2087...
2087
sysfn_lastkey:          ; 18.12 = return 0 (backward compatibility)
2087
sysfn_lastkey:          ; 18.12 = return 0 (backward compatibility)
2088
        and     dword [esp+36], 0
2088
        and     dword [esp+36], 0
2089
        ret
2089
        ret
Line 2090... Line 2090...
2090
 
2090
 
2091
sysfn_getversion:       ; 18.13 = get kernel ID and version
2091
sysfn_getversion:       ; 18.13 = get kernel ID and version
2092
     mov edi,[0x3010]
2092
     mov edi,[TASK_BASE]
2093
     mov edi,[edi+TASKDATA.mem_start]
2093
     mov edi,[edi+TASKDATA.mem_start]
2094
     add edi,ebx
2094
     add edi,ebx
2095
     mov esi,version_inf
2095
     mov esi,version_inf
2096
     mov ecx,version_end-version_inf
2096
     mov ecx,version_end-version_inf
Line 2283... Line 2283...
2283
  nosb4:
2283
  nosb4:
Line 2284... Line 2284...
2284
 
2284
 
2285
    cmp   eax,5                            ; BLOCK MOVE TO BGR
2285
    cmp   eax,5                            ; BLOCK MOVE TO BGR
2286
    jnz   nosb5
2286
    jnz   nosb5
2287
  ; bughere
2287
  ; bughere
2288
    mov   edi, [0x3010]
2288
    mov   edi, [TASK_BASE]
2289
    add   ebx, [edi+TASKDATA.mem_start]
2289
    add   ebx, [edi+TASKDATA.mem_start]
2290
 ;   mov   esi, ebx
2290
 ;   mov   esi, ebx
2291
 ;   mov   edi, ecx
2291
 ;   mov   edi, ecx
2292
    mov   eax, ebx
2292
    mov   eax, ebx
Line 2345... Line 2345...
2345
align 4
2345
align 4
Line 2346... Line 2346...
2346
 
2346
 
2347
sys_getkey:
2347
sys_getkey:
2348
    mov   [esp+36],dword 1
2348
    mov   [esp+36],dword 1
2349
; test main buffer
2349
; test main buffer
2350
    mov   ebx, [0x3000]                          ; TOP OF WINDOW STACK
2350
    mov   ebx, [CURRENT_TASK]                          ; TOP OF WINDOW STACK
2351
    movzx ecx,word [0xC000 + ebx * 2]
2351
    movzx ecx,word [0xC000 + ebx * 2]
2352
    mov   edx,[0x3004]
2352
    mov   edx,[TASK_COUNT]
2353
    cmp   ecx,edx
2353
    cmp   ecx,edx
2354
    jne   .finish
2354
    jne   .finish
2355
    cmp   [0xf400],byte 0
2355
    cmp   [0xf400],byte 0
2356
    je    .finish
2356
    je    .finish
Line 2393... Line 2393...
2393
 
2393
 
Line 2394... Line 2394...
2394
align 4
2394
align 4
Line 2395... Line 2395...
2395
 
2395
 
2396
sys_getbutton:
2396
sys_getbutton:
2397
 
2397
 
2398
    mov   ebx, [0x3000]                         ; TOP OF WINDOW STACK
2398
    mov   ebx, [CURRENT_TASK]                         ; TOP OF WINDOW STACK
2399
    mov   [esp+36],dword 1
2399
    mov   [esp+36],dword 1
2400
    movzx ecx, word [0xC000 + ebx * 2]
2400
    movzx ecx, word [0xC000 + ebx * 2]
2401
    mov   edx, [0x3004] ; less than 256 processes
2401
    mov   edx, [TASK_COUNT] ; less than 256 processes
2402
    cmp   ecx,edx
2402
    cmp   ecx,edx
2403
    jne   .exit
2403
    jne   .exit
Line 2425... Line 2425...
2425
;  +22 dword     start in mem
2425
;  +22 dword     start in mem
2426
;  +26 dword     used mem
2426
;  +26 dword     used mem
2427
;  +30 dword     PID , process idenfification number
2427
;  +30 dword     PID , process idenfification number
2428
;
2428
;
Line 2429... Line 2429...
2429
 
2429
 
2430
    mov  edi,[0x3010]   ; eax = return area
2430
    mov  edi,[TASK_BASE]   ; eax = return area
Line 2431... Line 2431...
2431
    add  eax,[edi + TASKDATA.mem_start]
2431
    add  eax,[edi + TASKDATA.mem_start]
2432
 
2432
 
2433
    cmp  ebx,-1         ; who am I ?
2433
    cmp  ebx,-1         ; who am I ?
2434
    jne  no_who_am_i
2434
    jne  no_who_am_i
Line 2435... Line 2435...
2435
    mov  ebx,[0x3000]
2435
    mov  ebx,[CURRENT_TASK]
2436
  no_who_am_i:
2436
  no_who_am_i:
Line 2445... Line 2445...
2445
    ; return memory usage
2445
    ; return memory usage
Line 2446... Line 2446...
2446
 
2446
 
2447
    xor  edx,edx
2447
    xor  edx,edx
2448
    mov  eax,0x20
2448
    mov  eax,0x20
2449
    mul  ebx
2449
    mul  ebx
2450
    add  eax,0x3000+TASKDATA.cpu_usage
2450
    add  eax,CURRENT_TASK+TASKDATA.cpu_usage
2451
    mov  ebx,eax
2451
    mov  ebx,eax
2452
    pop  eax
2452
    pop  eax
2453
    mov  ecx,[ebx]
2453
    mov  ecx,[ebx]
2454
    mov  [eax],ecx
2454
    mov  [eax],ecx
Line 2484... Line 2484...
2484
 
2484
 
Line 2485... Line 2485...
2485
    ; PID (+30)
2485
    ; PID (+30)
2486
 
2486
 
2487
    mov    eax,[esp]
2487
    mov    eax,[esp]
2488
    shl    eax,5
2488
    shl    eax,5
2489
    add    eax,0x3000+TASKDATA.pid
2489
    add    eax,CURRENT_TASK+TASKDATA.pid
Line 2490... Line 2490...
2490
    mov    eax,[eax]
2490
    mov    eax,[eax]
Line 2503... Line 2503...
2503
 
2503
 
Line 2504... Line 2504...
2504
    ; Process state (+50)
2504
    ; Process state (+50)
2505
 
2505
 
2506
    mov    eax,[esp]
2506
    mov    eax,[esp]
2507
    shl    eax,5
2507
    shl    eax,5
2508
    add    eax,0x3000+TASKDATA.state
2508
    add    eax,CURRENT_TASK+TASKDATA.state
Line 2509... Line 2509...
2509
    mov    eax,[eax]
2509
    mov    eax,[eax]
Line 2529... Line 2529...
2529
    pop    ebx
2529
    pop    ebx
2530
    pop    eax
2530
    pop    eax
Line 2531... Line 2531...
2531
 
2531
 
Line 2532... Line 2532...
2532
    ; return number of processes
2532
    ; return number of processes
2533
 
2533
 
2534
    mov    eax,[0x3004]
2534
    mov    eax,[TASK_COUNT]
Line 2616... Line 2616...
2616
    cmp  eax,1
2616
    cmp  eax,1
2617
    jne  no_widgets_away
2617
    jne  no_widgets_away
Line 2618... Line 2618...
2618
 
2618
 
Line 2619... Line 2619...
2619
    ; buttons away
2619
    ; buttons away
Line 2620... Line 2620...
2620
 
2620
 
Line 2621... Line 2621...
2621
    mov   ecx,[0x3000]
2621
    mov   ecx,[CURRENT_TASK]
2622
 
2622
 
Line 2659... Line 2659...
2659
  no_widgets_away:
2659
  no_widgets_away:
Line 2660... Line 2660...
2660
 
2660
 
2661
    cmp   eax,2
2661
    cmp   eax,2
Line 2662... Line 2662...
2662
    jnz   srl1
2662
    jnz   srl1
2663
 
2663
 
2664
    mov   edx,[0x3010]      ; return whole screen draw area for this app
2664
    mov   edx,[TASK_BASE]      ; return whole screen draw area for this app
2665
    add   edx,draw_data-0x3000
2665
    add   edx,draw_data-CURRENT_TASK
2666
    mov   [edx+RECT.left], 0
2666
    mov   [edx+RECT.left], 0
2667
    mov   [edx+RECT.top], 0
2667
    mov   [edx+RECT.top], 0
2668
    mov   eax,[0xfe00]
2668
    mov   eax,[0xfe00]
2669
    mov   [edx+RECT.right],eax
2669
    mov   [edx+RECT.right],eax
Line 2670... Line 2670...
2670
    mov   eax,[0xfe04]
2670
    mov   eax,[0xfe04]
2671
    mov   [edx+RECT.bottom],eax
2671
    mov   [edx+RECT.bottom],eax
Line 2672... Line 2672...
2672
 
2672
 
Line 2673... Line 2673...
2673
    mov   edi,[0x3010]
2673
    mov   edi,[TASK_BASE]
Line 2729... Line 2729...
2729
    cmp   edi,3   ; type IV - skinned window
2729
    cmp   edi,3   ; type IV - skinned window
2730
    jne   nosyswIV
2730
    jne   nosyswIV
Line 2731... Line 2731...
2731
 
2731
 
2732
    ; parameter for drawwindow_IV
2732
    ; parameter for drawwindow_IV
2733
    push  0
2733
    push  0
2734
    mov   edi, [0x3004]
2734
    mov   edi, [TASK_COUNT]
2735
    movzx edi, word [0xC400 + edi*2]
2735
    movzx edi, word [0xC400 + edi*2]
2736
    cmp   edi, [0x3000]
2736
    cmp   edi, [CURRENT_TASK]
2737
    jne   @f
2737
    jne   @f
2738
    inc   dword [esp]
2738
    inc   dword [esp]
Line 2739... Line 2739...
2739
 @@:
2739
 @@:
Line 2755... Line 2755...
2755
draw_window_caption:
2755
draw_window_caption:
2756
        inc     [mouse_pause]
2756
        inc     [mouse_pause]
2757
        call    [disable_mouse]
2757
        call    [disable_mouse]
Line 2758... Line 2758...
2758
 
2758
 
2759
        xor     eax,eax
2759
        xor     eax,eax
2760
        mov     edx,[0x3004]
2760
        mov     edx,[TASK_COUNT]
2761
        movzx   edx,word[0xC400+edx*2]
2761
        movzx   edx,word[0xC400+edx*2]
2762
        cmp     edx,[0x3000]
2762
        cmp     edx,[CURRENT_TASK]
2763
        jne     @f
2763
        jne     @f
2764
        inc     eax
2764
        inc     eax
2765
    @@: mov     edx,[0x3000]
2765
    @@: mov     edx,[CURRENT_TASK]
2766
        shl     edx,5
2766
        shl     edx,5
2767
        add     edx,window_data
2767
        add     edx,window_data
2768
        movzx   ebx,[edx+WDATA.fl_wstyle]
2768
        movzx   ebx,[edx+WDATA.fl_wstyle]
2769
        and     bl,0x0F
2769
        and     bl,0x0F
Line 2788... Line 2788...
2788
 
2788
 
Line 2789... Line 2789...
2789
        call    drawwindow_I_caption
2789
        call    drawwindow_I_caption
2790
 
2790
 
2791
;--------------------------------------------------------------
2791
;--------------------------------------------------------------
2792
  .2:   ;jmp     @f
2792
  .2:   ;jmp     @f
2793
        mov     edi,[0x3000]
2793
        mov     edi,[CURRENT_TASK]
2794
        shl     edi,5
2794
        shl     edi,5
2795
        test    [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
2795
        test    [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
2796
        jz      @f
2796
        jz      @f
Line 2911... Line 2911...
2911
        pop     edi ecx eax
2911
        pop     edi ecx eax
2912
        ret
2912
        ret
Line 2913... Line 2913...
2913
 
2913
 
Line 2914... Line 2914...
2914
sys_set_window:
2914
sys_set_window:
2915
 
2915
 
2916
    mov   edi,[0x3000]
2916
    mov   edi,[CURRENT_TASK]
Line 2917... Line 2917...
2917
    shl   edi,5
2917
    shl   edi,5
2918
    add   edi,window_data
2918
    add   edi,window_data
Line 2994... Line 2994...
2994
        jnz     .get_window_caption
2994
        jnz     .get_window_caption
Line 2995... Line 2995...
2995
 
2995
 
2996
        ; NOTE: only window owner thread can set its caption,
2996
        ; NOTE: only window owner thread can set its caption,
Line 2997... Line 2997...
2997
        ;       so there's no parameter for PID/TID
2997
        ;       so there's no parameter for PID/TID
2998
 
2998
 
Line 2999... Line 2999...
2999
        mov     edi,[0x3000]
2999
        mov     edi,[CURRENT_TASK]
3000
        shl     edi,5
3000
        shl     edi,5
3001
 
3001
 
Line 3029... Line 3029...
3029
        ret
3029
        ret
Line 3030... Line 3030...
3030
 
3030
 
Line 3031... Line 3031...
3031
 
3031
 
3032
sys_window_move:
3032
sys_window_move:
3033
 
3033
 
Line 3034... Line 3034...
3034
        mov     edi,[0x3000]
3034
        mov     edi,[CURRENT_TASK]
3035
        shl     edi,5
3035
        shl     edi,5
Line 3297... Line 3297...
3297
  nocpustart:
3297
  nocpustart:
3298
    cmp   [mouse_active], 1
3298
    cmp   [mouse_active], 1
3299
    jne   mouse_not_active
3299
    jne   mouse_not_active
3300
    mov   [mouse_active], 0
3300
    mov   [mouse_active], 0
3301
    xor   edi, edi
3301
    xor   edi, edi
3302
    mov   ecx, [0x3004]
3302
    mov   ecx, [TASK_COUNT]
3303
   set_mouse_event:
3303
   set_mouse_event:
3304
    add   edi, 256
3304
    add   edi, 256
3305
    or    [edi+0x80000+APPDATA.event_mask], dword 00100000b
3305
    or    [edi+0x80000+APPDATA.event_mask], dword 00100000b
3306
    loop  set_mouse_event
3306
    loop  set_mouse_event
3307
  mouse_not_active:
3307
  mouse_not_active:
Line 3355... Line 3355...
3355
    je   system_shutdown
3355
    je   system_shutdown
Line 3356... Line 3356...
3356
 
3356
 
Line 3357... Line 3357...
3357
  noshutdown:
3357
  noshutdown:
3358
 
3358
 
3359
 
3359
 
Line 3360... Line 3360...
3360
    mov   eax,[0x3004]                  ; termination
3360
    mov   eax,[TASK_COUNT]                  ; termination
3361
    mov   ebx,0x3020+TASKDATA.state
3361
    mov   ebx,TASK_DATA+TASKDATA.state
3362
    mov   esi,1
3362
    mov   esi,1
Line 3473... Line 3473...
3473
 
3473
 
Line 3474... Line 3474...
3474
       not_this_task:
3474
       not_this_task:
Line 3475... Line 3475...
3475
 
3475
 
3476
         pop   ecx
3476
         pop   ecx
Line 3477... Line 3477...
3477
 
3477
 
3478
         cmp   ecx,[0x3004]
3478
         cmp   ecx,[TASK_COUNT]
Line 3543... Line 3543...
3543
 
3543
 
3544
 
3544
 
Line 3545... Line 3545...
3545
set_app_param:
3545
set_app_param:
3546
        push edi
3546
        push edi
Line 3547... Line 3547...
3547
 
3547
 
3548
        mov  edi,[0x3010]
3548
        mov  edi,[TASK_BASE]
Line 3632... Line 3632...
3632
;;       3 unknown FS
3632
;;       3 unknown FS
3633
;;       4 partition not defined at hd
3633
;;       4 partition not defined at hd
3634
;;       5 file not found
3634
;;       5 file not found
3635
;; ebx = size of file
3635
;; ebx = size of file
3636
;
3636
;
3637
;     mov   edi,[0x3010]
3637
;     mov   edi,[TASK_BASE]
3638
;     add   edi,0x10
3638
;     add   edi,0x10
3639
;     add   esi,[edi]
3639
;     add   esi,[edi]
3640
;     add   eax,[edi]
3640
;     add   eax,[edi]
3641
;
3641
;
3642
;     pushad
3642
;     pushad
Line 3660... Line 3660...
3660
 
3660
 
Line 3661... Line 3661...
3661
align 4
3661
align 4
Line 3662... Line 3662...
3662
 
3662
 
3663
sys_programirq:
3663
sys_programirq:
Line 3664... Line 3664...
3664
 
3664
 
3665
    mov   edi,[0x3010]
3665
    mov   edi,[TASK_BASE]
3666
    add   eax,[edi+TASKDATA.mem_start]
3666
    add   eax,[edi+TASKDATA.mem_start]
3667
 
3667
 
3668
    cmp   ebx,16
3668
    cmp   ebx,16
3669
    jae   .not_owner
3669
    jae   .not_owner
3670
    mov   edi,[0x3010]
3670
    mov   edi,[TASK_BASE]
3671
    mov   edi,[edi+TASKDATA.pid]
3671
    mov   edi,[edi+TASKDATA.pid]
Line 3694... Line 3694...
3694
     jae   .not_owner
3694
     jae   .not_owner
3695
     mov   edx,eax           ; check for correct owner
3695
     mov   edx,eax           ; check for correct owner
3696
     shl   edx,2
3696
     shl   edx,2
3697
     add   edx,irq_owner
3697
     add   edx,irq_owner
3698
     mov   edx,[edx]
3698
     mov   edx,[edx]
3699
     mov   edi,[0x3010]
3699
     mov   edi,[TASK_BASE]
3700
     mov   edi,[edi+TASKDATA.pid]
3700
     mov   edi,[edi+TASKDATA.pid]
3701
     cmp   edx,edi
3701
     cmp   edx,edi
3702
     je    gidril1
3702
     je    gidril1
3703
.not_owner:
3703
.not_owner:
3704
     mov   [esp+32],dword 2     ; ecx=2
3704
     mov   [esp+32],dword 2     ; ecx=2
Line 3734... Line 3734...
3734
 
3734
 
Line 3735... Line 3735...
3735
set_io_access_rights:
3735
set_io_access_rights:
Line 3736... Line 3736...
3736
 
3736
 
3737
     pushad
3737
     pushad
3738
 
3738
 
3739
     mov   edi,[0x3000]
3739
     mov   edi,[CURRENT_TASK]
Line 3740... Line 3740...
3740
     imul  edi,tss_step
3740
     imul  edi,tss_step
Line 3842... Line 3842...
3842
     mov   edi,[0x2d0000]
3842
     mov   edi,[0x2d0000]
3843
     add   edi,1
3843
     add   edi,1
3844
     mov   [0x2d0000],edi
3844
     mov   [0x2d0000],edi
3845
     shl   edi,4
3845
     shl   edi,4
3846
     add   edi,0x2d0000
3846
     add   edi,0x2d0000
3847
     mov   esi,[0x3010]
3847
     mov   esi,[TASK_BASE]
3848
     mov   esi,[esi+TASKDATA.pid]
3848
     mov   esi,[esi+TASKDATA.pid]
3849
     mov   [edi],esi
3849
     mov   [edi],esi
3850
     mov   [edi+4],ebx
3850
     mov   [edi+4],ebx
3851
     mov   [edi+8],ecx
3851
     mov   [edi+8],ecx
Line 3858... Line 3858...
3858
     pushad
3858
     pushad
Line 3859... Line 3859...
3859
 
3859
 
3860
     mov   esi,[0x2d0000]     ; no reserved areas ?
3860
     mov   esi,[0x2d0000]     ; no reserved areas ?
3861
     test  esi,esi
3861
     test  esi,esi
3862
     je    frpal2
3862
     je    frpal2
3863
     mov   edx,[0x3010]
3863
     mov   edx,[TASK_BASE]
3864
     mov   edx,[edx+TASKDATA.pid]
3864
     mov   edx,[edx+TASKDATA.pid]
3865
   frpal3:
3865
   frpal3:
3866
     mov   edi,esi
3866
     mov   edi,esi
3867
     shl   edi,4
3867
     shl   edi,4
Line 3932... Line 3932...
3932
     test  eax,eax
3932
     test  eax,eax
3933
     jz    reserve_irq
3933
     jz    reserve_irq
Line 3934... Line 3934...
3934
 
3934
 
3935
     lea   edi,[irq_owner+ebx*4]
3935
     lea   edi,[irq_owner+ebx*4]
3936
     mov   edx,[edi]
3936
     mov   edx,[edi]
3937
     mov   eax,[0x3010]
3937
     mov   eax,[TASK_BASE]
3938
     cmp   edx,[eax+TASKDATA.pid]
3938
     cmp   edx,[eax+TASKDATA.pid]
3939
     jne   fril1
3939
     jne   fril1
3940
     dec   ecx
3940
     dec   ecx
3941
     mov   [edi],ecx
3941
     mov   [edi],ecx
Line 3947... Line 3947...
3947
 
3947
 
3948
     lea   edi,[irq_owner+ebx*4]
3948
     lea   edi,[irq_owner+ebx*4]
3949
     cmp   dword [edi], 0
3949
     cmp   dword [edi], 0
Line 3950... Line 3950...
3950
     jnz   ril1
3950
     jnz   ril1
3951
 
3951
 
3952
     mov   edx,[0x3010]
3952
     mov   edx,[TASK_BASE]
3953
     mov   edx,[edx+TASKDATA.pid]
3953
     mov   edx,[edx+TASKDATA.pid]
3954
     mov   [edi],edx
3954
     mov   [edi],edx
3955
     dec   ecx
3955
     dec   ecx
Line 3999... Line 3999...
3999
     test  ecx,0xFFFF0000
3999
     test  ecx,0xFFFF0000
4000
     jnz   @f
4000
     jnz   @f
4001
  .exit:
4001
  .exit:
4002
     ret
4002
     ret
4003
 @@:
4003
 @@:
4004
        mov     edi,[0x3000]
4004
        mov     edi,[CURRENT_TASK]
4005
        shl     edi,8
4005
        shl     edi,8
4006
        add     dx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
4006
        add     dx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
4007
        rol     edx,16
4007
        rol     edx,16
4008
        add     dx,word[edi+0x80000+APPDATA.wnd_clientbox.left]
4008
        add     dx,word[edi+0x80000+APPDATA.wnd_clientbox.left]
4009
        rol     edx,16
4009
        rol     edx,16
Line 4041... Line 4041...
4041
; ecx = [xsize]*65536 + [ysize]
4041
; ecx = [xsize]*65536 + [ysize]
4042
; edx = [xstart]*65536 + [ystart]
4042
; edx = [xstart]*65536 + [ystart]
4043
; esi = number of bits per pixel, must be 8, 24 or 32
4043
; esi = number of bits per pixel, must be 8, 24 or 32
4044
; edi = pointer to palette
4044
; edi = pointer to palette
4045
; ebp = row delta
4045
; ebp = row delta
4046
        mov     eax, [0x3000]
4046
        mov     eax, [CURRENT_TASK]
4047
        shl     eax, 8
4047
        shl     eax, 8
4048
        add     dx, word [eax+0x80000+APPDATA.wnd_clientbox.top]
4048
        add     dx, word [eax+0x80000+APPDATA.wnd_clientbox.top]
4049
        rol     edx, 16
4049
        rol     edx, 16
4050
        add     dx, word [eax+0x80000+APPDATA.wnd_clientbox.left]
4050
        add     dx, word [eax+0x80000+APPDATA.wnd_clientbox.left]
4051
        rol     edx, 16
4051
        rol     edx, 16
Line 4102... Line 4102...
4102
; ecx x end
4102
; ecx x end
4103
	; edx y end
4103
	; edx y end
4104
; edi color
4104
; edi color
Line 4105... Line 4105...
4105
 
4105
 
4106
__sys_drawbar:
4106
__sys_drawbar:
4107
        mov     esi,[0x3000]
4107
        mov     esi,[CURRENT_TASK]
4108
        shl     esi,8
4108
        shl     esi,8
4109
        add     eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
4109
        add     eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
4110
        add     ecx,[esi+0x80000+APPDATA.wnd_clientbox.left]
4110
        add     ecx,[esi+0x80000+APPDATA.wnd_clientbox.left]
4111
        add     ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
4111
        add     ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
Line 4472... Line 4472...
4472
     ret
4472
     ret
Line 4473... Line 4473...
4473
 
4473
 
4474
 
4474
 
Line 4475... Line 4475...
4475
 
4475
 
4476
sys_process_def:
4476
sys_process_def:
Line 4477... Line 4477...
4477
        mov     edi, [0x3000]
4477
        mov     edi, [CURRENT_TASK]
Line 4633... Line 4633...
4633
align 4  ;  system functions
4633
align 4  ;  system functions
Line 4634... Line 4634...
4634
 
4634
 
Line 4635... Line 4635...
4635
syscall_setpixel:                       ; SetPixel
4635
syscall_setpixel:                       ; SetPixel
4636
 
4636
 
4637
 
4637
 
4638
     mov   edx,[0x3010]
4638
     mov   edx,[TASK_BASE]
4639
     add   eax,[edx-twdw+WDATA.box.left]
4639
     add   eax,[edx-twdw+WDATA.box.left]
4640
     add   ebx,[edx-twdw+WDATA.box.top]
4640
     add   ebx,[edx-twdw+WDATA.box.top]
4641
        mov     edi,[0x3000]
4641
        mov     edi,[CURRENT_TASK]
4642
        shl     edi,8
4642
        shl     edi,8
4643
        add     eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
4643
        add     eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
Line 4649... Line 4649...
4649
 
4649
 
Line 4650... Line 4650...
4650
align 4
4650
align 4
Line 4651... Line 4651...
4651
 
4651
 
4652
syscall_writetext:                      ; WriteText
4652
syscall_writetext:                      ; WriteText
4653
 
4653
 
4654
     mov   edi,[0x3010]
4654
     mov   edi,[TASK_BASE]
4655
     mov   ebp,[edi-twdw+WDATA.box.left]
4655
     mov   ebp,[edi-twdw+WDATA.box.left]
4656
        push    esi
4656
        push    esi
4657
        mov     esi,[0x3000]
4657
        mov     esi,[CURRENT_TASK]
4658
        shl     esi,8
4658
        shl     esi,8
4659
        add     ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
4659
        add     ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
Line 4669... Line 4669...
4669
align 4
4669
align 4
Line 4670... Line 4670...
4670
 
4670
 
Line 4671... Line 4671...
4671
syscall_openramdiskfile:                ; OpenRamdiskFile
4671
syscall_openramdiskfile:                ; OpenRamdiskFile
4672
 
4672
 
4673
 
4673
 
4674
     mov   edi,[0x3010]
4674
     mov   edi,[TASK_BASE]
4675
     add   edi,TASKDATA.mem_start
4675
     add   edi,TASKDATA.mem_start
4676
     add   eax,[edi]
4676
     add   eax,[edi]
Line 4692... Line 4692...
4692
     je    drectr
4692
     je    drectr
4693
     movzx ecx,ax
4693
     movzx ecx,ax
4694
     shr   eax,16
4694
     shr   eax,16
4695
     movzx edx,bx
4695
     movzx edx,bx
4696
     shr   ebx,16
4696
     shr   ebx,16
4697
        mov     esi,[0x3000]
4697
        mov     esi,[CURRENT_TASK]
4698
        shl     esi,8
4698
        shl     esi,8
4699
        add     eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
4699
        add     eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
4700
        add     ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
4700
        add     ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
4701
     add   ecx,eax
4701
     add   ecx,eax
4702
     add   edx,ebx
4702
     add   edx,ebx
Line 4724... Line 4724...
4724
 
4724
 
Line 4725... Line 4725...
4725
align 4
4725
align 4
Line 4726... Line 4726...
4726
 
4726
 
4727
syscall_delramdiskfile:                 ; DelRamdiskFile
4727
syscall_delramdiskfile:                 ; DelRamdiskFile
4728
 
4728
 
4729
     mov   edi,[0x3010]
4729
     mov   edi,[TASK_BASE]
4730
     add   edi,TASKDATA.mem_start
4730
     add   edi,TASKDATA.mem_start
4731
     add   eax,[edi]
4731
     add   eax,[edi]
Line 4732... Line 4732...
4732
     call  filedelete
4732
     call  filedelete
Line 4733... Line 4733...
4733
     mov   [esp+36],eax
4733
     mov   [esp+36],eax
Line 4734... Line 4734...
4734
     ret
4734
     ret
4735
 
4735
 
4736
align 4
4736
align 4
4737
 
4737
 
4738
syscall_writeramdiskfile:               ; WriteRamdiskFile
4738
syscall_writeramdiskfile:               ; WriteRamdiskFile
4739
 
4739
 
Line 4760... Line 4760...
4760
 
4760
 
Line 4761... Line 4761...
4761
align 4
4761
align 4
Line 4762... Line 4762...
4762
 
4762
 
4763
syscall_readstring:                     ; ReadString
4763
syscall_readstring:                     ; ReadString
4764
 
4764
 
4765
     mov   edi,[0x3010]
4765
     mov   edi,[TASK_BASE]
4766
     add   edi,TASKDATA.mem_start
4766
     add   edi,TASKDATA.mem_start
4767
     add   eax,[edi]
4767
     add   eax,[edi]
Line 4768... Line 4768...
4768
     call  read_string
4768
     call  read_string
Line 4769... Line 4769...
4769
     mov   [esp+36],eax
4769
     mov   [esp+36],eax
Line 4770... Line 4770...
4770
     ret
4770
     ret
4771
 
4771
 
4772
align 4
4772
align 4
4773
 
4773
 
4774
syscall_drawline:                       ; DrawLine
4774
syscall_drawline:                       ; DrawLine
4775
 
4775
 
4776
     mov   edi,[0x3010]
4776
     mov   edi,[TASK_BASE]
4777
     movzx edx,word[edi-twdw+WDATA.box.left]
4777
     movzx edx,word[edi-twdw+WDATA.box.left]
4778
     mov   ebp,edx
4778
     mov   ebp,edx
Line 4858... Line 4858...
4858
 
4858
 
Line 4859... Line 4859...
4859
align 4
4859
align 4
Line 4860... Line 4860...
4860
 
4860
 
4861
read_from_hd:                           ; Read from hd - fn not in use
4861
read_from_hd:                           ; Read from hd - fn not in use
4862
 
4862
 
4863
     mov   edi,[0x3010]
4863
     mov   edi,[TASK_BASE]
4864
     add   edi,TASKDATA.mem_start
4864
     add   edi,TASKDATA.mem_start
4865
     add   eax,[edi]
4865
     add   eax,[edi]
Line 4922... Line 4922...
4922
 
4922
 
Line 4923... Line 4923...
4923
;clear_busy_flag_at_caller:
4923
;clear_busy_flag_at_caller:
Line 4924... Line 4924...
4924
 
4924
 
4925
;      push  edi
4925
;      push  edi
4926
 
4926
 
Line 4927... Line 4927...
4927
;      mov   edi,[0x3000]    ; restore processes tss pointer in gdt, busyfl?
4927
;      mov   edi,[CURRENT_TASK]    ; restore processes tss pointer in gdt, busyfl?