2
0
Эх сурвалжийг харах

+ basic implementation of do_isdevice for msdos

git-svn-id: branches/i8086@24014 -
nickysn 12 жил өмнө
parent
commit
b2fc6a2f6d

+ 14 - 0
rtl/msdos/sysfile.inc

@@ -83,5 +83,19 @@ end;
 
 
 
 
 function do_isdevice(handle:THandle):boolean;
 function do_isdevice(handle:THandle):boolean;
+label
+  no_device;
 begin
 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;
 end;