Im „Internet" erhielt ich im Januar 1994 folgenden Artikel.
Über das Newsnet gelangte vor einiger Zeit der folgende Artikel zu mir.
|
|
From v_p_dose@cpmgut.toppoint.de (Volker Dose)
Newsgroups: comp.os.cpm
Subject: Serial connection with PIP
Date: Tue, 11 Jan 94 22:34:20 MEZ
Hi.
I have read, that somebody wanted to transfer files from a CP/M System to another.
There is a way, to do it with PIP.COM, which should be on every CP/M System.
On CP/M 3 the PIP can handle the AUX: and the parameters (baudrate and XON/XOFF protocol) can be configured with DEVICE.COM (on some computers is another program to configure the serial connection, should be named SIO.COM or so).
PIP for CP/M 2.2 can be patched.
After you have connected the two Computers at the serial connectors (you need a crossed null modem cable):
TxD pin 2 -------\/----------- pin 2 TxD
RxD pin 3 -------/\----------- pin 3 RxD
GND pin 7 -------------------- pin 7 GND
DTR pin 20 ----| |----- pin 20 DTR
DSR pin 6 ----| |----- pin 6 DSR
RTS pin 4 -| | | |- pin 4 RTS
CTS pin 5 -| | | |- pin 5 CTS
DCD pin 8 ----| |----- pin 8 DCD
and made the same baud rates on both machines you can test the connection with:
sender: 'PIP PUN:=filename[EB]' (on CP/M 3 AUX:)
receiver: 'PIP filename=RDR:[EB]' (on CP/M 3 AUX:)
You should make the test with a short ASCII file, the 'E' swith for PIP make the text shown on the console too and the 'B' switch make a block-transfer like X-modem.
If you want to transfer COM files, you have the problem that in such files could be a ASCII 19 which is blockend marker.
And there could be a ASCII 1Ah, which is EOF, End Of File.
These characters can't be transferred, because they are special, 'command' characters.
A good way is to make it to a *.HEX file.
In there you have only hexadecimal numbers, so you can even transfer with a 7-bit connection.
It is done with the file UNLOAD.COM, I've made it to a HEX File, you can transform it to the .COM version
- on CP/M 2.X with 'LOAD filename.HEX'
- on CP/M 3 with 'HEXCOM filename.HEX'
Now here comes the UNLOAD.HEX.
Write this part as UNLOAD.HEX to disk and make it to a COM-file.
------------------------------------------------------------------------------
:100100002A06002BF9C311017E1223130DC2080128
:10011000C9215C00111F010E09CD0801C346010071
:100120000000000000000000434F4D0000000000F0
:1001300000000000000000000000000000000000BF
:10014000ED0300040000C3B6012A4201EB2A44017A
:100150007D937C9ADA9F01210000224401EB2A4220
:10016000017B957A9CD291012A400119EB0E1ACDA0
:100170000500111F010E14CD0500B7C28B011180BF
:10018000002A440119224401C35D012A440122428C
:10019000011180000E1ACD0500210000224401EB60
:1001A0002A400119EB2A42017DB43E1AC81A2A449A
:1001B0000123224401C9AF322B01323F0121000447
:1001C0002242012244010E0F111F01CD05003CC245
:1001D000ED010E0911DD01CD0500C300000D0A4E31
:1001E0004F204946494C452046494C4524215C0056
:1001F00011FB010E09CD0801C3220200000000001E
:100200000000000048455800000000000000000009
:10021000000000000000000000000000ED070004E6
:100220000000C3A502F52A1E02EB2A20027D937C62
:100230009ADA9502210000222002EB2A1E027B9509
:100240007A9CD287022A1C0219EB0E1ACD050011E6
:10025000FB010E15CD0500B7C268021180002A20EF
:100260000219222002C33A020E09117402CD0500C0
:10027000F1C300000D0A4449534B2046554C4C3AFB
:10028000204F46494C45241180000E1ACD0500210F
:100290000000222002EB2A1C0219EBF1122A200294
:1002A00023222002C9AF320702321B02210004229E
:1002B0001E022100002220020E1311FB01CD0500B9
:1002C0000E1611FB01CD05003CC2ED020E0911D73F
:1002D00002CD0500C300000D0A4E4F2044495220B4
:1002E00053504143453A204F46494C452421000193
:1002F0000600116D001A13D630DA1403FE0ADA0B69
:1003000003D607DA1403FE10D21403292929294F32
:1003100009C3F50222EA03CD4901CA8A03F53E3A30
:10032000CD2502AF32EC033E10CD4E033AEB03CDA8
:100330004E033AEA03CD4E03AFCD4E03F10610C58E
:10034000CD4E03C105CA7003CD4901C33F034F3AE7
:10035000EC039132EC03790F0F0F0FCD5F0379E6B9
:100360000FC630FE3ADA6A03C607C5CD2502C1C9F9
:100370003AEC03CD4E033E0DCD25023E0ACD2502BB
:100380002AEA0311100019C314033E3ACD250206D0
:1003900005AFC5CD4E03C105C291033E0DCD25026B
:1003A0003E0ACD25022A20027DE67FC2B103221E2D
:1003B000023E1AF5CD2502F1C2A5030E1011FB0174
:1003C000CD05003CC2E7030E0911D203CD0500C3E1
:1003D000E7030D0A43414E4E4F5420434C4F5345C3
:1003E000204F46494C4524C3000000000000000097
:1003F00000000000000000000000000000000000FD
:0000000000
------------------------------------------------------------------------------
[Hier als Z80-Quelldatei1]
If you are transfering files you should run the sending PIP with the 'H' switch, it checks for correct INTEL-hex-format.
If the test above is not working, perhaps the IO-byte is not implemented.
You can check this with 'PIP LST:=CON:', which will send all chars from the keyboard to the printer.
Close this routing with ^Z (EOF).
If the receiving computer will not come back after the transfering, you can send an explizit EOF with 'PIP PUN:=EOF:' on CP/M 2.2 or 'PIP AUX:=EOF' on CP/M 3.
You should transfer short files only, so that the connection is terminated, before PIP has to write to slowly disk. (depends on your TPA)
If your CP/M 2.2 PIP will not work because the IO-byte is not implemented or only the hell knows why, you can patch PIP.
There are patch-areas for the logical devices INP: and OUT:.
First you need to know, how you can reach your serial devices.
If you can reach it via a port (the handbook of your computer should show this), the following bytes can be patched in PIP with DDT or SID or another patch utility:
for 8080 CPU:
103h JMP 110h ; Jump to INPUT-routine
106h JMP 120h ; Jump to OUTPUT-routine
; INPUT-routine
110h IN 1Dh ; Port 1dh is the Statusport (Computer dependant !!!)
112h ANI 2 ; test, if char is available
114h JZ 110h ; if not loop until there is something
117h IN 1Ch ; now get the char from the serial port (Computer
; dependant !!!!!!)
119h ANI 7Fh ; make bit 8 low !!
11Bh STA 109h ; save char in 109h
11Eh RET ; back to PIP
; OUTPUT-routine
120h IN 1Dh ; test Status word
122h ANI 1 ; is SIO ready to send ??
124h JZ 120h ; loop until SIO is ready
127h MOV A,C ; char from reg. C to Accu
128h OUT 1Dh ; send char to serial port
12Ah RET ; return
Of course this works only if your SIO can be reached via I/O ports and you know these ports !!!!!
Te bytes '1Dh' and '1Ch' are only examples !!!
After these patches you must invoke PIP :
- for sending: 'PIP OUT:=filename[EBH]
- for receiving: 'PIP filename=INP:[BH]
These informations are from Club-Info #35 and #36 of the 'Club-80'-Computer club.
Thanks for Fritz Chwolka and Alexander Schmid, who made the articels.
I know this is a little bit too big for a MSG in the comp.os.cpm but I think it will help a few people.
Sorry, if you were bored of this !
Bye, Volker.
---
Volker Dose | email: v_p_dose@cpmgut.toppoint.de |
Tel.: 04343/1357 | CP/M is not dead, it just smells funny ! |
1. |
Das vorliegende Programm findet sich hier als optimierte Z80-Quelldatei.
Von der Firma MICROCode Consulting existiert eine weitere Version, die auch die Eingabe der User Area im Dateinamen erlaubt.
(In Anlehnung an das CP/M 3 Dienstprogramm HEXCOM habe ich das Gegenstück COMHEX geschrieben.)
|
|
Eingescanned von
Werner Cirsovius
November 2002
© Volker Dose