WDC02CC Compiler
Re: WDC02CC Compiler
Thanks. No trace of WDC's compiler there... I think that the fact that it hasn't been got to work leaves it out of the comparison.
I read something about floating point here.
For some reason I want the people to be able to run this WDC C compiler. The comparison leaves CC65 as the one to be chosen because it's the one that works, having speed and code size against it.
I read something about floating point here.
For some reason I want the people to be able to run this WDC C compiler. The comparison leaves CC65 as the one to be chosen because it's the one that works, having speed and code size against it.
Re: WDC02CC Compiler
tokafondo wrote:
Thanks. No trace of WDC's compiler there... I think that the fact that it hasn't been got to work leaves it out of the comparison.
I read something about floating point here.
For some reason I want the people to be able to run this WDC C compiler. The comparison leaves CC65 as the one to be chosen because it's the one that works, having speed and code size against it.
I read something about floating point here.
For some reason I want the people to be able to run this WDC C compiler. The comparison leaves CC65 as the one to be chosen because it's the one that works, having speed and code size against it.
Personally, I am not interested in the WDC C compiler - mostly because it won't run natively under Linux and I don't feel I need it enough to bother with WINE, DOSBox or whatever just to run it. That may sound somewhat churlish, but really - if WDC want me to use it then they can make it easy for me to use because my time is precious to me and spending hours/days (as some have) just trying to get some code to work via it is not what I want to do.
So if/when I next need C I'll be using cc65 - because it works, and I was easily able to configure it for my systems (even though there is scant documentation on how to do that - and it's not just a matter of a new .cfg file - you need to alter the sources...)
As for floating point - I started to write my own IEEE compliant code and stopped and used my ATmega "co processor" to do the hard work for me (for my BCPL system - BBC Basic has excellent and faster floating point written in 65C02) There is an Apple FP library but I do not think they have ever published the sources (and I'm not referring to the Woz ones, but a separate library known as S.A.N.E.)
But... If someone can put together a rock-solid tutorial on the WDC C compiler to run under Linux from a Makefile, then I'll certainly take a look.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: WDC02CC Compiler
drogon wrote:
Who are "the people"?
drogon wrote:
(and I'm not referring to the Woz ones, but a separate library known as S.A.N.E.)
SANE _is_ IEEE-754/854, using single, double and extended precision (4, 8 and 10 bytes respectively). The SANE library was available for 8-bit Apple II models (used by AppleWorks, for example), and is part of the toolbox for the Apple IIgs and Macintosh. (my italics)
I don't know if the Apple IIgs toolbox is available for download, though. All I can find are books about it, but not it. Also, I don't know if the toolbox includes sources or binaries.
drogon wrote:
But... If someone can put together a rock-solid tutorial on the WDC C compiler to run under Linux from a Makefile, then I'll certainly take a look.
Re: WDC02CC Compiler
It looks to me like the IIgs Toolbox is a part of the ROM. I think the various ROM versions can be found to download as binaries (they are needed to emulate the iigs) but I didn't have any luck finding a disassembly.
Re: WDC02CC Compiler
BigEd wrote:
It looks to me like the IIgs Toolbox is a part of the ROM. I think the various ROM versions can be found to download as binaries (they are needed to emulate the iigs) but I didn't have any luck finding a disassembly.
Inside the file there, there ise this IIGS.601.SRC/GSToolbox/SANE/ folder...
- elems.asm
- elems.macros
- sane.asm
- sane.macros
Last edited by tokafondo on Tue Apr 20, 2021 1:48 pm, edited 1 time in total.
Re: WDC02CC Compiler
drogon wrote:
But... If someone can put together a rock-solid tutorial on the WDC C compiler to run under Linux from a Makefile, then I'll certainly take a look.
This makes having to go to WDC's website, give them your email address, and wait to receive a *limited-use download link* really unappealing.
Re: WDC02CC Compiler
Well... They ask you not to disassemble the binaries, and not use them for commercial products that would run 65xx code in a chip provided by anyone else apart WDC themselves.
I can see that as a fair petition.
I can see that as a fair petition.
Re: WDC02CC Compiler
tokafondo wrote:
Thanks. No trace of WDC's compiler there... I think that the fact that it hasn't been got to work leaves it out of the comparison.
I read something about floating point here.
For some reason I want the people to be able to run this WDC C compiler. The comparison leaves CC65 as the one to be chosen because it's the one that works, having speed and code size against it.
I read something about floating point here.
For some reason I want the people to be able to run this WDC C compiler. The comparison leaves CC65 as the one to be chosen because it's the one that works, having speed and code size against it.
Code: Select all
MEMORY
{
...
ram: org=0x0300, len=0x0500
}
SECTIONS
{
...
data: {*(data)} >ram AT>out
...
bss (NOLOAD): {*(bss)} >ram
...
}
When I tried to add a timer variable to measure run-time on the C64, the code did not compile anymore on cc65, because it exceeded the 256 byte limitation of cc65. Apparently the test was exactly tailored to cc65's limitations whereas the vbcc result was basically sabotaged. It is obviously not an unbiased comparison but rather the author started with code for cc65 and did no further investigations when the code did not work with a compiler he personally dislikes (whereas for gcc which apparently generated actually broken code he even went out of his way to fix the assembly code by hand). Using this approach your daily-use compiler will of course tend to look more stable. That does not really say much.
As I wrote above, I am the author of the compiler that the author of this comparison hates, so obviously I am not unbiased as well. When I checked his article, I did not write anything and I did not really want to get involved (and write lengthy posts like this one). However, if people point to this blog, I have to say that after what I have checked so far, it is my firm (and as my findings hopefully show mostly fact-based) opinion that this comparison is much too flawed to base a compiler decision on.
I did not spend much time with this article (mainly wanted to check if there was a bug in my compiler) and only limited time with other 6502 compilers. So I will not comment on the stability of the different compilers. I just can say do not use this article to base your decisions on. It is in no way a fair comparison.
Re: WDC02CC Compiler
Interesting, thanks. Just to note, the idea of a 256 byte limit in cc65 was new to me, but a search turns up this:
"There are some limitation on the size of local variables. Not all operations are available if the size of local variables exceeds 256 bytes."
(It's easy to imagine how that might have happened.)
"There are some limitation on the size of local variables. Not all operations are available if the size of local variables exceeds 256 bytes."
(It's easy to imagine how that might have happened.)
Re: WDC02CC Compiler
drogon wrote:
There is an Apple FP library but I do not think they have ever published the sources (and I'm not referring to the Woz ones, but a separate library known as S.A.N.E.)
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: WDC02CC Compiler
vbc wrote:
... Of course that probably says more on the speed of the wozfp routines which shine when it comes to memory usage.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
Re: WDC02CC Compiler
What would be a fair set of tests that could be created to make a comparison between 65xx C compilers?
Or FP libraries, regarding code size or calculation speeds?
Or FP libraries, regarding code size or calculation speeds?
Re: WDC02CC Compiler
BigEd wrote:
Interesting, thanks. Just to note, the idea of a 256 byte limit in cc65 was new to me, but a search turns up this:
"There are some limitation on the size of local variables. Not all operations are available if the size of local variables exceeds 256 bytes."
(It's easy to imagine how that might have happened.)
"There are some limitation on the size of local variables. Not all operations are available if the size of local variables exceeds 256 bytes."
(It's easy to imagine how that might have happened.)
Re: WDC02CC Compiler
tokafondo wrote:
What would be a fair set of tests that could be created to make a comparison between 65xx C compilers?
As always, pointing out flaws is much easier than creating a flawless comparison.
Quote:
Or FP libraries, regarding code size or calculation speeds?
Re: WDC02CC Compiler
vbc wrote:
tokafondo wrote:
What would be a fair set of tests that could be created to make a comparison between 65xx C compilers?