After trying to extend Boriel’s ZX-Basic Compiler to other z80-based hardware, like game consoles, other home computers, and some arcade machines, finally i tried to start to target ZX81 from it: http://www.boriel.com/wiki/en/index.php ... ams_-_ZX81
And since i think there are no cross-compilers of basic language for zx81, i guess this one might be useful for some people here, like me?
I actually tried to start from some assembly examples posted here in this forum, but i really don't know what i might be doing wrong there for not acquiring an expected result - perhaps i'm misaccessing the stack and whole ram area (specially when Boriel’s ZX-Basic Compiler uses ix register a lot for functions and routines)? perhaps misusing the bios routines?
each and any help would be amazing there, and thanks a lot in advance!
first attempt using Boriel’s ZX-Basic Compiler
- nitrofurano
- Posts: 24
- Joined: Fri May 09, 2014 5:18 pm
- Contact:
Re: first attempt using Boriel’s ZX-Basic Compiler
What should someone answer with just a screenshot but no data/source/binary ?
What do you want to program exactly ?
BASIC, Assembler ?
You could try the IDE here, allowing BASIC and Assembly and offering a simple framework (ZX81DEMO.ASM).
viewtopic.php?f=6&t=1064
Boriels site state that ZX BASIC is for ZX Spectrum which is much different to a ZX81.
What do you want to program exactly ?
BASIC, Assembler ?
You could try the IDE here, allowing BASIC and Assembly and offering a simple framework (ZX81DEMO.ASM).
viewtopic.php?f=6&t=1064
Boriels site state that ZX BASIC is for ZX Spectrum which is much different to a ZX81.
Re: first attempt using Boriel’s ZX-Basic Compiler
Especially as IX and IY registers are out of bounds for casual code. In order to use these registers special care must be taken, care which extends to writing your own display routines
Re: first attempt using Boriel’s ZX-Basic Compiler
And also the alternative af pair, which is also used for display generation, i often wonder if the rom could be made smaller/faster if these restrictions on register usage were not present...
Regards Andy
Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
-
- Posts: 327
- Joined: Sat Sep 27, 2014 8:02 pm
- Location: Stockholm, Sweden
Re: first attempt using Boriel’s ZX-Basic Compiler
Andy I think that having the possibility to choose between integers and floats could speed up most BASIC programs considerably.
/Adam
Re: first attempt using Boriel’s ZX-Basic Compiler
I think that the FP calculator approach (probably coming from the real Sinclair calculator) is the biggest space saver.
This together with a clever RST mapping and reusing the memory management routines squeezed the code incredibly.
The other BASIC implementations smaller than 4K I could see (the Microsoft's 4K one od the Dunfield's 3K BASIC dialect for the 8085 computer) are much, much, weaker.
[EDIT] Wow, what a mistake ..actually the zx81 ROM is 8k !
This together with a clever RST mapping and reusing the memory management routines squeezed the code incredibly.
The other BASIC implementations smaller than 4K I could see (the Microsoft's 4K one od the Dunfield's 3K BASIC dialect for the 8085 computer) are much, much, weaker.
[EDIT] Wow, what a mistake ..actually the zx81 ROM is 8k !
- nitrofurano
- Posts: 24
- Joined: Fri May 09, 2014 5:18 pm
- Contact:
Re: first attempt using Boriel’s ZX-Basic Compiler
both, as you see from http://www.boriel.com/wiki/en/index.php ... R_HARDWARE - you can have inlline assembly in the basic code, generate assembly from basic, compile to binary, etc.PokeMon wrote:What should someone answer with just a screenshot but no data/source/binary ?
What do you want to program exactly ?
BASIC, Assembler ?
see the non-zxspectrum machines i used Boriles at http://www.boriel.com/wiki/en/index.php ... R_HARDWARE - even arcade machines! - the 2 game entries i submitted to the last Karoshi's MSXDev for msx1 were made on Boriels, and i made ports to colecovision and sega sg1000 from it simultaneouslyYou could try the IDE here, allowing BASIC and Assembly and offering a simple framework (ZX81DEMO.ASM).
viewtopic.php?f=6&t=1064
Boriels site state that ZX BASIC is for ZX Spectrum which is much different to a ZX81.
so i guess that, somehow, i can create .p files from Boriels as simply as i can for these machines since they are z80-based as well?
i can imagine it's not that impossible that, if we can code something for zx81 via Pasmo, we also can via Boriels
- nitrofurano
- Posts: 24
- Joined: Fri May 09, 2014 5:18 pm
- Contact:
Re: first attempt using Boriel’s ZX-Basic Compiler
would be great if there were some examples compilable via Pasmo or any other cross-assembler that runs fine on gnu/linux - and i'm not that comfortable with ides, i prefer using terminal with text editor combined - i believe that i can adapt Pasmo .asm examples into Boriels, and then starting to have some progressions like adding some libraries - using rom routines would be great (i'm actually concerned about zx80/zx81/clones differences, and the ix/iy/stack issue often used on Boriels' functions/routines)