Page 1 of 1

[8bits Z80 4Mhz] Porting on extra low-tech hardware.

Posted: Thu Nov 25, 2021 8:32 am
by unidual
Bonjour, noob here, but [Z80 connaisseur](http://orgams.wikidot.com/)!

I'd like to port a lightweight language to a Z80-based computer older than you (the Amstrad CPC 6128), and to CP/M as well if there is interest.
* Sub-goal: porting a vm.
* Main-goal: having the whole toolchain on the native machine (no cross-compilation)
More context [here](https://www.pouet.net/topic.php?which=1 ... =1#c571455).

MicroPython is a pretty interesting candidate.

My first questions are:
- Is there already related work for such low requirement hardware? PicoPython? My google-fu wasn't strong enough.
- Is anyone interested to work on that with me? (I'm an outgoing introvert, according to my dog).

Cheers!

Re: [8bits Z80 4Mhz] Porting on extra low-tech hardware.

Posted: Thu Nov 25, 2021 10:04 am
by pythoncoder
unidual wrote:
Thu Nov 25, 2021 8:32 am
...
I'd like to port a lightweight language to a Z80-based computer older than you (the Amstrad CPC 6128), and to CP/M as well if there is interest...
Not older than me. I was programming micros before the Z80 was invented ;)

Porting MP to an 8-bit arch would be a substantial task, and I'm not aware of anyone attempting this. There is a pic16bit port which you might like to study to see what might be involved.

Re: [8bits Z80 4Mhz] Porting on extra low-tech hardware.

Posted: Thu Nov 25, 2021 10:06 am
by yeti
I don't think MicroPython can fit there. Have a look at Snek instead.

The compilers (T)ACK or/and Cowgol could be small enough to run natively on a Z80.

Re: [8bits Z80 4Mhz] Porting on extra low-tech hardware.

Posted: Thu Nov 25, 2021 6:55 pm
by scruss
Even the best Z80 cross-compilers are only C89-ish, so it would be essentially a rewrite. Seconding Snek: it's nothing like MicroPython, but it's small (or possibly even smol).

Also, the Amstrad CPC's got a really small contiguous memory space for a 64 K machine. The bank-switching on the 6128 is very granular, and fitting anything around that would be a nightmare.

Re: [8bits Z80 4Mhz] Porting on extra low-tech hardware.

Posted: Fri Nov 26, 2021 4:01 pm
by chuckbook
Try Borland Pascal :-)
I used it some 40 years ago with great success.
You get an integrated dev environment including a screen editor (like wordstar) and a compiler that generates machine code.
All within 64K!