home *** CD-ROM | disk | FTP | other *** search
-
-
- ASCKEY.COM Version 1.21
- Terminate and Stay Resident ASCII table
- & key codes look-up utility
- ────────────────══════════════════════════ BY: Kuo Shiang-Shiang (Djohan)
-
- ┌───────────────────────┐
- │ ACKNOWLEDGEMENT │
- └───────────────────────┘
- This software is Shareware. You may copy it, use it, or give it to your
- friends, upload it to a BBS or something similar, under the conditions
- that this software is distributed in its whole original package, with
- all the files included and unmodified. If ASCKEY.COM is to be included
- in a comercial product, please send me a free copy of the product as
- soon as it is published, and only then you may forget about getting my
- written permission for it.
- If you like this utility, or if there's any bug(s), or if you have had
- a good suggestion to have it improved, please let me know, I'll appre-
- ciate it. I could be reached at
- E-mail: djohan@mail.ncku.edu.tw
- or postal address: P.O.BOX 7-158, Tainan-70098, Taiwan.
- YOU ARE USING ASCKEY.COM AT YOUR OWN RISK! THE AUTHOR IS NOT LIABLE FOR
- ANY DAMAGE CAUSED BY THE USE OR INABILITY TO USE ASCKEY.COM.
- This package should include the following files, if they do not match
- with what is listed below, please contact the person or the place where
- you got the package from, or contact me.
- FILENAME LENGTH DATE TIME
- -------------------------------------
- ASCKEY.COM 4058 5-18-94 2:12p
- ASCKEY.DOC 10403 5-19-94 10:47p
- ASCKEY.ENG 13071 5-19-94 10:47p
-
-
-
- ----------------===============< Usage >================-----------------
- ^^^^^^^^^
- HOT KEY : Once residented, you may type [Left-Shift]+[Right-Shift]
- keys simultaneously to pop up this TSR under any TEXT
- screen.
- Reside memory: About 5.5K (About 4.5K if loaded without control code
- information)
- Options :
- /? HELP
- List out available options.
- /X Install without control code information
- ASCII 0-31 and 127 are control codes which are used in
- files (as: line feed, end of file, etc.) and in network
- communication. This TSR would load messages of control
- codes as well as the name strings of certain keys by de-
- fault when loading. You may use this option to leave out
- these messages, and saving about 1K of memory.
- /N Do not use extended keyboard service
- "Extended keyboard service" is the BIOS service provided
- to support enhanced (101/102-key) keyboard. Use this op-
- tion if your keyboard has less than 101 keys (Wait a mi-
- nute, are you STILL using such a keyboard??). Neverthe-
- less, if you're using this option on enhanced keyboards,
- it'll certainly work, except that some unsupported keys
- might not respond (P.S. The getch() function from Turbo
- C library doesn't support the enhanced keyboard, yet.
- That's why you won't be able to read F11 and F12 keys
- with it!). Please read "Technical Information" on how to
- write programs to read extended keys.
- /R Release program from memory
-
-
-
- ----------------==========< The ASCII table >===========-----------------
- ^^^^^^^^^^^^^^^^^^^
- The ASCII table could be popped up by pressing [L-Shift] and [R-Shift]
- keys simultaneously:
-
- ┌─ The number of currently pointed ASCII code, in Hex, Decimal and
- │ Binary numbers respectively.
- │
- │ The code information of current code, or the code itself
- │ printed if there's no information for the code. ─┐
- │ │
- │ ╔═════════════ ASCkey Coder Version 1.21 ══════════════╗ │
- └──────> Code No. 1Bh = 027d = 00011011b Escape <──────┘
- ║ ║
- ║ │ 0 1 2 3 4 5 6 7 8 9 A B C D E F ║
- ║ ───┼──────────────────────────────────────────────── ║
- ║ 0 │ 0 @ P ` p Ç É á ░ └ ╨ α ≡ ║
- ║ 1 │ ! 1 A Q a q ü æ í ▒ ┴ ╤ ß ± ║
- ║ 2 │ " 2 B R b r é Æ ó ▓ ┬ ╥ Γ ≥ ║
- ║ 3 │ # 3 C S c s â ô ú │ ├ ╙ π ≤ ║
- ║ 4 │ $ 4 D T d t ä ö ñ ┤ ─ ╘ Σ ⌠ ║
- ║ 5 │ % 5 E U e u à ò Ñ ╡ ┼ ╒ σ ⌡ ║
- ║ 6 │ & 6 F V f v å û ª ╢ ╞ ╓ µ ÷ ║
- ║ 7 │ ' 7 G W g w ç ù º ╖ ╟ ╫ τ ≈ ║
- ║ 8 │ ( 8 H X h x ê ÿ ¿ ╕ ╚ ╪ Φ ° ║
- ║ 9 │ ) 9 I Y i y ë Ö ⌐ ╣ ╔ ┘ Θ ∙ ║
- ║ A │ * : J Z j z è Ü ¬ ║ ╩ ┌ Ω · ║
- ║ B │ + ; K [ k { ï ¢ ½ ╗ ╦ █ δ √ ║
- ║ C │ , < L \ l | î £ ¼ ╝ ╠ ▄ ∞ ⁿ ║
- ║ D │ - = M ] m } ì ¥ ¡ ╜ ═ ▌ φ ² ║
- ║ E │ . > N ^ n ~ Ä ₧ « ╛ ╬ ▐ ε ■ ║
- ║ F │ / ? O _ o Å ƒ » ┐ ╧ ▀ ∩ ║
- ╚═════════════ » : View, INS: Get Key, ESC: Quit ═╝
-
- Pressing [Enter] key at any time would return the currently pointed
- ASCII code to the environment where this TSR was popped up. [Ins] key
- would start the key codes look-up function, and [Esc] key to quit TSR.
-
-
-
- ----------------===< The key codes look-up function >===-----------------
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Pressing [Ins] at the ASCII table would start this function. Then the
- ASCII code and scan code of any key you typed would be printed out on
- the table. If the key is a special key (like: F1-F12, Alt, Ctrl, Enter,
- Caps Lock, Num Lock, etc.), the corresponding message would be output
- on the upper right corner of the table, while the make-code and break-
- code of the keys could be seen under the message.
- Keys with ASCII code 0 or E0h are extended keys. This kind of keys when
- read with C language getch() function, would produce two codes, the
- first to be 0, while the second is its scan code. The improved routine
- of this function is included under "Technical Information" later in
- this file.
- In order that the user could look-up on virtually any key (including
- [Esc] key), the author had assigned a special keys-combination to exit
- from this look-up function -- [Shift] + [Backspace]. This keys-combina-
- tion normally would not produce a special code.
-
-
-
- ----------------=======< Technical Information >========-----------------
- ^^^^^^^^^^^^^^^^^^^^^^^^^
- The following demonstrates how to use BIOS keyboard function to read
- keys (the examples below improve C language getch() and ungetch() func-
- tions).
-
- Use BIOS to read keys of standard keyboards:
-
- /*----------------------------------------------------------------*/
- /* This function returns the ASCII code of normal keys (same as */
- /* the original getch() function) and scan_code+256 for extended */
- /* keys (you don't need to read twice as getch() does!). */
- /* Note: There is a very simple way to calculate "scan_code+256" */
- /* value-- Since the Hex number of 256 is 0x100, we would */
- /* simply add "1" to the front of a scan-code (in Hex num- */
- /* ber, of course). You don't need a calculator for that! */
- /* e.g: The scan-code of [F1] key is 0x3B, thus the return */
- /* value of this function is 0x13B */
- /* The scan-code of [Ins] key is 0x52, thus the return */
- /* value of this function is 0x152 */
- /*----------------------------------------------------------------*/
- int my_getch(void) {
- union REGS reg;
-
- reg.h.ah = 0; /* BIOS interrupt 16h to read keys */
- int86(0x16, ®, ®); /* ... of normal keyboards to AL */
- /* (ASCII code) and AH (scan code) */
- if(reg.h.al==0) {
- reg.h.al = reg.h.ah;
- reg.h.ah = 1;
- }
- else reg.h.ah = 0;
- return(reg.x.ax);
- }
-
- Use BIOS to read keys of enhanced (101/102-key) keyboards:
-
- /*----------------------------------------------------------------*/
- /* This function returns the ASCII code of normal keys (same as */
- /* the original getch() function) and scan_code+256 for extended */
- /* keys (you don't need to read twice as getch() does!). */
- /* Note: There is a very simple way to calculate "scan_code+256" */
- /* value-- Since the Hex number of 256 is 0x100, we would */
- /* simply add "1" to the front of a scan-code (in Hex num- */
- /* ber, of course). You don't need a calculator for that! */
- /* e.g: The scan-code of [F1] key is 0x3B, thus the return */
- /* value of this function is 0x13B */
- /* The scan-code of [Ins] key is 0x52, thus the return */
- /* value of this function is 0x152 */
- /*----------------------------------------------------------------*/
- int my_getch(void) {
- union REGS reg;
-
- reg.h.ah = 0x10; /* BIOS interrupt 16h to read keys */
- int86(0x16, ®, ®); /* ... of enhanced keyboards to AL */
- /* (ASCII code) and AH (scan code) */
- if(reg.h.al==0 || reg.h.al==0xE0) {
- reg.h.al = reg.h.ah;
- reg.h.ah = 1;
- }
- else reg.h.ah = 0;
- return(reg.x.ax);
- }
-
- The above functions could not read the key pushed back to the key-
- board by original C language ungetch() function. Use the following
- instead.
-
- /*----------------------------------------------------------------*/
- /* The value passed to 'key' should be the same value as that */
- /* which would be returned by my_getch() for the same key, either */
- /* normal key or extended key. And unlike the original ungetch() */
- /* function, this function would push any number of keys back to */
- /* the keyboard as many as the buffer could hold (normally about */
- /* 15 keys). */
- /* return value: 0 success */
- /* 1 fail (the keyboard buffer is full) */
- /*----------------------------------------------------------------*/
- int my_ungetch(unsigned int key) {
- union REGS reg;
- char ASCII_code, scan_code;
-
- if(key>0xFF) {
- ASCII_code = 0;
- scan_code = (char)(key & 0xFF);
- }
- else {
- ASCII_code = (char)(key);
- scan_code = (char)(key);
- }
- reg.x.ax = 0x0500;
- reg.x.cx = (scan_code<<8)+ASCII_code;
- int86(0x16, ®, ®);
- return((int)reg.h.al);
- }
-
-
-
- ----------------===============< History >==============-----------------
- ^^^^^^^^^^^
- Version 1.21 1994-05-18
- o Resolve the problem of not being able to read two command
- line parameters at a time
- o More compact codes, requiring smaller resident memory
-
- Version 1.20 1994-04-14
- o First public release as shareware
-
-
-
- ----------------=============< The Author >=============-----------------
- ^^^^^^^^^^^^^^
- Name : Kuo Shiang-Shiang (Djohan)
- E-mail : djohan@mail.ncku.edu.tw
- Postal address: P. O. Box 7-158, Tainan 70098, Taiwan.
- Author of : GetCAP I & II, ASCKEY, GRABBER2, etc.
-
- ────────────────═════════════< End of file >═════════════────────────────