Path: utzoo!attcan!lsuc!maccs!cs4g6ag From: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc Subject: Re: Keyboard question Message-ID: <25F9E71E.21473@maccs.dcss.mcmaster.ca> Date: 11 Mar 90 05:50:22 GMT References: <1990Mar9.070424.15361@cec1.wustl.edu> Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Distribution: na Organization: McMaster University, Hamilton, Ontario Lines: 37 In article <1990Mar9.070424.15361@cec1.wustl.edu> sjw2264@cec2.UUCP (Stephen John Von Worley) writes: $I am programming a graphical terminal emulation package in TC 2.0, and $have stumbled upon an interesting problem which someone perhaps can $help me solve. When a control-S is typed at the keyboard, program $execution is halted (exactly as what happens after ctrl-Numlock) until $another key is hit. I am using BIOS call 0x16 to read characters; is there $any easy way to correct this problem and read a ctrl-S when it is pressed? The use of ^S to pause display isn't done by the BIOS, and it isn't done on keyboard reads. It is done when you output to the screen using a DOS call (int 21h, assorted functions). You can stop this behaviour in one of two ways: - write to the screen using only int 10h so that DOS never gets its hands on the ^S ... this is icky, though, since you'll have to write your own routines for outputting strings if you're not running on an AT (although it is faster!) - use a call to IOCTL to put handle 1 (stdout) into raw mode. This is likely what you want to do. Here's a code fragment from Duncan, 1st edition, pg. 351: mov ax, 4400h ; get current device information mov bx, 1 ; std output = handle 1 int 21h ; transfer to DOS mov dh, 0 ; force DH = 0 - req'd or dl, 20h ; set raw mode bit mov ax, 4401h ; set current device information int 21h ; transfer to DOS Raw mode stops DOS from filtering out such nasties as ^P, ^S, and ^C, and also speeds up output. -- Stephen M. Dunn cs4g6ag@maccs.dcss.mcmaster.ca = "\nI'm only an undergraduate!!!\n"; **************************************************************************** "So sorry, I never meant to break your heart ... but you broke mine."