Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro.pc » Reading control chars from Turbo
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Reading control chars from Turbo [message #86451] Tue, 18 June 2013 23:01 Go to next message
Anonymous
Karma:
Originally posted by: kumar@hplcea.UUCP (kumar)
Message-ID: <7000001@hplcea.UUCP>
Date: Mon, 26-Nov-84 14:18:00 EST
Article-I.D.: hplcea.7000001
Posted: Mon Nov 26 14:18:00 1984
Date-Received: Sat, 1-Dec-84 20:17:28 EST
Organization: Hewlett-Packard - Palo Alto, CA
Lines: 7
Nf-ID: #N:hplcea:7000001:000:371
Nf-From: hplcea!kumar    Nov 26 11:18:00 1984

Has anyone tried control character I/O from Turbo Pascal?

I have been using Turbo to read control characters from the keyboard.
I have had no problems except the utter inability of Turbo to read
nulls (control-@) from the keyboard.  I tried the con, trm and kbd
device names, all without any success.  Has anyone else run into this
problem?  Is this a known Turbo bug?
Re: Reading control chars from Turbo [message #86461 is a reply to message #86451] Tue, 18 June 2013 23:01 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: jsoc@lasspvax.UUCP (John Socha)
Message-ID: <141@lasspvax.UUCP>
Date: Sat, 1-Dec-84 16:48:10 EST
Article-I.D.: lasspvax.141
Posted: Sat Dec  1 16:48:10 1984
Date-Received: Tue, 4-Dec-84 05:33:29 EST
References: <>
Reply-To: jsoc@lasspvax.UUCP (John Socha)
Organization: Theory Center (Cornell University)
Lines: 20
Summary: 

In article <> kumar@hplcea.UUCP (kumar) writes:
 > 
 > I have been using Turbo to read control characters from the keyboard.
 > I have had no problems except the utter inability of Turbo to read
 > nulls (control-@) from the keyboard.  I tried the con, trm and kbd
 > device names, all without any success.  Has anyone else run into this
 > problem?  Is this a known Turbo bug?

This isn't a problem with Turbo Pascal, it's PC-DOS's fault.

PC-DOS uses the null character (control-@) as a special character.
Whenever you push a key that isn't part of the ASCII character set,
like the function keys, DOS sends two characters.  The first character
(an ASCII null) means that the next character is the scan code for
the key you pushed.  That means there's no way you can send a plain,
ordinary null character.

			John Socha
			Author of Assembly Language Safari on the IBM PC.
			{...}cornell!lasspvax!jsoc
Re: Reading control chars from Turbo [message #112670 is a reply to message #86451] Mon, 16 September 2013 13:50 Go to previous message
jsoc is currently offline  jsoc
Messages: 3
Registered: June 2013
Karma: 0
Junior Member
Message-ID: <141@lasspvax.UUCP>
Date: Sat, 1-Dec-84 16:48:10 EST
Article-I.D.: lasspvax.141
Posted: Sat Dec  1 16:48:10 1984
Date-Received: Sat, 26-Jan-85 06:09:47 EST
References: <>
Reply-To: jsoc@lasspvax.UUCP (John Socha)
Organization: Theory Center (Cornell University)
Lines: 20
Summary: 

In article <> kumar@hplcea.UUCP (kumar) writes:
 > 
 > I have been using Turbo to read control characters from the keyboard.
 > I have had no problems except the utter inability of Turbo to read
 > nulls (control-@) from the keyboard.  I tried the con, trm and kbd
 > device names, all without any success.  Has anyone else run into this
 > problem?  Is this a known Turbo bug?

This isn't a problem with Turbo Pascal, it's PC-DOS's fault.

PC-DOS uses the null character (control-@) as a special character.
Whenever you push a key that isn't part of the ASCII character set,
like the function keys, DOS sends two characters.  The first character
(an ASCII null) means that the next character is the scan code for
the key you pushed.  That means there's no way you can send a plain,
ordinary null character.

			John Socha
			Author of Assembly Language Safari on the IBM PC.
			{...}cornell!lasspvax!jsoc
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Big Discount on AT&T PC 6300
Next Topic: time() function for PCDOS
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Apr 20 01:47:11 EDT 2024

Total time taken to generate the page: 0.08015 seconds