home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / CPM.ZIP / CPMV2.DOC < prev    next >
Text File  |  1990-05-28  |  11KB  |  331 lines

  1. Documentation for CP/M-Emulator Version 2.0
  2. ===========================================
  3.  
  4. Achtung deutsche Anwender: Dies ist die Übersetzung der ursprünglich
  5. deutschen Dokumentation. Bitte lesen sie diese !
  6.  
  7. For our international users: This is the translation of a german document.
  8. There may be several language problems, because the author isn't a native
  9. speaker (nor writer) of English. It would be very kind, if a native speaker
  10. of the English language could correct all errors and send the doc-Files back
  11. CCWN-Box W. Germany (Phone Number at the end.)
  12.  
  13. 1. CCP (Console Command Processor)
  14. ----------------------------------
  15.  
  16. The CCP is not located within the 64k-adress space of the Z80 (8080). It is
  17. comletely written in 80286-code (runs on V20/V30, NOT on 8086/88) und doesn't
  18. touch the TPA-Region of CP/M at all (except COPY operation on DOS-Versions !).
  19.  
  20. For this reason the emulator has a big TPA of FD00H byte (there are always
  21. 100H bytes used for BDOS, BIOS and Zero-Page.
  22.  
  23. Now follows a description of all CCP commands implemented on the OS/2 Version.
  24. Commands not available in the DOS version are marked. Although this emulator
  25. emulates a CP/M system, all commands are made similar to those available in
  26. OS/2 or DOS for a unique user interface for all command line processors used
  27. on one computer system.
  28.  
  29. The following syntax descriptions use always spaces as separators. But
  30. following the MS-DOS-Convention Tabs, Commas, Semicolon and Linefeeds
  31. (LF = Ctrl + Return) are also valid separators.
  32.  
  33. In the following is used:
  34. d:    =>  Drive letter (f.e. A:)
  35. path  =>  complete path from root like in DOS or OS/2 (max. 63 Characters)
  36. fname =>  File name (8+3 Characters)
  37. names in square brackets [] are optional.
  38.  
  39.  
  40. 1.1 TYPE
  41. --------
  42. usage:    TYPE [d:][path]fname
  43. Shows contents of a file on console. Wildards are not allowed.
  44.  
  45.  
  46. 1.2 COPY
  47. --------
  48. usage:    COPY [d:][path]fname [d:][path]fname
  49.  
  50. Copies one or more files. Wildcards '?' and '*' are allowed. They have the
  51. same meaning as in DOS (or compatibility-box). (Not like in OS/2 1.20 or later)
  52.  
  53. The destination filename must be given. It isn't allowed to use '.' for
  54. filename.
  55.  
  56. Copying from character devices (f.e: COPY CON: file.ext) is available in the
  57. OS/2 Version only.
  58.  
  59.  
  60. 1.3 REN
  61. -------
  62. usage: REN [d:][path]fname [path]fname
  63.  
  64. This command can be used for two purposes. It can be used for renaming a
  65. file or for moving it to another directory.
  66.  
  67. This function depends on the path for the destination file. If a path is used
  68. for the destination filename, the file will be moved to that directory.
  69.  
  70. Examples:
  71. REN *.ASM *.OLD         (rename of multiple files)
  72. REN \WORK\*.TXT *.BAK        (rename of files in another directory)
  73. REN *.ASM \WORK\*.ASM        (move files to another directory (MOVE-Operation))
  74. REN \A.DAT \VERZ\B.DAT        (move and rename a file in a single command)
  75.  
  76.  
  77. 1.4 CLS
  78. -------
  79. usage:    CLS
  80.  
  81. Clear Screen. This is done by an ANSI-Sequence; ANSI.SYS must be installed in
  82. CONFIG.SYS (DOS and comp. box) or ANSI must be enabled (OS/2).
  83.  
  84.  
  85. 1.5 DIR
  86. -------
  87. usage:    DIR [d:][path]fname
  88.  
  89. Show directory. Wildcards are allowed in filename. The use of '.' is allowed.
  90. Control parameters '/w' and '/p' are not yet implemented.
  91.  
  92.  
  93. 1.6 CHDIR / MKDIR / RMDIR
  94. -------------------------
  95. usage:    CHDIR [lw:][path]
  96.     MKDIR [lw:]path
  97.     RMDIR [lw:]path
  98.  
  99. Change of default path, creation or deletion of a directory. The short forms
  100. CD/MD/RD can also be used.
  101.  
  102. CD (CHDIR) without any argument shows the current directory.
  103. CD must be followed by a separator !
  104.  
  105.  
  106. 1.7 ERA/DEL
  107. -----------
  108. usage:    ERA [lw:][path]fname       or
  109.     DEL [lw:][path]fname
  110.  
  111. Erase of one ore more files. Wildcards '?' and '*' are allowed.
  112.  
  113. ATTENTION: There is NO 'Are you sure (Y/N)?'-Question when deleting *.* !!
  114.  
  115.  
  116. 1.8 EXIT
  117. --------
  118. Syntax:  EXIT
  119.  
  120. Return to parent process. This is either COMMAND.COM (in DOS or comp. box)
  121. or CMD.EXE, Session Manager or Presentation Manager (depending on Installation).
  122.  
  123. Errorlevel is always 0. Exits the emulator to dos for another reason
  124. (memory allocation problems or system failure) errorlevel is not zero.
  125.  
  126.  
  127. 1.9 SAVE
  128. --------
  129. usage:    SAVE block [d:][path]fname
  130.  
  131. Saves the memory block from 100H to the file 'fname'. The size of the block
  132. is 256 byte * 'block'. When 'block' exceeds 256 an errormessage will be
  133. printed. For use with non-CP/M-programs the 256 * 'block' can exceed the
  134. TPA-Size. The offset of 100H can't be changed, yet.
  135.  
  136. Attention: 'block' is a decimal number !
  137.  
  138.  
  139. 1.10 RUN
  140. --------
  141. usage:    RUN [lw:][path]fname [loffset [roffset]]
  142.  
  143. This command starts a non-CP/M-program in Z80 (8080) - Mode. The program
  144. will be loaded to 'loffset' and starts execution at 'roffset'.
  145.  
  146. The default value for 'loffset' is 100H, for 'roffset' is it 'loffset'.
  147. (For more information about non-CP/M-programs see Chapter 3.)
  148.  
  149.  
  150. 1.11 SET
  151. --------
  152. usage:    SET [variable=[value]]
  153.  
  154. Environment handling is available in both DOS and OS/2 version. In DOS the
  155. maximum size of environment depends on the size of environment at program
  156. start time.
  157.  
  158. Are there for example 20 characters in the environment when the program is
  159. started, this will be rounded up to full paragraph size (2*16 = 32 > 20).
  160. This does not depend on the program this is a DOS feature !
  161. To avoid environment space shortage there should be allocated enough space
  162. before starting for example by typing this:
  163.  
  164. SET a=00000000000000000000000000000000000000000000000000000000000000000000
  165.  
  166. The environment variable 'a' can be removed after starting the emulator and
  167. there is enough free environment space for use.
  168.  
  169.  
  170. Environment Variables with special meanings in this program:
  171.  
  172. DEBUG=on|off - With Debug on the emulator starts automatically the integrated
  173.            CP/M debugger when an CP/M Program is started. (Default 'off')
  174.  
  175. BREAK=on|off - With Break off Ctrl-C and Ctrl-Break are recognized only during
  176.            that BDOS-CALLS which make Break-Checks according to CP/M-
  177.            documentation. Is Break on, even an endless loop can be broken.
  178.            In Programs that need Cntl-C for internal purpose, like MBASIC,
  179.            this leads to a unwanted jump back to CCP. If you want to send
  180.            Cntl-C to such a program with Break on use Alt-PgDn (Alt-3).
  181.            (Default 'off')
  182.  
  183. ASCII_SIZE=8_bit|7_bit
  184.          - At console output through BIOS and BDOS ASCII-Characters are
  185.            truncated to the given size. (With ASCII_SIZE '7_bit' the 7th
  186.            bit of every character is masked to 0).
  187.  
  188. CCP-PROMPT   - Prompt of CCP. Its the same as 'PROMPT' in OS/2.
  189.            $I is available too.
  190.  
  191. DEB-PROMPT   - Prompt of Z80 debugger. Like above.
  192.            instead of $I use $J here for header line.
  193.  
  194. 1.12 SHELL
  195. ----------
  196. usage:    SHELL [command]
  197.  
  198. This command starts a new command line processor CMD.EXE or COMMAND.COM.
  199. If 'command' is given, this command will be executed. The command 'EXIT'
  200. in COMMAND.COM or CMD.EXE leads back to the emulator.
  201.  
  202.  
  203. 2. Details About CCP
  204. --------------------
  205.  
  206. To start the emulator type
  207.  
  208. CPMZ80 [/C|/K [string]]
  209.  
  210. If there are no arguments, the emulator starts and prompts for command
  211. input. When you want the emulator to do something right after startup,
  212. use the '/K' option and 'string' for the command witch is to be done.
  213. If you use '/C' instead the emulator executes the given command and
  214. returns to OS/2 (DOS respectively) when finished. This option is useful
  215. only if 'string' is a 'submit' (BATCH) file.
  216.  
  217. Examples:
  218.  
  219. CPMZ80 /C MAKE.SUB   - Start of a batch file (SUBmit). This batch might
  220.                call a C compiler, a macro assembler and a linker
  221.                afterwards to build a executable file from a C source.
  222.                It returns to OS/2 or DOS when finished.
  223.  
  224. CPMZ80 /K CPMINIT    - Start of a 'CP/M-Autoexec'. This is useful to set
  225.                the above named environment variables to wanted
  226.                values. A CPMINIT.SUB file could look like this:
  227.  
  228.     SET CCP-PROMPT=($I$P)
  229.     SET DEB-PROMPT=$J->
  230.     SET BREAK=ON
  231.     SET DEBUG=OFF
  232.     CLS
  233.  
  234.  
  235. 3. Z80 Emulation
  236. ----------------
  237.  
  238. This program emulates all documented instructions of the Z80 (8080) with
  239. the following exceptions:
  240.  
  241. All interrupt control instructions are handled as NOPs (EI, DI, ...) The
  242. RETURN instructions from interrupt routines (RETI, RETN) are handled like
  243. siple RETs.
  244.  
  245. All kinds if IN and OUT instructions lead to a TRAP handler and can't be
  246. executed (They can only be skipped by the 'O'-command.)
  247.  
  248. The HALT instruction also leads to a TRAP handler and could be used for
  249. debugging purposes. Its the same for all instructions not documented by
  250. ZILOG (Intel when 8080 is used).
  251.  
  252. For all CP/M programs the normal CP/M conventions are valid:
  253. BDOS-Entry is       CALL 5
  254. WARMBOOT-Entry is  CALL 0
  255.  
  256. Only the routines for direct console I/O can be used from BIOS. DISK I/O
  257. routines would interfere with OS/2 and not CP/M compatible FAT file system.
  258.  
  259. For CP/M programs is the TPA from 100H up to FDFFH (64768 bytes) available.
  260.  
  261. Non-CP/M-Programms:
  262.  
  263. Non-CP/M-Programs are programs using memory locations outside the TPA.
  264. These programs could use all 64k of memory adressable by the Z80.
  265. But if memory outside the TPA is used system calls (most for diagnostics)
  266. have to be made in another way.
  267.  
  268. The Interface to the operating system is an OPCODE not defined by ZILOG.
  269. This is the OPCODE EDEDnn, where nn is a byte which defines the type of
  270. system call. The following function types are available:
  271.  
  272. nn = 0: BDOS
  273. nn = 1: BOSI (special OS/2 services as timer, direct screen access; OS/2 only)
  274. nn = 2: BOOT
  275. nn = 3: WARMBOOT    (identical to BOOT)
  276. nn = 4: CONSTATUS
  277. nn = 5: CONIN
  278. nn = 6: CONOUT
  279. nn = 7: LIST   (dummy operation in this release)
  280. nn = 8: AUXOUT (dummy operation in this release)
  281. nn = 9: AUXIN  (dummy operation in this release)
  282.  
  283. examples for Non-CP/M-Programms
  284.  
  285. BDOS-Calls:
  286. The Registers are exactly as in CP/M BDOS calls. The Call is not CALL 5
  287. but EDED00.
  288.  
  289.     .Z80
  290. START:    LD    E,char        ;load character
  291.     LD    C,2        ;BDOS function: CONSOLE OUTPUT
  292.     DB    0EDH,0EDH,0
  293.     LD    C,0        ;BDOS function: SYSTEM RESET
  294.     DB    0EDH,0EDH,0    ;(back to CCP)
  295.     end    START
  296.  
  297.  
  298.  
  299. BIOS-Calls:
  300. The Registers are exactly as in CP/M BIOS calls.
  301. This program does the same as the above, but with BIOS calls.
  302.  
  303.     .Z80
  304. START:    LD    A,char        ;load character
  305.     DB    0EDH,0EDH,6    ;BIOS funktion CONOUT
  306.     DB    0EDH,0EDH,2    ;BIOS funktion BOOT
  307.     end    START
  308.  
  309.  
  310.  
  311. 4. In Preparation - Next Version
  312. --------------------------------
  313.  
  314. - Handling of OUT/IN instructions
  315. - Online assembler in debugger
  316.  
  317. No software is bug-free. If you find any bug, please report it to us.
  318. We also appreciate ideas for improvement.
  319.  
  320. The Authors
  321.     Klaus Breining; Markus Noller
  322.  
  323.     Reachable as
  324.  
  325.     "Markus Noller"
  326.     in CCWN-Box
  327.     Pin:  "OS/2"
  328.       Phone:  xx49/7151/68434
  329.  
  330. or by German Fido pin "OS2.GER"
  331.