ReC98/libs/BorlandC/_isatty.asm

21 lines
345 B
NASM
Raw Normal View History

2014-08-14 14:50:20 +00:00
; int __cdecl isatty(int handle)
public _isatty
_isatty proc
@@handle = word ptr dPtrSize + 2
2014-08-14 14:50:20 +00:00
push bp
mov bp, sp
push si
push di
mov ax, 4400h
mov bx, [bp+@@handle]
int 21h ; DOS - 2+ - IOCTL - GET DEVICE INFORMATION
; BX = file or device handle
xchg ax, dx
and ax, 80h
pop di
pop si
pop bp
ret
_isatty endp