Page 1 of 1

A C compiler (to a 32 bit virtual machine running on 6502)

Posted: Fri Jun 21, 2019 11:33 am
by BigEd
This might be of interest - it's a work in progress:
https://github.com/TheEnbyperor/bbc-c#bbc-c
"C compiler for the BBC Micro series of micros"

Includes
  • bbcvm a custom 32-bit x86-like virtual machine for the 6502

Re: A C compiler (to a 32 bit virtual machine running on 650

Posted: Fri Jun 21, 2019 2:15 pm
by BigEd
(This project is a cross-compiler to a VM running on a 6502. It's perfectly worthwhile, but personally, I'm much more interested in a C compiler that runs on the 6502 - even if it targets a virtual machine. It's a harder problem, to be sure. Open source is a must, of course. Even better if the compiler is written in C! But that's not truly important.)

Re: A C compiler (to a 32 bit virtual machine running on 650

Posted: Fri Jul 05, 2019 3:29 pm
by BigEd
(Handyandy reminds us of Hyper C, which has a 32 bit VM, (Edit: oops, no, see below,) mentioned in this earlier compiler thread:
viewtopic.php?f=1&t=4314&start=45
)

Re: A C compiler (to a 32 bit virtual machine running on 650

Posted: Sat Jul 06, 2019 1:35 pm
by handyandy
Hyper C is actually a 16 bit VM for a 6502 or 65c02. It runs on the Apple II family of computers but modifying the source code it can be ported to other platforms and other CPUs like a 65816 in native mode. I'm not sure of modifying it to a 32 bit VM; that might break the tools. It came out before ANSI C so it's like K&R C.

Cheers,
Andy