The WDC C compiler?

Programming the 6502 microprocessor and its relatives in assembly and other languages.
Post Reply
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

The WDC C compiler?

Post by drogon »

Now that it's free, has anyone used the WDC C compiler or compared it to CC65?

http://www.westerndesigncenter.com/wdc/tools.cfm

I've not looked yet as I don't have any MS windows systems to run it under, but a quick look through the manual shows command-line operation (in addition to their IDE), so it might run under DOSBOX - if anyone knows I'd appreciate a heads-up before I give it a go.

Cheers,

-gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: The WDC C compiler?

Post by Chromatix »

A quick look through the manual shows one big advantage over cc65 - it supports floating-point. Relative performance on other operations will have to be tested; it doesn't look like it does any great heroics to optimise the code it produces, though it does allow the programmer to put local variables in zero page using the 'register' keyword.

I get the impression that the tools are designed to be run from their TIDE environment, which is a Windows application. The tools themselves will probably be Windows console programs, not DOS, so should be run from cmd.exe (or MinGW or PowerShell). If you don't have Windows, try WINE.
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: The WDC C compiler?

Post by BillO »

FP is big though. I have had some success running my latest board up to over 19mHz, so ultimate optimization may not be a big problem. If ultimate in space or speed is required, just code the crucial routines in assembler and give 'em a call when you need them.
Bill
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: The WDC C compiler?

Post by BitWise »

There is allegedly a program size limit with the free version but it I think think its fairly generous and can be bypassed by compiling lots of small modules instead of fewer huge ones.

I tried to by a full copy a couple of years ago when the SXB boards came out but its now only available for big corporate users.

A shame really.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
Post Reply