Re: C source to access DOS disks under CP/M



Anonymous Guy entertained us with this wisdom:
On 2005-07-23  Tom Anderson said:

   > I found this in a zip file named cc04.zip. I don't recall where
   > I got it. I attempted to compile it under Aztec C 3.2 for CPM/86,
   > and got an undefined symbol error. The Aztec linker failed to
   > generate a CMD file. I then tried DR-C. The source compiled into
   > an OBJ file. Link86 generated a CMD file but also undefined symbol
   > messages. The CMD file will execute under CP/M-86, but fails to
   > access the disk drives.
   >
   > I am no programmer, but maybe someone who is would like to look
   > at this C source, and see if they can get it to run properly.
   >
   > Here it is: RDMSDOS.C
   >
   > /*
   > This program reads/writes MS-DOS formatted disks, using the CPM
   > bios routines.  The data is converted to/from C (non-ascii) files.
   > The code is written so that it can be compiled with Small-C, but
   > uses K&R standard I/O whenever possible.            ^^^^^^^
          ^^^^^^^^^^^^
There's your first clue, son.  Looks like you might have
used the wrong C compilers.

   > Author: Bob Alverson
   > Cincinnati, OH  45231
   > 1.1  9 DEC 83 Add ability to read all four IBM formats

In this case, "all four IBM formats" means:

   5.25-inch SS/DD, 8 sectors/track
   5.25-inch SS/DD, 9 sectors/track
   5.25-inch DS/DD, 8 sectors/track
   5.25-inch DS/DD, 9 sectors/track

Still, the program could definitely be useful under CP/M-86,
if it could be made to compile properly.

Steve Dubrovich?  Richard Brady?  John Elliot?  Anyone...???



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

A cursory glance suggests the getnam function is ill-formed. It's evaluated as a logical in the first while statement in main() yet it returns a pointer. This may work under some compilers but may not work in others.


I reserve the right to be wrong. I am not a C programmer. I consider C a disease. But I've been known to make an occasionaly c program work.

The other Richard
Mr. A. Guy:  let sleeping dogs lie   :-)
.



Relevant Pages

  • Re: COBOL Program Editor
    ... Now if I write a CMD file, I have to hardcode all the filenames into it. ... I am looking for a free COBOL IDE. ... I am looking for an editor on Windows which could compile and link multiple programs at a time. ...
    (comp.lang.cobol)
  • C source to access DOS disks under CP/M
    ... I attempted to compile it under Aztec C 3.2 for CPM/86, ... The Aztec linker failed to generate a CMD file. ... readsec(trk, sec, buf) ...
    (comp.os.cpm)
  • Re: C source to access DOS disks under CP/M
    ... > I attempted to compile it under Aztec C 3.2 for CPM/86, ... The Aztec linker failed to generate a CMD file. ... > This program reads/writes MS-DOS formatted disks, ...
    (comp.os.cpm)
  • Re: C-programmer needs Forth advice
    ... I have no idea what your "guarantee compile order" ... the clueless programmer would scratch their head and actually *read* the code and understand the conventions being used. ... top of each of the functions that is called, set a breakpoint, and set one at the end. ... Your comment about not having source code and third-party functions also doesn't make sense. ...
    (comp.lang.forth)
  • Re: Cobol: Maximum number of FD Statements
    ... Subject: Cobol: Maximum number of FD Statements ... Programmer Analyst | Programmeur-analyste ... Human Resources and Skills Development Canada | Ressources humaines et ... Sounds more like a compiler problem than a compile problem. ...
    (bit.listserv.ibm-main)