home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MODEM / MUFUS32R.ZIP / MUFUSION.DOC < prev    next >
Encoding:
Text File  |  1991-10-31  |  17.1 KB  |  373 lines

  1. Documentation for MUFUSION.PAS by Peter Summers
  2.  
  3. This is _FREE_ software.
  4.  
  5. If you are happy with this software, please give a copy to anyone you 
  6. think might find it useful.  If you find any problems, please contact me 
  7. (details below).
  8.  
  9.  
  10. Description:
  11.  
  12.   Mufusion is a terminal emulation program which emulates a Microfusion 
  13.   MF30 terminal, as used with McDonnell Douglas hospital information 
  14.   systems software.  It is written in Turbo Pascal v5.0, and was adapted 
  15.   from a videotext terminal program by Jim Nutt, which was in the public 
  16.   domain.  Most of the code in MUFUSION.PAS is copyright (C) Cardiology 
  17.   Department, Royal Melbourne Hospital.   It may be freely distributed 
  18.   in an unmodified form, or modified for use within a particular 
  19.   institution.  If you make any changes, please indicate this by an
  20.   addition to the documentation.  If the changes are like to be of use 
  21.   to others, please forward your code to me at the address below so it 
  22.   can be incorporated, with suitable credit, in the official release.
  23.  
  24.  
  25. Startup:
  26.  
  27.   Mufusion by default uses COM1: at 9600 baud.  The complete syntax for 
  28.   mufusion is
  29.  
  30.   MUFUSION [<port>[<speed>[<foreground>[<background>[<protected>[printer]]]]]]
  31.  
  32.   All parameters are optional.
  33.  
  34.   The port can be a number from 1 to 4 (defaults to COM1:).  If the port 
  35.   can not be found, the program will give an error message and set the 
  36.   DOS errorlevel to 1.
  37.  
  38.   The speed can be one of 110, 150, 300, 600, 1200, 2400, 4800, 9600, 
  39.   19200, 38400 or 57600 (defaults to 9600).
  40.  
  41.   The foreground color is a number from 0 to 7 (where 0=black, 1=blue,
  42.   2=green, 3=aqua, 4=red, 5=purple, 6=yellow, 7=white).  The default is 
  43.   green.
  44.  
  45.   The background color is likewise a number between 0 and 7, the default
  46.   is black.
  47.  
  48.   A different color can be specified for protected mode text.  This 
  49.   defaults to cyan.
  50.  
  51.   With a monochrome graphics adaptor, the color settings have no effect.
  52.  
  53.   The printer can be any DOS device (LPT1, LPT2, LPT3, COM1, COM2, NUL) 
  54.   or file name.  If not specified, it defaults to LPT1.  No checking is 
  55.   done on the device/file name.  Do not send printer output to the port 
  56.   you are using for communications.
  57.  
  58.  
  59. Commands:
  60.  
  61.   The current command list is as follows:
  62.  
  63.     <ALT>-<C>           Open/close a capture file.
  64.     <ALT>-<D>           Dial with a Hayes compatible modem.  Precede the 
  65.                         number with "P" or "T" to force pulse or tone 
  66.                         dialing.
  67.     <ALT>-<E>           Emulation on/off, enables a debug mode, using 
  68.                         43/50 line mode if available.
  69.     <ALT>-<H>           Hangs up the modem.
  70.     <ALT>-<O>           Shell to DOS.
  71.     <ALT>-<P>           Printer on/off.  The printer may be any DOS 
  72.                         device or a file, as specified on the command 
  73.                         line.
  74.     <ALT>-<X>           Exit the terminal emulator.
  75.     <ALT>-<F1>          Send ^[.
  76.     <ALT>-<F2>          Send ^\.
  77.     <ALT>-<F3>          Send ^^.
  78.     <ALT>-<F4>          Send ^].
  79.     <ALT>-<F5>          Send ^@.
  80.     <ALT>-<F6>          Send ^@.
  81.     <ALT>-<F9>          Clear the screen.
  82.  
  83.     <CNTL-BREAK>        Send a break signal.
  84.  
  85.     Print Screen        Print the screen to the specified output device.
  86.  
  87.     PgUp or <ALT>-<F7>  Page back (30 screens, when emulation is on).
  88.     PgDn or <ALT>-<F8>  Page forward.
  89.     Del                 Send a delete character (chr(127)).
  90.  
  91.  
  92. Implementation:
  93.  
  94. Mufusion sends characters with parity set to none.  Received characters 
  95. have the parity bit stripped before display, but no parity is the 
  96. prefered line setting.  If the host does not support XON/XOFF flow 
  97. control, mufusion may drop characters, particulary when printing to a 
  98. slow printer or capturing data onto a floppy disk.  Not all of the 
  99. microfusion terminal control codes are implemented, those that are are 
  100. listed below.  All these functions should behave as for an MF30 
  101. terminal.  If they don't, please let me know.
  102.  
  103. Control Codes
  104.  
  105.     BELL  ( 7)          Bell
  106.     BS    ( 8)          Back space destructive
  107.     LF    (10)          Line feed
  108.     VT    (11)          Vertical Address lead-in
  109.     FF    (12)          Master clear
  110.     CR    (13)          Carriage return
  111.     DLE   (16)          Horizontal Address lead-in
  112.     DC2   (18)          Online printing ON
  113.     DC4   (20)          Online printing OFF
  114.     SUB   (26)          Clear screen
  115.  
  116.     Escape Sequences
  117.  
  118.     SP                  Destructive backspace
  119.     !                   Continuous bell
  120.     &                   Protect off
  121.     '                   Protect on
  122.     (                   Full intensity
  123.     )                   Half intensity
  124.     *                   New line
  125.     +                   Master clear
  126.     ,                   Clear to end of page
  127.     -                   Clear to end of line
  128.     1                   Non-reverse video
  129.     2                   Reverse video
  130.     5                   Bell
  131.     <                   Cursor left
  132.     = Y X               Position cursor row Y col X
  133.     >                   Cursor right
  134.     @                   Send a carriage return
  135.     E                   Insert line
  136.     F                   Expanded facilities - some implemented, see below.
  137.     L                   Cursor down
  138.     M                   Cursor up
  139.     N                   Flashing on
  140.     O                   Flashing off
  141.     P                   Print the screen
  142.     R                   Delete line
  143.     T                   Clear to end of line
  144.     Y                   Clear to end of page
  145.     Z                   Cursor home
  146.     e x c               Repeat character x for count c
  147.     o                   Clear block
  148.     p                   Clear field
  149.  
  150. Expanded Facilities
  151.  
  152.     A                   Printer ON
  153.     B                   Printer OFF
  154.     C                   Printer ONLY
  155.     E                   Half-duplex
  156.     F                   Full-duplex
  157.     M                   Reposition cursor
  158.     W                   Define function keys.
  159.  
  160.  
  161. Acknowledgments:
  162.  
  163. Thanks is due to the following people;
  164.  
  165. Jim Nutt, who wrote the original teletext terminal emulator on which this
  166. is based.
  167.  
  168. Philip R. Burns, Alan Bishop, C. J. Dunford, Michael Quinlan, Gene 
  169. Harris and Michael Quinlan who wrote various parts of the asynchronous
  170. communication port handling library used by this program.
  171.  
  172. Robert Murton, Peter Coventry, Andrew McKenzie, Ron Nash, Louis 
  173. Eilermann, Neil McQuinn, Danny O'Callaghan and Paul Oppey who helped 
  174. with beta testing various versions of the code.
  175.  
  176.  
  177. Comments, distribution:
  178.  
  179. Please send any comments to me, Peter Summers, c/- Cardiology Department,
  180. Royal Melbourne Hospital, 3050, phone (+61 3 / 03) 342 8727, fax (+61 3 
  181. / 03) 347 2808 or email u5533129@ucsvc.ucs.unimelb.edu.au.  If you make 
  182. any improvements, please send them to me so I can incorporate them in 
  183. the official release and everyone can benefit from them.  Updates of 
  184. this code are regularly posted to the SIMTEL archives, and can be 
  185. obtained from there (wsmr-simtel20.army.mil), or a local mirror site 
  186. (archie.au in Australia) by FTP.  Updates are also posted to the PC 
  187. Connection BBS ((+61 3 / 03) 388 0909) and mail can be left for me there 
  188. addressed to PETERS.  If you want an upgrade and can't get it any other 
  189. way, send me a disk and return postage to the above address.
  190.  
  191.  
  192. Blatant Advertising:
  193.  
  194. Cardiology at RMH also has cardiology patient record keeping systems for
  195. echocardiographs, ambulatory monitor, exercise test and ECG reports, a stock
  196. control program, an equipment database program and an electronic mail 
  197. program, all written in Clipper, which we would like to make available 
  198. to others.  We are willing to sell source code licenses for these
  199. packages for AU$200.  Please call me if you are interested.
  200.  
  201. We also have software for analysing ECGs for Late Potentials, which we 
  202. are willing to license.
  203.  
  204.  
  205. Version History (from when I started keeping one):
  206.  
  207. v2.0    Terminal emulator ported from Turbo Pascal v3.0 to v5.0, using a
  208.         completely new asynch comms library.  The program now takes 
  209.         command line parameters for port number, speed and screen 
  210.         colors.  The function keys are displayed when defined.  The move 
  211.         to the new compiler improved the speed markedly and cleared up 
  212.         problems with the typeahead.
  213. v2.0a   Fixed a problem with COM4:.  Neatened up the function key
  214.         display.
  215. v2.0b   Disabled the exit from the program on Control-Break.
  216. v2.0c   Fixed the handling of the bell character, which had caused problems
  217.         on one machine.
  218. v2.0d   Fixed a number of problems with the dial command.  Improved the
  219.         modem hangup, which now works more reliably, and doesn't 
  220.         automatically hang up when the program exits.  Also, the program 
  221.         now strips the eighth bit from incoming data.
  222. v2.0e   Cleaned up the behaviour of the program when it runs with very
  223.         little free memory.  If there is insufficient memory for the capture
  224.         buffer the program now gives a message only if these functions are
  225.         accessed.
  226. v2.0f   I finally got sick of the capture to file stuff, which didn't work
  227.         properly under TP v5.0, and was probably not very useful anyway, so
  228.         I deleted it all.
  229. v2.0g   Cleaned up the code a lot to make it more maintainable.  Also,
  230.         made the default protected mode colour cyan, because people liked
  231.         it so much.
  232. v2.0h   Detects mono graphics adaptors and doesn't attempt to use colors
  233.         if one is found, so inverse text now works properly on a mono 
  234.         display.
  235. v2.0i   Fixed a problem with the protected mode coloring being turned
  236.         off when inverse text was turned off.  Also, the display is now 
  237.         forced into 25x80 text mode if it was in another mode when the 
  238.         program started, and is restored afterwards.
  239. v2.0j   Increased the maximum function key definition length from 10 to
  240.         80 characters.
  241. v2.0k   Fixed a bug which caused definitions of function keys F11 and
  242.         above to overwrite the definition of F10, and changed the 
  243.         function key display slightly.
  244. v2.0l   Fixed a bug which caused the program to sometimes generate a
  245.         carriage return character when it shouldn't while trying to
  246.         overwrite protected text with unprotected.
  247.  
  248. v2.1    Now supports slave printing, plus manual printer toggle with the 
  249.         ALT-P key combination.  If the printer in off-line, the printing 
  250.         will be turned back off automatically.
  251. v2.1a   Fixed a bug with the ESC-F-C sequence.
  252.  
  253. v2.2    Now supports 20 function keys, keys 11-20 being the standard 
  254.         function keys combined with the shift key.  Shift-F1 and 
  255.         shift-F10 therefore no longer exit the emulator.  Also cleaned 
  256.         up the modem control (dial and hangup) code.
  257. v2.2a   More cosmetic changes to the modem control stuff.
  258.  
  259. v2.3    Now supports a non-emulation mode for debugging purposes, selected
  260.         with <ALT>-<E>.
  261.  
  262. v2.4    Now displays the shift-F key definitions when the Shift key is
  263.         depressed and available commands when the Alt key is pressed.  
  264.         Removed the ALT-F command which displayed the function keys, as 
  265.         it should no longer be necessary.  Cleaned up some other bits 
  266.         of code, and implemented the Insert Line and Delete Line codes.
  267.  
  268. v2.5    Added an optional extra command line parameter allowing the 
  269.         specification of alternative print destinations.  Any valid DOS 
  270.         device or file name can be specified.
  271.  
  272. v2.6    Went over the emulation stuff really carefully, and made a few 
  273.         corrections.  The program should now work with almost any program
  274.         that can handle a Microfusion MF30.
  275. v2.6a   Now generates an error message if it can't write to the printer, 
  276.         to tell the user that it has turned printing off.
  277. v2.6b   Added buffering of data to the printer and XON/XOFF flow control 
  278.         to cope better with slow printers.
  279. v2.6c   Cleaned up the flow control stuff a bit.
  280.  
  281. v2.7    Added the ability to capture incoming text to a file (other than 
  282.         by specifying a file as the printer).
  283.  
  284. v2.8    Moved to a new asynch comms library, which gives me speeds up to 
  285.         57600 bps, better flow control and break signalling, among other 
  286.         things.
  287. v2.8a   Improved the modem hangup code, changed the dial code so that it
  288.         hangs up the modem before attempting to dial, shortened the break 
  289.         to one second, added my name to the status line (on the 
  290.         insistence of our director).
  291. v2.8b   Moved the send break function from the <ALT>-<B> key to the 
  292.         <CNTL>-<BREAK> key.
  293. v2.8c   Fixed a minor problem associated with baud rates above 19200 bps.
  294.  
  295. v3.0    Added 16 pages of backpaging (by popular request), and the 
  296.         ability to shell out to DOS.
  297. v3.0a   Fixed a bug with screen addresses containing ^Q or ^S characters 
  298.         being intercepted by the async routines for flow control.
  299.  
  300. v3.1    Implemented the esc-P (print screen).  The screen printing code 
  301.     now writes to the specified print device, not necessarily to LPT1,
  302.         when emulation is on.  The print-screen key also sends output 
  303.         via this code, which allows for the capture of screen dumps to a 
  304.         file.  The Del key now sends a chr(127).  Chr(127)s sent to 
  305.         mufusion are now ignored.  Fixed a bug with the control-break 
  306.         key not working as expected when shelled out to DOS.
  307. v3.1a    Tracked down a couple of places where the screen copy used for 
  308.     backpaging wasn't being updated.
  309. v3.1b   Changed the ALT-functions help line, because I woke up to the 
  310.         fact that O comes before P in the alphabet.
  311. v3.1c    Fixed a few places where the program attempted to use the 
  312.     backpage buffer when it was not being kept up to date.
  313. v3.1d   Fixed the file capture code so that it warns you before 
  314.         overwriting an existing file, and offers you the options of 
  315.         appending to it, overwriting it or leaving it alone.
  316. v3.1e   Fixed a problem with MUFUSION not sending characters on some 
  317.         machines if it was run immediately after another terminal program.
  318. v3.1f   Reduced the length of the break signal from 1000 to 400ms.
  319. v3.1g   Fixed a problem with characters being dropped while printing the 
  320.         screen, and while sending a break signal.
  321. v3.1h   Fixed the problem with control-break being ignored when shelled 
  322.         out to DOS.
  323. v3.1i   Fixed the backpage display function so it no longer wraps around.
  324. v3.1j   Fixed up the shell to DOS function because some vectors still 
  325.         held the values put into them by turbo pascal, which didn't
  326.         actually cause any problems but seemed undesirable.
  327. v3.1k   Removed some bits of redundant code.
  328. v3.1l   Turned stack checking and array bounds checking on for all the 
  329.         code, after a report of a machine crashing while running 
  330.         mufusion.
  331. v3.1m   Fixed a bug with cursor positioning commands and unprotected 
  332.         text.
  333. v3.1n   Fixed a bug with scrolling text when the character after the 
  334.         line feed was a ^G.
  335. v3.1o   Altered the hangup function so that it tells you whether the 
  336.         carrier was dropped (for those with internal modems).
  337. v3.1p   Recoded the back page buffer handling, because people with XTs 
  338.         were complaining about the speed.
  339. v3.1q   Fixed a problem with the display of function key definitions.
  340.  
  341. v3.2    Implemented the <ALT>-function keys, as per the MF30.
  342. v3.2a    Turned range checking off, which speeds everything up
  343.     considerably, and added more documentation to the source.
  344. v3.2b    Went over the character display code and made it faster.
  345. v3.2c    Discovered that I had allocated a much larger stack than 
  346.     required, so I reduced it to something more sensible.
  347. v3.2d   Cleaned up the clear to end of screen / end of line code, making
  348.         it neater and slightly faster.
  349. v3.2e   Cleaned up the get a character code and made it slightly faster.
  350. v3.2f   All strings are now sent with 10ms/char delays to avoid problems 
  351.         on slow systems.
  352. v3.2g   Turned stack checking off, which should improve speed.
  353. v3.2h   Changed scrolling to avoid a line feed occuring if an escape 
  354.         sequence follows.
  355. v3.2i   Fixed a couple of places where the screen would scroll and the 
  356.         backpage buffer didn't.
  357. v3.2j   Fixed a bug in the handling of the "esc e" sequence.
  358. v3.2k    Cleaned up the auto-echo code.
  359. v3.2l   Wrote in a work-around for lines set up for Prism terminals to 
  360.         bypass the download an emulation stuff.
  361. v3.2m   Fixed the "can't find the port" code so it exits with the 
  362.         errorlevel set to 1.
  363. v3.2n   Fixed a bug which caused the display screw up with an EGA screen 
  364.         after shelling to DOS when debug mode was on.
  365. v3.2o   Minor improvements to the debugging (non-emulation mode) functions.
  366. v3.2p   Rewrote the backpage buffer handling, so it no longer needs to 
  367.         be cleared on startup, to avoid the two second delay on slow 
  368.         XTs.  Increased the backpage buffer size to from 15 to 30 
  369.         screens.
  370. v3.2q   Fixed the screen dump routines so they work properly when 
  371.         viewing backpages.
  372. v3.2r   Rewrote the screen dump routine to be slightly less convoluted.
  373.