Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!agate!ig!uwmcsd1!bbn!rochester!srs!dan From: dan@srs.UUCP (Dan Kegel) Newsgroups: comp.sys.ibm.pc Subject: Re: Checking for KBD input in "raw" mode Message-ID: <621@srs.UUCP> Date: 2 Mar 88 18:21:34 GMT References: <8281@eddie.MIT.EDU> <5341@well.UUCP> Reply-To: srs!dan@cs.rochester.edu Distribution: na Organization: S.R.Systems Lines: 18 Ed Nather asked > How do you check to see if there are any characters ready on stdin in RAW > mode? The ususal int 21, ah=0bh (Check Stdin Status) is vulnerable to ^C. In article <5341@well.UUCP> gam3@well.UUCP (G. Allen Morris III) writes: > use int 21h function 4402h (IOCTL Read). This is wrong; none of the usual devices distributed with MS-DOS can do IOCTL reads or writes. Perhaps Morris meant int 21h function 4406h (IOCTL Check Input Status), e.g. mov ax, 4406h mov bx, 0 ; fileno(stdin) int 21h ; AL = 0 if no characters waiting, ffh if at least one char ready. This works even when stdin is redirected to a file. -- Dan Kegel srs!dan@cs.rochester.edu rochester!srs!dan dan%srs.uucp@SOL.cs.rochester.edu