944,028 Members | Top Members by Rank

Ad:
Jul 30th, 2006
0

Pascal and Hex etc

Expand Post »
Hi

I'm trying to use "IBM PC Keyboard Scan Codes" in Pascal which involve Decimal Pair and/or Hex Pair codes. (similar to ASCII).

Could someone please tell me how to use these in VPascal. Preferably not Turbo Pascal, but any Pascal version would be appreciated!

A 'code' example would be
PageUp button being
(00,73) (decimal pair) or
(0x00,0x49) (hex pair).

(data from http://jimprice.com/jim-asc.htm)

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
denzal2006 is offline Offline
2 posts
since Jul 2006
Aug 5th, 2006
0

Re: Pascal and Hex etc

Hi,

Do you want to know how to obtain scan codes from keyboard or how to translate them to ASCII ?

Loren Soth
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006
Aug 28th, 2006
0

Re: Pascal and Hex etc

either translate into ASCII or use as they for use in Pascal!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
denzal2006 is offline Offline
2 posts
since Jul 2006
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006
Sep 1st, 2006
0

Re: Pascal and Hex etc

what is that ASCII?
Last edited by jan1024188; Sep 1st, 2006 at 12:14 pm.
Reputation Points: 27
Solved Threads: 2
Posting Whiz in Training
jan1024188 is offline Offline
254 posts
since Aug 2006
Nov 10th, 2006
0

Re: Pascal and Hex etc

Click to Expand / Collapse  Quote originally posted by denzal2006 ...
Hi

I'm trying to use "IBM PC Keyboard Scan Codes" in Pascal which involve Decimal Pair and/or Hex Pair codes. (similar to ASCII).

Could someone please tell me how to use these in VPascal. Preferably not Turbo Pascal, but any Pascal version would be appreciated!

A 'code' example would be
PageUp button being
(00,73) (decimal pair) or
(0x00,0x49) (hex pair).

(data from http://jimprice.com/jim-asc.htm)

Thanks
Hi Denzal,

You need to read port Hex60. The following would work in Turbo Pascal (sorry I don't know VPascal :-)). Please replace underscores (_) with spaces ( ).

uses crt;

var
__sc: byte;

begin
__clrscr;
__repeat
____gotoxy(35,12);
____sc := port[$60]; {this makes sc the value of the scan code}
____write(sc,'___');
__until sc = 1; {exit on escape character}
end.

Greetings,

YS
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yashar is offline Offline
1 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: Hash tables in pascal
Next Thread in Pascal and Delphi Forum Timeline: How to force program to write itself?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC