[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: DOS3.3 program in cc65?



"Harry Potter" <rose.joseph12@yahoo.com> wrote:
> I am working on an API for cc65 called ProDOSi.  It basically acts as a 
> device driver/library that allows access to ProDOS services such as the 
> CREATE routine.  Virtually none of it's done, though.  :(

I would have thought cc65 already used ProDOS services. For example, how 
does cc65 do file I/O if it doesn't use ProDOS which I always thought was a 
Disk Operating System (DOS)?  Perhaps I am mistaken...

Aztec C65 provides a create function in its runtime library in the same 
object module as the open function . See below:

creat(name, mode)
char *name;
{
 return open(name, O_WRONLY|O_TRUNC|O_CREAT, mode);
}

Aztec C85's open function then calls ProDOS services. In fact any C Compiler 
that I have used since I began coding in C about 30 years ago provides an 
almost identical open function which calls DOS services on its respective 
target platform.

I would be very surprised if cc65 has no equivalent and I would be even more 
surprised if it provides its own Disk Operating System and ignores ProDOS 
services. I would strongly suggest that you investigate your facts further 
and I do not say so lightly.

To this end,  I would like to leave you with a quote from Ullrich von 
Bassewitz (2009):

"Aztec C and cc65 are vastly different things. One is a retro compiler which 
feels like it did in the good old days. It is admirable how well it does, 
considering how old it is. cc65 is new, actively developed and
feels more like a modern compiler (even if some of the core concepts are 
rather old). The difference is like using the old hardware and using a new 
PC - it's not the same, but that does not mean one is better than the other. 
Many people use cc65 as a playing field, trying what can be done in the 
areas of standards compliance and portable code. So it's mostly about having 
fun:-)"

If I were a cc65 developer, before I began developing an API, I think I 
would become quite intimate with the library source for the compiler and 
learn how to do the simple things first. This is an approach that has always 
worked for me whether I developed in Aztec C or in the many other 
environments that I've had the fun to have worked-in during my professional 
career as a software developer. Then if there are gaps in the runtime, yet 
another API might be worth pursuing. This has generally been a solitary 
apprach on my part, and I believe so should it be in most but the most 
pathetic of cases, in which case generally that individual required some 
type of exit strategy from the business. A great deal of private study is 
always needed, and that is part of the fun. The reading of manuals and 
sources is always necessary, but first one must know a little of the target 
platform.

Your lack of knowledge of the differences between DOS 3.3 and ProDOS 8 in 
general pose your greatest obstacle from what I have seen so far in this 
thread, but again, perhaps I am mistaken.

Good luck with your API or whatever it is you decide to create or not to do.

Bill