Pascal and Hex etc

Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jul 2006
Posts: 2
Reputation: denzal2006 is an unknown quantity at this point 
Solved Threads: 0
denzal2006's Avatar
denzal2006 denzal2006 is offline Offline
Newbie Poster

Pascal and Hex etc

 
0
  #1
Jul 30th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 233
Reputation: Lord Soth is an unknown quantity at this point 
Solved Threads: 4
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

Re: Pascal and Hex etc

 
0
  #2
Aug 5th, 2006
Hi,

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

Loren Soth
Best regards,
Loren Soth

Crimson K. Software _________________________________________________________________ Crimson K. Blog
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 2
Reputation: denzal2006 is an unknown quantity at this point 
Solved Threads: 0
denzal2006's Avatar
denzal2006 denzal2006 is offline Offline
Newbie Poster

Re: Pascal and Hex etc

 
0
  #3
Aug 28th, 2006
either translate into ASCII or use as they for use in Pascal!
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 233
Reputation: Lord Soth is an unknown quantity at this point 
Solved Threads: 4
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

Re: Pascal and Hex etc

 
0
  #4
Aug 29th, 2006
Best regards,
Loren Soth

Crimson K. Software _________________________________________________________________ Crimson K. Blog
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 254
Reputation: jan1024188 is an unknown quantity at this point 
Solved Threads: 2
jan1024188's Avatar
jan1024188 jan1024188 is offline Offline
Posting Whiz in Training

Re: Pascal and Hex etc

 
0
  #5
Sep 1st, 2006
what is that ASCII?
Last edited by jan1024188; Sep 1st, 2006 at 12:14 pm.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 1
Reputation: yashar is an unknown quantity at this point 
Solved Threads: 0
yashar yashar is offline Offline
Newbie Poster

Re: Pascal and Hex etc

 
0
  #6
Nov 10th, 2006
Originally Posted by denzal2006 View 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
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Pascal and Delphi Forum


Views: 3898 | Replies: 5
Thread Tools Search this Thread



Tag cloud for Pascal and Delphi
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC