瀏覽代碼

+ basic implementation of do_isdevice for msdos

git-svn-id: branches/i8086@24014 -
nickysn 12 年之前
父節點
當前提交
b2fc6a2f6d
共有 1 個文件被更改,包括 14 次插入0 次删除
  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;