<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 06 Dec 1982 20:18:41 PST
From   : Lauren Weinstein <vortex!lauren@Lbl-Unix>
Subject: MARC, etc.

The BDS-C that comes with MARC is a MARC-native version of 
whatever the latest CP/M version happens to be.  I guess right now
we *are* up to 1.5.  Obviously, there are differences between the 
CP/M compiler/linker and the MARC version, since the MARC filesystem
and other facilities allow much more flexibility than Leor had to
work with under CP/M.  The major point of departure between the two
versions (MARC vs. CP/M) comes in the area of libraries.  The MARC
libraries are extremely extensive, and give direct access from C
to all MARC system calls, including all the more "esoteric" ones
such as "stat", "gtty", etc.  Time conversion routines are also
included, and automatically handle niceties such as daylight
savings time, etc., as appropriate.  (MARC keeps the time internally
exactly the same way as Unix, as the number of seconds since Jan 1 1970 GMT).
I have purposely discouraged any Z-80-only libraries, since I've learned
that (somewhat to my surprise) there are still lots of people with 8080's
and 8085's.  As I said before, the benefits are not worth the hassles
of trying to maintain two sets of libraries, and I refuse to leave my
old 8080 supporters out in the cold!  Note that the stdio library under
MARC is even more extensive than under CP/M, and (as far as I can tell!)
it exactly follows K&R for all supported functions, e.g.:

#include <stdio.h>

FILE *infile;

if ((infile = fopen("/etc/passwd", "r")) == NULL)
{  fprintf(stderr, "Can't open the password file!\n");
   exit(-1);
}

does exactly what you would expect; no more of the CP/M kludges for file
I/O.  Also note that the old DIO library is no longer needed, since
MARC handles such features at the shell/exec level.  By the way,
argv[0] (command name) is available under MARC, which turns out to
be pretty handy!  (Some commands in MARC are simply links to the same
file that are called by different names -- depending on the name used, the
program acts in different manners.)

As for the CP/M emulator, I use it as little as possible, and I rarely ever
NEED to use it.  Most of my work is in BDS-C, and I long ago ported all
of my BDS-C programs over to MARC -- it's mainly a job of pulling unneeded
code and libraries OUT, since the MARC versions almost universally turn
out to be smaller and much more similiar to Unix C.  Many of the programs
I write these days are almost fully portable between MARC and Unix.
I mostly use the emulator for testing (things like MAC, WORDMASTER,
M80, L80, etc.) but I never really "use" those things -- BDS-C and
MINCE are the primary tools in my operation.  Oh yeah, I use the emulator
for playing an old Sargon chess game, and some of my dialup users play
a few old BASIC games under the emulator.

My hope is that most people will wean themselves away from CP/M programs
as rapidly as possible.  Since CP/M programs have such a limited idea
of filenames, even the most simple programs can become much more
flexible if ported over to native-MARC operation.  Still, the emulator
is there for those who need it.

--Lauren--

P.S.  In my experience, I've found that the vast majority of public
domain CP/M programs I've collected have been utilities to try correct
"defects" or fundamental limitations in CP/M.  Frankly, under MARC, 
virtually none of those sorts of programs should be needed...

--LW--
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>