CPCWiki forum

General Category => Programming => Topic started by: nitrofurano on 15:10, 31 October 13

Title: Boriel's ZX-Basic Compiler
Post by: nitrofurano on 15:10, 31 October 13
hi everyone!

Probably most of you are aware of Boriel's ZX-Basic Compiler, and how easy and efficient it is for creating stuff for ZX-Spectrum.

Since around 1 year ago, i were starting to "patch" this cross-compiler for creating stuff for MSX, Mattel-Aquarius, MC-1000 (a brazilian GEM-1000/Charlemagne clone, it's like a TRS-ColorComputer with Z80 instead of 6809), Philips-VG5000, etc. ( retrocoding (http://nitrofurano.altervista.org/retrocoding/) )


So, i imagine that creating stuff for Amstrad-CPC would be as simple as possible as well? the problem is i don't know where or how to start, like snippets in assembly that i could try to compile and patch from Boriel's ZX-Basic Compiler, how memory, i/o ports and bios address calls are arranged for being accessed from the custom libraries, how to create snapshots or tape images from a cross-compiler (or documentation about), etc.

Any feedback about this would be excellent, because i imagine that such awesome cross-compiler like Boriel's ZX-Basic Compiler is probably really missing for Amstrad! ;)

Thanks and cheers!
Title: Re: Boriel's ZX-Basic Compiler
Post by: AMSDOS on 09:12, 03 November 13
Never heard of the program

You may want to check this site out (http://cpctech.org.uk/), followed by this site (http://cpcwiki.eu/index.php/Main_Page), I'm not sure what you're running it on, PC I presume, this page (http://www.cpcwiki.eu/index.php/BIOS_Overall_Memory_Map) has a outline of the Amstrad Memory Map and you'll probably want to have a look at the Firmware Guide (http://www.cpctech.org.uk/docs/firmware.pdf), apart from that, that's about all I know.  ;D
Title: Re: Boriel's ZX-Basic Compiler
Post by: Sykobee (Briggsy) on 18:31, 04 November 13
I think it's a PC based BASIC compiler for ZX BASIC that generates ZX binaries?  Ah yes, Python.
boriel.com » The ZX Basic Compiler (http://www.boriel.com/software/the-zx-basic-compiler/?lang=en)
It also enhances the language somewhat with more primitive types.


The CPC equivalent would be a PC based Locomotive BASIC compiler, I guess.  Something like Laser Basic on the CPC, but quicker and supporting more of the language.


But at some point, why bother with BASIC at all, and its limitations? I guess that it's kinda old-school to use it?
Title: Re: Boriel's ZX-Basic Compiler
Post by: AMSDOS on 06:52, 05 November 13
Quote from: Sykobee (Briggsy) on 18:31, 04 November 13
I think it's a PC based BASIC compiler for ZX BASIC that generates ZX binaries?  Ah yes, Python.
boriel.com » The ZX Basic Compiler (http://www.boriel.com/software/the-zx-basic-compiler/?lang=en)
It also enhances the language somewhat with more primitive types.


The CPC equivalent would be a PC based Locomotive BASIC compiler, I guess.  Something like Laser Basic on the CPC, but quicker and supporting more of the language.


But at some point, why bother with BASIC at all, and its limitations? I guess that it's kinda old-school to use it?

I was interpreting the original poster as looking to making it possible for their cross-compiler to reproduce ZX BASIC code compatible for our system, presumably as Assembly, though I suppose it could include another compilable language?

I'd call it an equivalent of our CPC BASIC 3, even though it's not 100% Compatible with Locomotive BASIC.
Title: Re: Boriel's ZX-Basic Compiler
Post by: AMSDOS on 10:39, 14 December 13
Quote from: Sykobee (Briggsy) on 18:31, 04 November 13

But at some point, why bother with BASIC at all, and its limitations? I guess that it's kinda old-school to use it?

The problem I see there is magazines refused to publish programs which would reveal BASICs limitations.

Ok BASIC may not be the most readable language, perhaps on par with C if written well or look like Dog's Droppings if not, though by defining some routine which shows process I think can aid in writing something to assembly. Theoretically Pseudocode maybe more suited, though a routine still has to be written to some computer language, which just sounds like double-handling.  :P
Title: Re: Boriel's ZX-Basic Compiler
Post by: Gryzor on 19:41, 17 December 13
Quotemagazines refused to publish programs which would reveal BASICs limitations.

What does that mean?
Title: Re: Boriel's ZX-Basic Compiler
Post by: TotO on 20:44, 17 December 13
I have read: "Boring ZX-Basic Compiler".  ???
Title: Re: Boriel's ZX-Basic Compiler
Post by: AMSDOS on 08:30, 18 December 13
Quote from: Gryzor on 19:41, 17 December 13
What does that mean?

I simply meant the magazines I used to get tend to use good examples of BASIC programs, not that that's a bad thing, I'm just saying that if they had some article explaining the process of something using BASIC, it could be improved using Compiled.

I don't know, maybe a bad idea.  ;D

Powered by SMFPacks Menu Editor Mod