home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / pascal / 6779 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  980 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!miavx1!apsvax.aps.muohio.edu!sjmadsen
  2. Newsgroups: comp.lang.pascal
  3. Subject: Re: HOW DO YOU READ MORE THAN ONE KEY
  4. Message-ID: <1992Nov20.140802.14326@miavx1.acs.muohio.edu>
  5. From: sjmadsen@apsvax.aps.muohio.edu (Steve Madsen)
  6. Date: 20 Nov 92 14:08:02 -0500
  7. References: <1992Nov19.100442.2914@cs.joensuu.fi>
  8. Nntp-Posting-Host: apsvax.aps.muohio.edu
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Lines: 16
  11.  
  12. : begin
  13. :  repeat
  14. :   write(Port[$20]);
  15.                ^^^
  16. :  until (1=2); 
  17. : end;
  18.  
  19. Wrong..  Port $20 is the 8259 Programmable Interrupt Chip.  It won't do
  20. you much good reading the keyboard scan codes.
  21.  
  22. Try Port[$60].  I believe that's the right one.  Also, a note on the
  23. numbers you will get:
  24.  
  25. When you first press a key, the number shown is the MAKE code.  When you
  26. release the key, another number will pop up.  That's the BREAK code.
  27. Simply, those are the codes the keyboard sends when you press keys. 
  28.