Z80 and the future of Wren.

111 views
Skip to first unread message

yves gerey

unread,
Nov 24, 2021, 2:03:46 AM11/24/21
to wren...@googlegroups.com
Bonjour, Noob here!

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.
More context here.

Wren is a pretty good candidate regarding the VM: small, so easy to cross-compile for early tests, and easy to rewrite in assembler for performances.

My first questions are:
- Is there already related work ?(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). Following Erdòs, I believe that programming is the perfect social activity for asocials (ok, just kidding, I don't mean to reinforce stereotypes).

--
--
λves 

Michel Hermier

unread,
Nov 24, 2021, 4:43:01 AM11/24/21
to wren-lang
Hi,
I think there was attempts to ort it to microcontrollers (that were far superior to the z80).
Considering what was reported, I think you'll face 2 major problems:
- Memory usage, while the VM is pretty light. The compiled out requires the source to exist in memory, for the stack trace.
- Value representation relies on double or union that is not really suitable for such constrained environment.
Both problem can be solved with some modifications.
In particular I would replace value representation with what smalltalk did. It would limit numbers to integer of 15 or 14 bits depending on the trades of made.
For the memory, it depends on how constrained the host is. If I remember well the devices are memory mapped, reducing ram space even further. So even in an ideal scenario, I wonder how much memory the base environment would use...
Reply all
Reply to author
Forward
0 new messages