home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / sysutl / portchk.lbr / PORTCHK.DZC / PORTCHK.DOC
Text File  |  1987-11-22  |  3KB  |  73 lines

  1. Documentation for PORTCHK v1.00
  2.  
  3. By S. Kluger, 01-13-84
  4.  
  5.  
  6.  
  7. PORTCHK is a small program designed to continually display the data value
  8. present at a port. This is ideal for checking peripherals or for demonstration
  9. purposes (watch the status change as you type on the keyboard, see the
  10. change caused by a modem ring detect and generally evaluate on-screen the
  11. results of some external change).
  12.  
  13. I have supplied the ASM file, PORTCHK.ASM, as well as two COM files,
  14. PORTCHK.COM and PORTCHK1.COM. Since I myself use a CompuPro Interfacer 4,
  15. I have of course written PORTCHK with that board in mind. PORTCHK lets you
  16. select both the select port AND the port you wish to evaluate. The program
  17. is set up for an Interfacer 4 and uses port 17H as the bank select port,
  18. which is the factory setting. When started, PORTCHK will ask for the
  19. SELECT PORT first, expecting your relative port number (i.e. 4,5,6,7 for the
  20. Interfacer 4 as shipped). Next, it will ask for the DATA PORT, which is the
  21. port you wish to evaluate. Use 10 for the IF4 data port.
  22. Then PORTCHK will immediately start displaying the input value first in HEX,
  23. then in BINARY and finally in modified ASCII. Modified means that all
  24. printable ASCII characters and DEL are passed to the character I/O routine
  25. directly, while control characters are prefixed with an uparrow and meta
  26. characters are prefixed with a tilde. Examples:
  27.  
  28. Port number 10 returns: 81  =  10000001  =  ^~A
  29.             0D  =  00001101  =  ^M
  30.             C1  =  11000001  =  ~A
  31.             41  =  01000001  =  A
  32.             01  =  00000001  =  ^A
  33.  
  34. You can pause display at any time with ^S, restart with any character except
  35. ^C, or abort with ^C. When aborting while the display runs or while paused,
  36. you have a chance to examine another port without rerunning the program.
  37. Pressing ^C at any prompt will warmboot CP/M.
  38.  
  39. Please note that you have to type the port value as a 2-digit HEX number.
  40. No error checking is done other than the check for 2 characters typed, editing
  41. is available during port number entry. If you enter an invalid character,
  42. interpretation of your input is terminated at that point after pressing
  43. RETURN. Example:
  44.  
  45. you typed    hex value
  46. AF        AF
  47. EG        0E
  48. 9K        09
  49. K9        00
  50.  
  51.  
  52. The file PORTCHK1.COM works like PORTCHK.COM, except that no provision is
  53. made for banked I/O boards. Use this program if you do not have a CompuPro
  54. Interfacer 3 or 4 to eliminate the superfluous SELECT PORT question. If you
  55. don't mind outputting something to port 17H, you can continue to use
  56. PORTCHK.COM without any ill effects.
  57.  
  58. In the ASM file, the only conditional is BANKP. Set it to 1 to reassemble
  59. a new version for the Interfacer 4, or set it to 0 for normal non-banked
  60. operation. PORTCHK1.COM was generated with BANKP EQU 0.
  61. If your Interfacer 3/4 is at a different base address, you have to re-
  62. assemble the file or use DDT to find and change the OUT 17 (D3 17) in-
  63. struction.
  64.  
  65. PORTCHK.ASM can be assembled with RMAC/LINK or you can rename it to
  66. PORTCHK.MAC and assemble with M80/L80. It has to be linked with SYSLIB v2.7.
  67. Note that L80 will work with the /P:100 switch.
  68.  
  69. Have fun using the program!
  70.  after pressing
  71. RETURN. Example:
  72.  
  73. you typed