[6809] what about Boriel's ZX-Basic Compiler beyond Z80?

Cette catégorie traite de développements récents destinés à nos vieilles machines, applications, jeux ou démos... Amis programmeurs, c'est ici que vous pourrez enfin devenir célèbres!

Modérateurs : Papy.G, fneck, Carl

Avatar de l’utilisateur
nitrofurano
Messages : 95
Inscription : 26 juil. 2013 15:30
Localisation : Porto
Contact :

[6809] what about Boriel's ZX-Basic Compiler beyond Z80?

Message par nitrofurano »

i don't know if some of you analysed the sources (in Python) of Boriel's ZX-Basic Compiler - one part of this cross compiler converts Basic into Z80-assembly, and the other part compiles the Z80-assembly.
I imagine that some parts of it, like z80.py can be recoded into, let's say, 6809.py, and so we later will be able to code on Boriel's ZX-Basic Compiler for MO and TO?
Be welcome sharing your thoughts, i'm really curious! :)
__sam__
Messages : 7970
Inscription : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: [6809] what about Boriel's ZX-Basic Compiler beyond Z80?

Message par __sam__ »

It seem to be a nice project.

I've read across the source files, especially z80.py __16bits.py, __32bits.py and optimizer.py to get a feeling of how it works. It seem to me that this basic is clearly written with z80 in mind. I mean: there are a lot of places where direct call to z80's register and assembly instructions are used. It doesn't work on an abstraction of the target CPU. I'm not quite sure it'll be easy to make it work with the 6809 target in mind without rewriting almost all of it.

However, it can serve as a skeletton. One only have to replace Z80 ASM and register logics with 6809's ones. It can be verry interresting to see if z80 optimisations done in optimizer.py can easily map onto 6809.

I must admit that having a basic with the same capabilities: 8, 16, 32 bits signed/unsigned integer values, fixed point values, "hi-precision" floating point (5 bytes), Strings up to 65536 chars, multi-line ifs, procedures, etc. would be a very nice thing to have on the Thomsons.

It reminds me of the pseudo clone of the GFA basic I once did for the thomson machine. It was mainly a basic to basic converter that allowed me to write complex programs (raytracers, automatic derivative, and other cool stuff) in a readable and maintainable way.

By the way, speaking of writing a raytacer reminds me of this Video I dicovered recently:
Samuel.
A500 Vampire V2+ ^8^, A1200 (030@50mhz/fpu/64mb/cf 8go),
A500 GVP530(MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.Démos
Répondre