Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site faron.UUCP Path: utzoo!linus!faron!kbb From: kbb@faron.UUCP (Kenneth B. Bass) Newsgroups: net.micro Subject: Re: Converting 8080/z80 to C? Message-ID: <366@faron.UUCP> Date: Fri, 18-Oct-85 10:06:04 EDT Article-I.D.: faron.366 Posted: Fri Oct 18 10:06:04 1985 Date-Received: Sat, 19-Oct-85 07:09:33 EDT References: <1864@brl-tgr.ARPA> <1994@hcrvax.UUCP> Reply-To: kbb@faron.UUCP (Kenneth B. Bass) Organization: The MITRE Coporation, Bedford, MA Lines: 32 Summary: CPM compatible interface in MSDOS In article <1994@hcrvax.UUCP> petera@hcrvax.UUCP (Smith) writes: > > I suppose that a >CPM to MSDOS translator could be written for well behaved programs but >it would be a bit tricky to get correct. The format of file names, info >that goes into FCB's etc. would all cause real headaches. So: Well behaved >Z80/8080 to C using say single character I/O and simple file I/O would >be quite possible but any fancy programs that do things like modify their >own code (like an 8080 16 bit multiply may do) would not work. > > Peter Ashwood-Smith > Human Computing Resources, > Toronto, Ontario. One of the original design features of MS-DOS (all versions) was a CPM compatible interface. Compare CPM function calls and lower DOS functions. Also, DOS functions can be invoked via a call to 0005h, same as CPM. This feature was really intended for CPM programs in 8080 code that were converted to 8086 code; only a direct conversion of object code was needed. As for format of file names, FCB info etc., if the original program was 100% CPM compatible, then there would be no translation problem, since CPM file names, FCB's, etc. are all subsets of DOS, and most of the fancy stuff is done internal to DOS. BTW, in it's DOS 2.10 Technical Reference Manual, Microsoft recommends that use of this feature not be used, hinting perhaps that in later versions it will not be supported at all.... "It ain't necessarily so" ken bass linus!faron!kbb