Page 1 of 1
Vbcc (C compiler) proof-of-concept
Posted: Mon Jan 23, 2012 1:17 pm
by Marq
Hi,
I tried to find a working cross-compiler for my QL, but couldn't really find anything except a non-working GCC hack. GCC is so convoluted that I didn't want to spend the rest of my days porting it, but vbcc (
http://www.compilers.de/vbcc.html) seemed to be a lot easier to tweak, and still a real optimizing modern compiler.
My findings can be found here:
http://www.kameli.net/marq/?p=1251. To make a long story short, it works. My solution, done in a day or so, is full of kludges, but with a little more attention, plus QL-specificl libs and headers, it could definitely become a very useful tool. The current hack works enough for me, but I'd be glad if someone took the porting over, eventually even turning it into a real vbcc frontend.
Re: Vbcc (C compiler) proof-of-concept
Posted: Mon Jan 23, 2012 9:42 pm
by robheaton
Nice work there Marq!
Hopefully I'll get some free time during the next week and I'll try out your compiler!
Looks good though!
Re: Vbcc (C compiler) proof-of-concept
Posted: Tue Jan 24, 2012 12:45 am
by RWAP
A Vbcc cross-compiler sounds interesting.
I guess the QDOS-GCC version was a one shot which did not get updated as Linux was improved over the years which is a shame - I wonder if Richard Zidlicky is still lurking somewhere out there...
The other option is surely to use C68 running on a QL emulator, so you only need get the source files across - I guess people prefer the development tools on a Linux or Windows platform nowadays, rather than just using a text editor on a QL

Re: Vbcc (C compiler) proof-of-concept
Posted: Tue Jan 24, 2012 9:15 am
by Marq
RWAP wrote:
The other option is surely to use C68 running on a QL emulator, so you only need get the source files across - I guess people prefer the development tools on a Linux or Windows platform nowadays, rather than just using a text editor on a QL

I have to admit that cross-compiling is productive. Being a Linux user, I've yet to find a good emulator, so my setup consists of a cross-compiler, Arduino, and self-built transfer software for the host, Arduino and the QL. Normal serial transfer should be fine otherwise, but on my configuration it seems really unreliable. Tips on working Linux emus would be most welcome - the old sources I've found can't even be compiled.
Re: Vbcc (C compiler) proof-of-concept
Posted: Tue Jan 24, 2012 12:11 pm
by RWAP
I can't say that I have any experience of using emulators under Linux - I guess it is one of the problems which face any programs released for Linux - basically the authors tend to release them on the GPL license, complete with sources, and then lose interest, leaving it up to someone else to try and pick up the pieces and understand (a) the code and (b) why it doesn't compile on later versions of Linux.
That is why I support commercial software moreso than free software - especially Q-emuLator (for Mac and Windows) and QPC2.
As for serial communication with the QL - this tends to be unreliable at anything more than 4800 baud unless you exchange the 8040 processor for a SuperHERMES which has high speed serial ports.
Re: Vbcc (C compiler) proof-of-concept
Posted: Wed Feb 22, 2012 6:41 pm
by ppe
Whee, another QLer from Finland, I thought I was the only one left

Great job with the cross compiler!
Re: Vbcc (C compiler) proof-of-concept
Posted: Thu Mar 22, 2012 10:01 pm
by Marq
ppe wrote:Whee, another QLer from Finland, I thought I was the only one left

Great job with the cross compiler!
Heh, I'm more of a newbie, but I know a couple of other Finnish guys who have a QL, too, and who might even do something with it.
Re: Vbcc (C compiler) proof-of-concept
Posted: Thu Apr 13, 2023 10:12 pm
by Derek_Stewart
Hi,
Just looking to revive this thread.
I was reading up about VBCC, and did realise that VASM and VLINK are part of the same package.
VASM and VLINK have been updated to have the QL as a target, as part of the FreePascal project.
Would a VBCC output feed straight into the VASM_QL ?