You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

132 lines
4.8 KiB

<html><head><title>zx CP/M Command Line Emulator</title></head><body>
<h1>zx CP/M Command Line Emulator</h1>
<p><em>zx</em> allows execution of CP/M 2.2 and 3.X application from a
Windows command line. It is compatible with Windows XP and greater (both
32 and 64 bit).</p>
<p><em>zx</em> is basically a port of a subset of the zxcc program by John Elliott.
The GPLv2 licensing carries forward. Please refer to the
<a href="http://http://www.seasip.info/Unix/Zxcc/">
zxcc web page</a> for more information.</p>
<p>While the original zxcc package was generally intended to allow
execution of the Hi-Tech C CP/M compiler under Unix, <em>zx</em> is slightly
more general and intended to allow running most CP/M tools. Specific
changes were incorporated to improve interactice console operation of
CP/M applications. Additionally, Curt Mayer added case insensitivity
for filenames under Unix variants.</p>
<h2>Setup</h2>
<p>The <em>zx</em> application (zx.exe) may be copied to any directory for execution.
The bios.bin file must be copied to the same directory. For ease of use,
you will probably want the directory to part of your PATH environment
variable so that you can run the tool from any location.</p>
<p>You will also need the CP/M applications that you want to run.
<em>zx</em> will load files fromthe current directory or one of the following
directories based on file type. Any of the following environment
variables may be defined to determine where <em>zx</em> searches for the
respective file types:</p>
<ul>
<li><strong>ZXBINDIR</strong> may contain a single path which will
be searched for executable files (usually *.com)</li>
<li><strong>ZXLIBDIR</strong> may contain a single path which will
be search for library files (usually *.lib)</li>
<li><strong>ZXINCDIR</strong> may contain a single path which will
be searched for include files (usually *.inc)</li>
</ul>
<h2>Usage</h2>
<p>In general CP/M applications are executed by prefixing the CP/M command
line with "zx". So for example, you could assemble a test.asm using
rmac with a command line like:</p>
<blockquote><tt>zx rmac hello</tt></blockquote>
<p>In this case, rmac.com would need to be in the directory specified by
environment variable ZXBINDIR or in the current directory. Also,
hello.asm would need to be in the current directory.</p>
<h3>Filenames</h3>
<p>Where you would normally enter a CP/M filename you instead enter
a Windows filename. Note that you will need to use a forward slash
instead of the traditional backslash as a directory separator. The
filename itself (as opposed to any directories in
its path) must obey CP/M 8.3 naming conventions.</p>
<p>Where the documentation requires a CP/M drive letter/user number
you should enter a path complete with trailing slash, for example:</p>
<blockquote><tt>-I/usr/src/linux-80/include/</tt></blockquote>
<h2>Technical</h2>
<p><em>zx</em> emulates a subset of CP/M 3; hopefully enough to run the
most CP/M tools. It can be used as a limited general-purpose CP/M 3
emulator provided the emulated program only uses a common subset of
system calls.</p>
<p>Syntax for <em>zx</em> is:</p>
<blockquote>
<tt>zx <i>comfile.com</i> arg1 arg2 ...</tt>
</blockquote>
<p>The comfile is the program to run; <em>zx</em> searches the current
directory and <strong>ZXBINDIR</strong> for it.</p>
<p>The arguments are parsed in this way:</p>
<ul>
<li>Any argument starting with a - sign is passed to the CP/M program as-is,
minus the leading - sign.
<li>Any argument starting with a + sign is parsed as a filename (see below)
and then concatenated to the previous argument.
<li>Any argument starting "+-" is concatenated without being parsed.
<li>All other arguments are parsed as filenames. The path is
converted to a CP/M driveletter.
</ul>
<p>For example:
<blockquote>
<tt>zx foo.com --Q -A /src/main --I +/src/sub +-, +/foo/bar</tt>
</blockquote>
<p>would pass these arguments to foo.com:</p>
<blockquote>
<tt>-Q A d:main -Id:sub,e:bar</tt>
</blockquote>
<p>The other programs are merely wrappers that convert their command lines
into the form required by <em>zx</em>.</p>
<h2>Errors</h2>
<p>Any errors raised by the <em>zx</em> runtime system will be prefixed
with <tt>zx:</tt>. Some errors you may encounter are:</p>
<dl>
<dt>Unsupported BDOS call</dt>
<dd>Part of CP/M 3 that the program uses has not been emulated. Add the
required functionality to zxbdos.c and recompile.</dd>
<dt>Z80 encountered invalid trap</dt>
<dd>The CP/M program being run attempted to call the <em>zx</em> runtime
system with an unknown call number.</dd>
</dl>
<h2>Acknowledgements</h2>
<ul>
<li>zxcc was written by John Elliott</li>
<li>Hi-Tech C was written by Hi-Tech Software.</li>
<li>The Z80 emulation engine was written by Ian Collier.</li>
<li>Thanks to Jacob Nevins, Andy Parkins and others for bug fix suggestions.</li>
</ul>
</body>
</html>