Explorar o código

+ implemented dos.Keep for i8086-msdos; simple dos TSRs now work

git-svn-id: trunk@24730 -
nickysn %!s(int64=12) %!d(string=hai) anos
pai
achega
4b3c67c51a
Modificáronse 1 ficheiros con 16 adicións e 0 borrados
  1. 16 0
      rtl/msdos/dos.pp

+ 16 - 0
rtl/msdos/dos.pp

@@ -89,6 +89,7 @@ type
 {$DEFINE HAS_SWAPVECTORS}
 {$DEFINE HAS_GETINTVEC}
 {$DEFINE HAS_SETINTVEC}
+{$DEFINE HAS_KEEP}
 {$DEFINE HAS_GETSHORTNAME}
 {$DEFINE HAS_GETLONGNAME}
 
@@ -954,6 +955,21 @@ asm
   pop ds
 end;
 
+{******************************************************************************
+                                  --- Keep ---
+******************************************************************************}
+
+Procedure Keep(exitcode: word); assembler;
+asm
+  mov bx, dos_psp
+  dec bx
+  mov es, bx
+  mov dx, es:[3]
+  mov al, exitcode
+  mov ah, 31h
+  int 21h
+end;
+
 {$ifdef DEBUG_LFN}
 begin
   LogLFN:=(GetEnv('LOGLFN')<>'');