home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD1.img / d1xx / d157 / ecpm / ecpm.doc < prev    next >
Encoding:
Text File  |  1988-10-02  |  7.6 KB  |  176 lines

  1.  
  2.                  ECPM - a CP/M emulator for the Amiga
  3.  
  4.                      Version 2.01 - June 29, 1988
  5.  
  6.                            by Willi Kusche
  7.  
  8.                           An enhancement of:
  9.  
  10.  
  11.                  SIMCPM - a CP/M simulator for the Amiga
  12.  
  13.                      by Jim Cathey and Charlie Gibbs
  14.  
  15.                     Version 1.00 - September 15, 1987
  16.  
  17.  
  18.      This is a FREELY-DISTRIBUTABLE program.  Spread it around all you like,
  19. just don't sell it, and please keep the entire package (including this file)
  20. intact.  If you find any bugs or make any changes, please let me know - I'd
  21. like to keep my copy up to date.
  22.  
  23.      This program is based on an article by Jim Cathey which ran in Dr. Dobb's
  24. Journal from January to March 1986.  The original program emulated an 8080,
  25. including CP/M BIOS and BDOS calls, on a CP/M-68K system.  I have modified the
  26. operating system interface to run under AmigaDOS (from the CLI only).
  27.  
  28.      Note that the simulation is of an 8080, not a Z80.  However, the Z80
  29. instructions LDIR, LDDR, and CPIR have been supported.  This is because the
  30. setting of the carry flag is more like the Z80 than the 8080, and might fool
  31. such packages as BDS C, which would then try to use these instructions.  If
  32. there is enough interest, I could be persuaded to add full Z80 support.
  33.  
  34.      The IN, OUT, EI, and DI instructions are currently ignored.
  35.  
  36.      The following BDOS calls are not supported:
  37.  
  38.           3 - reader input
  39.           4 - punch output
  40.          17 - search for first file
  41.          18 - search for next file
  42.          24 - get active drive map
  43.          28 - protect drive
  44.          29 - get read-only map
  45.          30 - set file attributes
  46.          32 - get/set user code
  47.  
  48.      The only BIOS calls supported are those for program termination and
  49. console and list I/O.  (Low-level disk access could get scary.)  If a
  50. program attempts to use an unsupported BIOS or BDOS call, an appropriate
  51. error message will be displayed, along with a register dump, and the program
  52. will be terminated.
  53.  
  54.      Basic H19 terminal emulation (similar to a VT52) has been provided.
  55. Escape sequences for cursor positioning, cursor to home, screen clearing,
  56. and insert and delete modes are translated to the corresponding Amiga
  57. sequences.  Any escape sequences that ECPM can't recognize are passed
  58. through unchanged.  You can disable all escape sequence translation by
  59. changing the equated value "h19" (in ECPM1.ASM) to from 1 to 0.
  60.  
  61.      To speed up console output for programs which write one character at a
  62. time, I have included a buffered output option.  If you include the -b switch
  63. as the first command-line parameter, all console output will be held until one
  64. of the following events occurs:
  65.  
  66.           - a carriage return, line feed, or bell character is written
  67.           - the buffer (currently 2K) becomes full
  68.           - a BIOS or BDOS call other than console output is made.
  69.  
  70. It should be possible to use buffered output in just about any program.
  71. Note that if a program uses the "console output string" function (BDOS
  72. call 9), the entire string is written in a single operation even when
  73. buffering is not requested.
  74.  
  75.      List output is sent to PRT:RAW.  This ensures that no newline translation
  76. will take place.  The printer is not opened until the first attempt is made to
  77. access it.  If the printer cannot be opened for any reason, the program will be
  78. terminated.  At program termination the printer will be closed if it was used.
  79.  
  80.      If ECPM is brought up with no command-line parameters, it will present
  81. the standard CP/M A> prompt.  At this point you can run CP/M .COM files just
  82. like on a normal CP/M system.  The command line will be scanned for up to two
  83. FCBs and the tail will be passed to the program.  When the program terminates,
  84. the A> prompt will be re-displayed.  To return to AmigaDOS, enter a control-C
  85. (CP/M warm boot) at the A> prompt.
  86.  
  87.      If command-line parameters are given, they will be passed to ECPM as if
  88. they had been entered at the A> prompt.  When the program terminates, ECPM
  89. will automatically return to AmigaDOS.  This allows you to run CP/M programs
  90. from an execute file.
  91.  
  92.      Here are some sample invocations of ECPM:
  93.  
  94.           ecpm
  95.                Loads the simulator, which presents the A> prompt and waits
  96.                for CP/M commands.  Type control-C at the prompt to exit.
  97.  
  98.           ecpm -b
  99.                Same as above, except console output buffering is used.
  100.  
  101.           ecpm myprog
  102.                Loads the simulator, which loads and runs the CP/M program
  103.                MYPROG.COM.  When MYPROG terminates, ECPM returns to AmigaDOS.
  104.  
  105.           ecpm mbasic basprog
  106.                Loads the simulator, which loads Microsoft BASIC-80 (if you
  107.                have it), which in turn loads and runs BASPROG.BAS.  When
  108.                BASPROG issues a SYSTEM command, ECPM returns to AmigaDOS.
  109.  
  110.           ecpm -b mbasic basprog
  111.                Same as above, but with console output buffering.  Since
  112.                MBASIC does all console I/O one character at a time, the
  113.                buffered option can speed it up considerably.
  114.  
  115.      A trace version of the simulator, ECPMT, is included.  This program
  116. works like ECPM, but it provides optional instruction and BIOS/BDOS tracing.
  117. This is provided as a separate program because it must test whether to trace
  118. each instruction.  As a result, it runs slightly slower than ECPM, even when
  119. tracing is not active.
  120.  
  121.      Before running each program, ECPMT will prompt you for starting and
  122. ending addresses for tracing, and whether you want BIOS/BDOS calls traced.
  123. Simulation starts with tracing disabled.  When ECPM executes an instruction
  124. at the starting address, tracing is turned on.  All 8080 registers and the
  125. top four stack entries, as well as the current instruction, are displayed
  126. for each instruction until the ending address is reached.  Tracing is then
  127. disabled until the start address is again encountered.  After displaying
  128. 8 instructions, execution is suspended; enter G to go ahead with tracing
  129. disabled, Q to quit the program, or any other key to trace the next 8
  130. instructions.
  131.  
  132.      If you have requested BIOS/BDOS call tracing, the message
  133.  
  134.           BIOS CALL nn AT aaaa
  135. or
  136.           BDOS CALL nn AT aaaa
  137.  
  138. will be displayed each time a BIOS or BDOS call is made.  The BDOS call
  139. number (contents of register C in hex) will replace "nn" for BDOS calls,
  140. while BIOS calls will set "nn" to a sequential number starting at 01 for
  141. program termination, 02 for console status, etc.  The address where the
  142. call is made will be taken from the top of the stack and displayed in
  143. place of "aaaa".
  144.  
  145.      ECPM consists of two source modules, ECPM1.ASM and ECPM2.ASM.
  146. The trace version, ECPMT, is made by re-assembling ECPM2 and including
  147. the header file ECPMT.HDR.  This file includes a definition of the label
  148. "tracehd"; ECPM2.ASM checks for this label using an IFD directive, and if
  149. it finds it the trace code is included.The assembler must support an
  150. optional header file and the IFD directive.  No include files are needed,
  151. although SMALL.LIB is required for linking.
  152.  
  153.      Please address any kudos, flames, etc. to
  154.  
  155.           Charlie Gibbs
  156.           #21 - 21555 Dewdney Trunk Road
  157.           Maple Ridge, B.C.  V2X 3G6
  158.  
  159. or to Larry Phillips or Jeff Lydiatt on CompuServe or Usenet.  (I don't have
  160. the time or money to live there myself.)
  161.  
  162. ********** NOTE **************************************
  163.  
  164.      The documentation above is basically the same as what was released on
  165. Fred Fish disk number 109.  However, where the documentation conflicted with
  166. the enhanced version, it was altered.
  167.  
  168.      Additional documentation is in the file named 'update.doc'.
  169.  
  170.      This file created by:
  171.           Willi Kusche
  172.           SYSOP
  173.           KMMM Pascal BBS
  174.           July 2, 1988
  175.  
  176.