Selaa lähdekoodia

* retrieve process ID even if running under DOS

git-svn-id: trunk@19644 -
Tomas Hajny 13 vuotta sitten
vanhempi
commit
21179c6833
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      rtl/emx/system.pas

+ 5 - 2
rtl/emx/system.pas

@@ -538,7 +538,11 @@ begin
 {$WARNING To be checked/corrected!}
                 ApplicationType := 1;   (* Running under DOS. *)
                 IsConsole := true;
-                ProcessID := 1;
+                asm
+                    mov ax, 7F05h
+                    call syscall
+                    mov ProcessID, eax
+                end ['eax'];
                 ThreadID := 1;
             end;
         osOS2:
@@ -560,7 +564,6 @@ begin
 {$WARNING To be checked/corrected!}
                 ApplicationType := 1;   (* Running under DOS. *)
                 IsConsole := true;
-                ProcessID := 1;
                 ThreadID := 1;
             end;
     end;