Re:How I learned to program a Commodore 64 in BASIC and comp...
by zozbot234 on Sunday February 26, 2023 @09:21AM
(#34945743)
CC65 is just not a very good compiler by modern standards. There's an experimental 6502 backend for LLVM that outputs fairly good code. (A Z80 backend also exists, AIUI.)
[ Parent
| on HN ]
Re:How I learned to program a Commodore 64 in BASIC and comp...
by AlexeyBrin on Sunday February 26, 2023 @09:51AM
(#34945959)
Do you know if the 6502 LLVM backend has floating point support ? A big problem with CC65 is the lack of floating point support.
EDIT: The answer is no:
https://github.com/llvm-mos/llvm-mos-sdk#notably-missing-fea...
Re:How I learned to program a Commodore 64 in BASIC and comp...
by royjacobs on Sunday February 26, 2023 @10:25AM
(#34946227)
What kind of stuff do you want to do on a 6502 that requires emulated floating point support?
Re:How I learned to program a Commodore 64 in BASIC and comp...
by AlexeyBrin on Sunday February 26, 2023 @10:28AM
(#34946250)
It is nice to have, most BASIC versions that run on 6502 micros had floating point support.
Re:How I learned to program a Commodore 64 in BASIC and comp...
by zozbot234 on Sunday February 26, 2023 @12:03PM
(#34947091)
The "floating point" support that's in 6502 BASIC ROMs is not real IEEE 754 floating point though, see https://en.wikipedia.org/wiki/Microsoft_Binary_Format So it shouldn't be used to replace that, though of course one can use it for other purposes with some care. (It goes without saying that this is not hardware floating point, so the only potential gain from piggybacking on these ROM routines will be some saving in code size.)
Re:How I learned to program a Commodore 64 in BASIC and comp...
by diydsp on Sunday February 26, 2023 @03:05PM
(#34948828)
I wouldnt mind generating lookup tables at run time rather than my present system of exporting them via python etc... the algs could be more dynamic!
Re:How I learned to program a Commodore 64 in BASIC and comp...
by galangalalgol on Sunday February 26, 2023 @10:00AM
(#34946040)
So maybe someday we could do rust for the c64?
Re:How I learned to program a Commodore 64 in BASIC and comp...
by ipaddr on Sunday February 26, 2023 @12:34PM
(#34947394)
The people old enough to want to program on the c64 are not the same group of younger hipster who want to rustify the world. It would take someone to bridge these groups.
Re:How I learned to program a Commodore 64 in BASIC and comp...
by zozbot234 on Sunday February 26, 2023 @12:47PM
(#34947509)
Yup, it's fun to think that the rust_embedded ecosystem could be repurposed with comparable ease to support bare-metal retro programming. Similar to how Rust itself bridges the "low-level C/C++" and "hipster high level language" worlds.
Re:How I learned to program a Commodore 64 in BASIC and comp...
by galangalalgol on Monday February 27, 2023 @07:28PM
(#34964119)
I guess I'm an old hipster that wants to rustify the world? I started on c64 basic as a tiny kid.
Re:How I learned to program a Commodore 64 in BASIC and comp...
by mysterymath on Wednesday March 01, 2023 @01:52AM
(#34979499)