home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- The Kaypro Master/Slave Software System
-
-
-
- Synopsis: Frequently there is a need for several Kaypro users
- (especially within a Users Group), to simultaneously witness a
- demonstration that is being run on only one machine. This software
- package allows a collection of Kaypro computers to be connected
- together in such a manner that a demonstration can be done on one
- machine (the Master) while all other machines (the Slaves)
- simultaneously display what is on the screen of the Master. The
- following features have been incorporated:
-
- 1. The machines are linked together by serial communication
- lines. The BIOS of the Master is transiently patched so that
- every character that is sent to the screen is also sent out
- the serial (Punch) port. The Master program will therefore
- run on any Kaypro machine that supports output to the "punch"
- device (which is usually TTY:, or the serial printer port).
-
- 2. The Slave captures incoming characters by interrupt driven
- software, (using mode 2 interrupts on the Z80). This allows
- high speed communication between machines without losing
- characters.
-
- 3. The machines can be connected in two manners:
-
- 1. One Master can connect from its serial port to several
- Slaves, using a "fanning out" method of interconnection.
-
- 2. Any Kaypro with 2 serial ports can act as a Master and
- Slave at the same time, therefore allowing daisy-chaining
- from one machine to the next.
-
-
-
- Source Languages: The Master and Slave programs are both written in
- Turbo Pascal (configured for the Kaypro II terminal). There is one
- external assembly language subroutine (the interrupt service
- subroutine) written in Z80 assembly language, which is used by the
- Slave program. The programs are named as follows:
-
- 1. K-MASTER.PAS is the source code for the Master program.
-
- 2. K-SLAVE.PAS is the source code for the Slave program.
-
- 3. K-SLAVE.Z80 is the source code for the external subroutine
- for the Slave program.
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- The Kaypro Master/Slave Software System
-
-
- 4. K-SLAVE.HEX is the Intel format Hex object file for
- K-SLAVE.Z80.
-
- 5. K-MASTER.COM is the Master program.
-
- 6. K-SLAVE.COM is the slave program.
-
- NOTE!!: The file K-SLAVE.HEX is absolutely necessary for the Slave to
- run, as it is dynamically loaded into high memory by the Slave program
- at run time. It must be on the same disk as K-SLAVE.COM.
-
- Disclaimer: The author assumes no responsibility for anyone who uses
- this program.
-
- Note: This is public domain software. Please give credit where it is
- due.
-
- The following pages contain the documentation from the beginning of
- the Master and Slave programs, respectively. Following that is a
- brief user's guide.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
- The Kaypro Master/Slave Software System
-
-
- { This program comprises the "master" module of the Master/Slave
- Kaypro demonstration network.
-
-
- NOTE: This program is Public Domain software and may
- be used for any but commercial purposes.
-
- DISCLAIMER: The author of this program assumes no responsibility
- for those who use it.
-
- Source Language: Turbo Pascal.
-
- The following functions are performed:
-
- - The serial printer port is configured to 8 bits/char, no parity,
- with baud rate menu selectable. Unlike the Kaypro default
- configuration, Autoenable on the SIO is off, so CTS has no
- effect on transmission.
- - The BIOS is patched so that whenever a call to CONOUT (primitive
- output to console) is made, a call to PUNCH is also made. PUNCH
- should be configured to be the serial printer port on the Kaypro.
- This is the only choice on the Kaypro 10. The BIOS is
- patched as follows:
- 1. Locations 1-2 are used to get the transfer vector address
- to WBOOT.
- 2. At WBOOT+9 is the transfer vector to CONOUT. This vector
- points to the entry point of CONOUT. Call this entry
- point CONOUT_ENTRY.
- 3. At WBOOT+15 is the transfer vector to PUNCH.
- 4. A memory location (call it PATCHLOC) is chosen in
- unused low memory. This defaults to location 8.
- 5. Starting at location PATCHLOC, the following instruction
- sequence is patched in:
- PUSH BC ;Save argument register
- CALL CONOUT_ENTRY
- POP BC
- JMP PUNCH
- 6. The transfer vector to CONOUT is changed from:
- JMP CONOUT_ENTRY
- to
- JMP PATCHLOC
-
- - Every Kaypro should support output to the punch device, as
- the organization of any CPM BIOS includes this as a primitive
- function. However, should you discover that the punch device
- is not supported at all on your Kaypro, you can do the following:
- 1. Reconfigure your system so that the "List" device
- is TTY: (the serial port) rather than LPT: (the parallel
- port).
-
-
- 3
-
-
-
-
-
-
-
-
-
-
-
- The Kaypro Master/Slave Software System
-
-
- 2. Make the following change in the souce code:
- from...
- const punch_offset = 15;
- to...
- const punch_offset = 12;
- 3. Borrow Turbo Pascal from someone and recompile the program.
- - This patch should work on any Kaypro computer. It requires that
- 8 bytes of memory, starting at PATCHLOC, are not modified by
- any of the application programs running on the machine during
- the demo session.
- - There are some system messages that will be displayed on the
- master screen but not on the slave screens. For example,
- on the Kaypro 10 running CPM 2.2G, the "Warm Boot" message
- is displayed only on the Master. This is because the warm
- boot message is printed by the BIOS, and it makes a call
- directly to CONOUT_ENTRY, rather than to the CONOUT transfer
- vector, so this patch has not effect. HOWEVER, virtually
- every application program makes its i/o calls through the
- BIOS or the BDOS (which uses the BIOS). This patch should
- therefore work with every application that adheres to the
- preceeding stipulation (that the 8 bytes of memory at PATCHLOC
- are not modified by the application being demonstrated).
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
- The Kaypro Master/Slave Software System
-
-
- { This program comprises the "slave" module of the Master/Slave
- Kaypro demonstration network.
-
- Synopsis: This program is an interrupt-driven receive-only
- terminal emulator. Whatever comes in the serial (modem) port
- is send directly to the BIOS for screen output.
-
-
- NOTE: This program is Public Domain software and may
- be used for any but commercial purposes.
-
- DISCLAIMER: The author of this program assumes no responsibility
- for those who use it.
-
- Source Language: Turbo Pascal with 1 external assembly language
- interrupt service routine.
-
- The slave module is written to function on all Kaypro machines.
- Some of the screen highlighting that the 10's and -84's can do
- may not work on the earlier 2's and 4's.
-
- The following assumptions are made:
-
- 1. The machine must be able to support mode 2 interrupts from
- the incoming serial port.
- 2. Any RAM above 8000h must be accessible at all times, including
- during ROM calls. (I think) this condition holds on all Kaypro
- machines.
- 3. Certain hardware addresses, defined in the initial constant
- declaration section of the program, may need to be modified
- for use on non-Kaypro machines. However, I believe they are
- all the same on the entire Kaypro line (at least the 2, 4, 10,
- and -84 models).
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
-
-
-
-
-
-
-
- The Kaypro Master/Slave Software System
-
-
- Using the Master program
-
- Simply enter K-MASTER. At the beginning of the program, the user is
- asked a few configuration questions. The default answers are
- displayed in square brackets. By hitting only a carriage return as
- your response, the default values are used. The following questions
- are asked:
-
- 1. Serial Port Number (status/control) [000E] :
- This question requests the port address for status and
- control of the Punch device. This defaults to the serial
- printer port on the Kaypros with 2 serial ports. For Kaypros
- with only one serial port, this should be changed to 6.
-
- 2. Port number for Baud Rate [0008] :
- This question requests the port address for the baud rate
- controller for the punch device. This defaults to the serial
- printer port on the Kaypros with 2 serial ports. For Kaypros
- with only one serial port, this should be changed to 0.
-
- 3. Patch address [0008] :
- This question requests the address to put the BIOS patch,
- which is 8 bytes long. It defaults to location 8 (yes, low
- memory. The BIOS transfer vector table is modified also).
- Few (most likely no) application programs use the memory
- locations between 0008hex and 0010hex. Thus this patch
- address is probably OK. If your machine bombs in Master mode
- when you use a particular program, try cold booting and using
- a different patch address.
-
- 4. You will then be presented with a baud rate menu. Try 19200.
- If that doesn't work, 9600 should.
-
-
- If the Master is already is in effect, you will be asked if you want
- to remove it. If your response is positive, the machine will then be
- taken out of Master mode. If negative, you will be asked if you want
- to change the baud rate of the Master. All questions that require a
- yes/no answer should be answered with a single letter, "Y" or "N"
- (upper or lower case is OK).
-
-
-
-
-
-
-
-
-
-
-
- 6
-
-
-
-
-
-
-
-
-
-
-
- The Kaypro Master/Slave Software System
-
-
- Using The Slave Program
-
- Enter K-SLAVE. The slave program always uses the modem port (port
- address #4 for data) for input. This can be changed rather simply by
- changing some constants in the source program, however, all Kaypros
- (to the best of my knowledge) use that address for the modem port.
-
- The slave program also prompts with a baud rate menu for the input
- speed. Obviously, the baud rate must be set the same for the Slave as
- it is for the Master.
-
- A Slave may be taken out of Slave mode at any time by hitting
- control-Z. If it is daisy chained and also in Master mode, it will
- remain in Master mode.
-
-
- Wiring the machines
-
- The physical assignments of the pins on Kaypros are as follows:
-
- Modem Port: Transmit: Pin 2
- Receive: Pin 3
-
- Serial Printer
- Port: Transmit: Pin 3
- Receive: Pin 2
-
- Thus, to run Master to Slave: If the Master uses the Serial Printer
- port for output (i.e. a Kaypro 10, or -84), wire the cables Male to
- Male, connecting pins 2-2, 3-3, 7-7, and 1-1. If the master uses the
- modem port for output, the cables must wired connecting pins 2-3, 3-2,
- 7-7, and 1-1 (i.e. a null modem connection). Pin 20 (Clear to send)
- is not used and does not need to be connected (but it won't hurt
- anything).
-
-
- Questions/suggestions?
-
- Mark Frank
- Washington Univ Med School
- Dept Genetics
- 4566 Scott Ave
- St Louis, MO 63112
-
-
-
-
-
-
-
-
- 7
-
-
-
-
-
-
-
-