home *** CD-ROM | disk | FTP | other *** search
- Documentation for MUFUSION.PAS by Peter Summers
-
- This is _FREE_ software.
-
- If you are happy with this software, please give a copy to anyone you
- think might find it useful. If you find any problems, please contact me
- (details below).
-
-
- Description:
-
- Mufusion is a terminal emulation program which emulates a Microfusion
- MF30 terminal, as used with McDonnell Douglas hospital information
- systems software. It is written in Turbo Pascal v5.0, and was adapted
- from a videotext terminal program by Jim Nutt, which was in the public
- domain. Most of the code in MUFUSION.PAS is copyright (C) Cardiology
- Department, Royal Melbourne Hospital. It may be freely distributed
- in an unmodified form, or modified for use within a particular
- institution. If you make any changes, please indicate this by an
- addition to the documentation. If the changes are like to be of use
- to others, please forward your code to me at the address below so it
- can be incorporated, with suitable credit, in the official release.
-
-
- Startup:
-
- Mufusion by default uses COM1: at 9600 baud. The complete syntax for
- mufusion is
-
- MUFUSION [<port>[<speed>[<foreground>[<background>[<protected>[printer]]]]]]
-
- All parameters are optional.
-
- The port can be a number from 1 to 4 (defaults to COM1:). If the port
- can not be found, the program will give an error message and set the
- DOS errorlevel to 1.
-
- The speed can be one of 110, 150, 300, 600, 1200, 2400, 4800, 9600,
- 19200, 38400 or 57600 (defaults to 9600).
-
- The foreground color is a number from 0 to 7 (where 0=black, 1=blue,
- 2=green, 3=aqua, 4=red, 5=purple, 6=yellow, 7=white). The default is
- green.
-
- The background color is likewise a number between 0 and 7, the default
- is black.
-
- A different color can be specified for protected mode text. This
- defaults to cyan.
-
- With a monochrome graphics adaptor, the color settings have no effect.
-
- The printer can be any DOS device (LPT1, LPT2, LPT3, COM1, COM2, NUL)
- or file name. If not specified, it defaults to LPT1. No checking is
- done on the device/file name. Do not send printer output to the port
- you are using for communications.
-
-
- Commands:
-
- The current command list is as follows:
-
- <ALT>-<C> Open/close a capture file.
- <ALT>-<D> Dial with a Hayes compatible modem. Precede the
- number with "P" or "T" to force pulse or tone
- dialing.
- <ALT>-<E> Emulation on/off, enables a debug mode, using
- 43/50 line mode if available.
- <ALT>-<H> Hangs up the modem.
- <ALT>-<O> Shell to DOS.
- <ALT>-<P> Printer on/off. The printer may be any DOS
- device or a file, as specified on the command
- line.
- <ALT>-<X> Exit the terminal emulator.
- <ALT>-<F1> Send ^[.
- <ALT>-<F2> Send ^\.
- <ALT>-<F3> Send ^^.
- <ALT>-<F4> Send ^].
- <ALT>-<F5> Send ^@.
- <ALT>-<F6> Send ^@.
- <ALT>-<F9> Clear the screen.
-
- <CNTL-BREAK> Send a break signal.
-
- Print Screen Print the screen to the specified output device.
-
- PgUp or <ALT>-<F7> Page back (30 screens, when emulation is on).
- PgDn or <ALT>-<F8> Page forward.
- Del Send a delete character (chr(127)).
-
-
- Implementation:
-
- Mufusion sends characters with parity set to none. Received characters
- have the parity bit stripped before display, but no parity is the
- prefered line setting. If the host does not support XON/XOFF flow
- control, mufusion may drop characters, particulary when printing to a
- slow printer or capturing data onto a floppy disk. Not all of the
- microfusion terminal control codes are implemented, those that are are
- listed below. All these functions should behave as for an MF30
- terminal. If they don't, please let me know.
-
- Control Codes
-
- BELL ( 7) Bell
- BS ( 8) Back space destructive
- LF (10) Line feed
- VT (11) Vertical Address lead-in
- FF (12) Master clear
- CR (13) Carriage return
- DLE (16) Horizontal Address lead-in
- DC2 (18) Online printing ON
- DC4 (20) Online printing OFF
- SUB (26) Clear screen
-
- Escape Sequences
-
- SP Destructive backspace
- ! Continuous bell
- & Protect off
- ' Protect on
- ( Full intensity
- ) Half intensity
- * New line
- + Master clear
- , Clear to end of page
- - Clear to end of line
- 1 Non-reverse video
- 2 Reverse video
- 5 Bell
- < Cursor left
- = Y X Position cursor row Y col X
- > Cursor right
- @ Send a carriage return
- E Insert line
- F Expanded facilities - some implemented, see below.
- L Cursor down
- M Cursor up
- N Flashing on
- O Flashing off
- P Print the screen
- R Delete line
- T Clear to end of line
- Y Clear to end of page
- Z Cursor home
- e x c Repeat character x for count c
- o Clear block
- p Clear field
-
- Expanded Facilities
-
- A Printer ON
- B Printer OFF
- C Printer ONLY
- E Half-duplex
- F Full-duplex
- M Reposition cursor
- W Define function keys.
-
-
- Acknowledgments:
-
- Thanks is due to the following people;
-
- Jim Nutt, who wrote the original teletext terminal emulator on which this
- is based.
-
- Philip R. Burns, Alan Bishop, C. J. Dunford, Michael Quinlan, Gene
- Harris and Michael Quinlan who wrote various parts of the asynchronous
- communication port handling library used by this program.
-
- Robert Murton, Peter Coventry, Andrew McKenzie, Ron Nash, Louis
- Eilermann, Neil McQuinn, Danny O'Callaghan and Paul Oppey who helped
- with beta testing various versions of the code.
-
-
- Comments, distribution:
-
- Please send any comments to me, Peter Summers, c/- Cardiology Department,
- Royal Melbourne Hospital, 3050, phone (+61 3 / 03) 342 8727, fax (+61 3
- / 03) 347 2808 or email u5533129@ucsvc.ucs.unimelb.edu.au. If you make
- any improvements, please send them to me so I can incorporate them in
- the official release and everyone can benefit from them. Updates of
- this code are regularly posted to the SIMTEL archives, and can be
- obtained from there (wsmr-simtel20.army.mil), or a local mirror site
- (archie.au in Australia) by FTP. Updates are also posted to the PC
- Connection BBS ((+61 3 / 03) 388 0909) and mail can be left for me there
- addressed to PETERS. If you want an upgrade and can't get it any other
- way, send me a disk and return postage to the above address.
-
-
- Blatant Advertising:
-
- Cardiology at RMH also has cardiology patient record keeping systems for
- echocardiographs, ambulatory monitor, exercise test and ECG reports, a stock
- control program, an equipment database program and an electronic mail
- program, all written in Clipper, which we would like to make available
- to others. We are willing to sell source code licenses for these
- packages for AU$200. Please call me if you are interested.
-
- We also have software for analysing ECGs for Late Potentials, which we
- are willing to license.
-
-
- Version History (from when I started keeping one):
-
- v2.0 Terminal emulator ported from Turbo Pascal v3.0 to v5.0, using a
- completely new asynch comms library. The program now takes
- command line parameters for port number, speed and screen
- colors. The function keys are displayed when defined. The move
- to the new compiler improved the speed markedly and cleared up
- problems with the typeahead.
- v2.0a Fixed a problem with COM4:. Neatened up the function key
- display.
- v2.0b Disabled the exit from the program on Control-Break.
- v2.0c Fixed the handling of the bell character, which had caused problems
- on one machine.
- v2.0d Fixed a number of problems with the dial command. Improved the
- modem hangup, which now works more reliably, and doesn't
- automatically hang up when the program exits. Also, the program
- now strips the eighth bit from incoming data.
- v2.0e Cleaned up the behaviour of the program when it runs with very
- little free memory. If there is insufficient memory for the capture
- buffer the program now gives a message only if these functions are
- accessed.
- v2.0f I finally got sick of the capture to file stuff, which didn't work
- properly under TP v5.0, and was probably not very useful anyway, so
- I deleted it all.
- v2.0g Cleaned up the code a lot to make it more maintainable. Also,
- made the default protected mode colour cyan, because people liked
- it so much.
- v2.0h Detects mono graphics adaptors and doesn't attempt to use colors
- if one is found, so inverse text now works properly on a mono
- display.
- v2.0i Fixed a problem with the protected mode coloring being turned
- off when inverse text was turned off. Also, the display is now
- forced into 25x80 text mode if it was in another mode when the
- program started, and is restored afterwards.
- v2.0j Increased the maximum function key definition length from 10 to
- 80 characters.
- v2.0k Fixed a bug which caused definitions of function keys F11 and
- above to overwrite the definition of F10, and changed the
- function key display slightly.
- v2.0l Fixed a bug which caused the program to sometimes generate a
- carriage return character when it shouldn't while trying to
- overwrite protected text with unprotected.
-
- v2.1 Now supports slave printing, plus manual printer toggle with the
- ALT-P key combination. If the printer in off-line, the printing
- will be turned back off automatically.
- v2.1a Fixed a bug with the ESC-F-C sequence.
-
- v2.2 Now supports 20 function keys, keys 11-20 being the standard
- function keys combined with the shift key. Shift-F1 and
- shift-F10 therefore no longer exit the emulator. Also cleaned
- up the modem control (dial and hangup) code.
- v2.2a More cosmetic changes to the modem control stuff.
-
- v2.3 Now supports a non-emulation mode for debugging purposes, selected
- with <ALT>-<E>.
-
- v2.4 Now displays the shift-F key definitions when the Shift key is
- depressed and available commands when the Alt key is pressed.
- Removed the ALT-F command which displayed the function keys, as
- it should no longer be necessary. Cleaned up some other bits
- of code, and implemented the Insert Line and Delete Line codes.
-
- v2.5 Added an optional extra command line parameter allowing the
- specification of alternative print destinations. Any valid DOS
- device or file name can be specified.
-
- v2.6 Went over the emulation stuff really carefully, and made a few
- corrections. The program should now work with almost any program
- that can handle a Microfusion MF30.
- v2.6a Now generates an error message if it can't write to the printer,
- to tell the user that it has turned printing off.
- v2.6b Added buffering of data to the printer and XON/XOFF flow control
- to cope better with slow printers.
- v2.6c Cleaned up the flow control stuff a bit.
-
- v2.7 Added the ability to capture incoming text to a file (other than
- by specifying a file as the printer).
-
- v2.8 Moved to a new asynch comms library, which gives me speeds up to
- 57600 bps, better flow control and break signalling, among other
- things.
- v2.8a Improved the modem hangup code, changed the dial code so that it
- hangs up the modem before attempting to dial, shortened the break
- to one second, added my name to the status line (on the
- insistence of our director).
- v2.8b Moved the send break function from the <ALT>-<B> key to the
- <CNTL>-<BREAK> key.
- v2.8c Fixed a minor problem associated with baud rates above 19200 bps.
-
- v3.0 Added 16 pages of backpaging (by popular request), and the
- ability to shell out to DOS.
- v3.0a Fixed a bug with screen addresses containing ^Q or ^S characters
- being intercepted by the async routines for flow control.
-
- v3.1 Implemented the esc-P (print screen). The screen printing code
- now writes to the specified print device, not necessarily to LPT1,
- when emulation is on. The print-screen key also sends output
- via this code, which allows for the capture of screen dumps to a
- file. The Del key now sends a chr(127). Chr(127)s sent to
- mufusion are now ignored. Fixed a bug with the control-break
- key not working as expected when shelled out to DOS.
- v3.1a Tracked down a couple of places where the screen copy used for
- backpaging wasn't being updated.
- v3.1b Changed the ALT-functions help line, because I woke up to the
- fact that O comes before P in the alphabet.
- v3.1c Fixed a few places where the program attempted to use the
- backpage buffer when it was not being kept up to date.
- v3.1d Fixed the file capture code so that it warns you before
- overwriting an existing file, and offers you the options of
- appending to it, overwriting it or leaving it alone.
- v3.1e Fixed a problem with MUFUSION not sending characters on some
- machines if it was run immediately after another terminal program.
- v3.1f Reduced the length of the break signal from 1000 to 400ms.
- v3.1g Fixed a problem with characters being dropped while printing the
- screen, and while sending a break signal.
- v3.1h Fixed the problem with control-break being ignored when shelled
- out to DOS.
- v3.1i Fixed the backpage display function so it no longer wraps around.
- v3.1j Fixed up the shell to DOS function because some vectors still
- held the values put into them by turbo pascal, which didn't
- actually cause any problems but seemed undesirable.
- v3.1k Removed some bits of redundant code.
- v3.1l Turned stack checking and array bounds checking on for all the
- code, after a report of a machine crashing while running
- mufusion.
- v3.1m Fixed a bug with cursor positioning commands and unprotected
- text.
- v3.1n Fixed a bug with scrolling text when the character after the
- line feed was a ^G.
- v3.1o Altered the hangup function so that it tells you whether the
- carrier was dropped (for those with internal modems).
- v3.1p Recoded the back page buffer handling, because people with XTs
- were complaining about the speed.
- v3.1q Fixed a problem with the display of function key definitions.
-
- v3.2 Implemented the <ALT>-function keys, as per the MF30.
- v3.2a Turned range checking off, which speeds everything up
- considerably, and added more documentation to the source.
- v3.2b Went over the character display code and made it faster.
- v3.2c Discovered that I had allocated a much larger stack than
- required, so I reduced it to something more sensible.
- v3.2d Cleaned up the clear to end of screen / end of line code, making
- it neater and slightly faster.
- v3.2e Cleaned up the get a character code and made it slightly faster.
- v3.2f All strings are now sent with 10ms/char delays to avoid problems
- on slow systems.
- v3.2g Turned stack checking off, which should improve speed.
- v3.2h Changed scrolling to avoid a line feed occuring if an escape
- sequence follows.
- v3.2i Fixed a couple of places where the screen would scroll and the
- backpage buffer didn't.
- v3.2j Fixed a bug in the handling of the "esc e" sequence.
- v3.2k Cleaned up the auto-echo code.
- v3.2l Wrote in a work-around for lines set up for Prism terminals to
- bypass the download an emulation stuff.
- v3.2m Fixed the "can't find the port" code so it exits with the
- errorlevel set to 1.
- v3.2n Fixed a bug which caused the display screw up with an EGA screen
- after shelling to DOS when debug mode was on.
- v3.2o Minor improvements to the debugging (non-emulation mode) functions.
- v3.2p Rewrote the backpage buffer handling, so it no longer needs to
- be cleared on startup, to avoid the two second delay on slow
- XTs. Increased the backpage buffer size to from 15 to 30
- screens.
- v3.2q Fixed the screen dump routines so they work properly when
- viewing backpages.
- v3.2r Rewrote the screen dump routine to be slightly less convoluted.