Hello
This is the topic that have probably been touched 1000 times before, but here i am, bringing it up again.
What good C compilers for 816 are there? To be good it needs to work(obviously) and produce efficient enough code(after all we dont have gigabytes of memory space to work with).
I've heard that the WDC compiler is not the best option and also have seen some other compilers that have been either abandoned or dont support 816 fully and/or are heavily targeted towards a specific 6502 system(c64, apple2, nes, etc.) so i am pretty confused what are currently the best options for compilers.
EDIT:
Just to clarify, by "heavily targeted" i meant when a compiler supports 6502 with all the popular target platforms and some (sometimes semi-working) support for 816 on the side
C compilers for 65816
Re: C compilers for 65816
I've a feeling that WDC's offering might be the best option, by being the only one. But it would be good to hear that this is not so.
The '02 is, it seems, not a great match(*) for C. It feels like it should be that the '816 is a better match, but then I'm not an expert on compilers. I have found that the '816 is quite a peculiar beast and takes a bit of getting used to, and I would think it could only be well-targeted by someone who had got to know it quite well.
Perhaps the SNES and the IIGS are the places to look?
(*) Not a terrible match either: the few HP calculators built on 6502-like micros were, I believe, written in C, and were successful enough. If the output of the compiler is good enough, it doesn't matter too much that it's not as good as hand-crafted code. It might help also if the C in question is written with sympathy for the machine it will execute on.
The '02 is, it seems, not a great match(*) for C. It feels like it should be that the '816 is a better match, but then I'm not an expert on compilers. I have found that the '816 is quite a peculiar beast and takes a bit of getting used to, and I would think it could only be well-targeted by someone who had got to know it quite well.
Perhaps the SNES and the IIGS are the places to look?
(*) Not a terrible match either: the few HP calculators built on 6502-like micros were, I believe, written in C, and were successful enough. If the output of the compiler is good enough, it doesn't matter too much that it's not as good as hand-crafted code. It might help also if the C in question is written with sympathy for the machine it will execute on.
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
Re: C compilers for 65816
WDC's 816 compiler generates OK code and unlike the 65C02 compiler does not crash when encountering an error.
The free copy doesn't include the assembler source for the startup module but you can get the code you need from this project.
https://github.com/andrew-jacobs/w65c816sxb-cdemo.
Try to avoid using stdio.h functions if you want a small program.
The free copy doesn't include the assembler source for the startup module but you can get the code you need from this project.
https://github.com/andrew-jacobs/w65c816sxb-cdemo.
Try to avoid using stdio.h functions if you want a small program.
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
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
Re: C compilers for 65816
BitWise wrote:
WDC's 816 compiler generates OK code and unlike the 65C02 compiler does not crash when encountering an error.
The free copy doesn't include the assembler source for the startup module but you can get the code you need from this project.
https://github.com/andrew-jacobs/w65c816sxb-cdemo.
Try to avoid using stdio.h functions if you want a small program.
The free copy doesn't include the assembler source for the startup module but you can get the code you need from this project.
https://github.com/andrew-jacobs/w65c816sxb-cdemo.
Try to avoid using stdio.h functions if you want a small program.
Thanks,
-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/
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
Re: C compilers for 65816
drogon wrote:
BitWise wrote:
WDC's 816 compiler generates OK code and unlike the 65C02 compiler does not crash when encountering an error.
The free copy doesn't include the assembler source for the startup module but you can get the code you need from this project.
https://github.com/andrew-jacobs/w65c816sxb-cdemo.
Try to avoid using stdio.h functions if you want a small program.
The free copy doesn't include the assembler source for the startup module but you can get the code you need from this project.
https://github.com/andrew-jacobs/w65c816sxb-cdemo.
Try to avoid using stdio.h functions if you want a small program.
Thanks,
-Gordon
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
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