Explorar o código

+ basic implementation of do_isdevice for msdos

git-svn-id: branches/i8086@24014 -
nickysn %!s(int64=12) %!d(string=hai) anos
pai
achega
b2fc6a2f6d
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  1. 14 0
      rtl/msdos/sysfile.inc

+ 14 - 0
rtl/msdos/sysfile.inc

@@ -83,5 +83,19 @@ end;
 
 
 function do_isdevice(handle:THandle):boolean;
+label
+  no_device;
 begin
+  { TODO: add error checking }
+  asm
+    mov ax, 4400h
+    mov bx, handle
+    int 21h
+    xor al, al
+    test dl, 80h
+    jz no_device
+    inc al
+no_device:
+    mov do_isdevice, al
+  end ['ax','bx','dx'];
 end;