sjw2264@cec1.wustl.edu (Stephen John Von Worley) (03/09/90)
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? BTW, I'm running on a Gateway system, if this would make any difference. -- _______________________________________________________________________________ Stephen Von Worley "Honesty is my only excuse." -- Metallica Internet: sjw2264@cec2.wustl.edu Ski the winter sun: Ski New Mexico!
cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) (03/11/90)
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
<std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
****************************************************************************
"So sorry, I never meant to break your heart ... but you broke mine."