home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
utils
/
sysutl
/
portchk.lbr
/
PORTCHK.DZC
/
PORTCHK.DOC
Wrap
Text File
|
1987-11-22
|
3KB
|
73 lines
Documentation for PORTCHK v1.00
By S. Kluger, 01-13-84
PORTCHK is a small program designed to continually display the data value
present at a port. This is ideal for checking peripherals or for demonstration
purposes (watch the status change as you type on the keyboard, see the
change caused by a modem ring detect and generally evaluate on-screen the
results of some external change).
I have supplied the ASM file, PORTCHK.ASM, as well as two COM files,
PORTCHK.COM and PORTCHK1.COM. Since I myself use a CompuPro Interfacer 4,
I have of course written PORTCHK with that board in mind. PORTCHK lets you
select both the select port AND the port you wish to evaluate. The program
is set up for an Interfacer 4 and uses port 17H as the bank select port,
which is the factory setting. When started, PORTCHK will ask for the
SELECT PORT first, expecting your relative port number (i.e. 4,5,6,7 for the
Interfacer 4 as shipped). Next, it will ask for the DATA PORT, which is the
port you wish to evaluate. Use 10 for the IF4 data port.
Then PORTCHK will immediately start displaying the input value first in HEX,
then in BINARY and finally in modified ASCII. Modified means that all
printable ASCII characters and DEL are passed to the character I/O routine
directly, while control characters are prefixed with an uparrow and meta
characters are prefixed with a tilde. Examples:
Port number 10 returns: 81 = 10000001 = ^~A
0D = 00001101 = ^M
C1 = 11000001 = ~A
41 = 01000001 = A
01 = 00000001 = ^A
You can pause display at any time with ^S, restart with any character except
^C, or abort with ^C. When aborting while the display runs or while paused,
you have a chance to examine another port without rerunning the program.
Pressing ^C at any prompt will warmboot CP/M.
Please note that you have to type the port value as a 2-digit HEX number.
No error checking is done other than the check for 2 characters typed, editing
is available during port number entry. If you enter an invalid character,
interpretation of your input is terminated at that point after pressing
RETURN. Example:
you typed hex value
AF AF
EG 0E
9K 09
K9 00
The file PORTCHK1.COM works like PORTCHK.COM, except that no provision is
made for banked I/O boards. Use this program if you do not have a CompuPro
Interfacer 3 or 4 to eliminate the superfluous SELECT PORT question. If you
don't mind outputting something to port 17H, you can continue to use
PORTCHK.COM without any ill effects.
In the ASM file, the only conditional is BANKP. Set it to 1 to reassemble
a new version for the Interfacer 4, or set it to 0 for normal non-banked
operation. PORTCHK1.COM was generated with BANKP EQU 0.
If your Interfacer 3/4 is at a different base address, you have to re-
assemble the file or use DDT to find and change the OUT 17 (D3 17) in-
struction.
PORTCHK.ASM can be assembled with RMAC/LINK or you can rename it to
PORTCHK.MAC and assemble with M80/L80. It has to be linked with SYSLIB v2.7.
Note that L80 will work with the /P:100 switch.
Have fun using the program!
after pressing
RETURN. Example:
you typed