Hi Jakob, > "64-bit" picolisp also portable to 32-bit CPUs? > Or would it take a kludge of some sort?
I'm afraid so. In fact, I once started to write "src64/arch/x86-32.l", but didn't finish it. It is indeed possible to emulate the 64-bit architecture of the PicoLisp virtual machine (as documented in "doc64/asm") on hardware with a smaller word size, but only with a big overhead. Not only that a lot of space is wasted (double size of each cell). The hard stuff is calculating the CPU flags (zero, sign and carry) correctly, as all primitive operations must be emualated in multiple steps. Also, interfacing to the external world (libc, native calls etc.) doesn't fit well. Because 32-bit CPUs usually don't have enough registers, the emulated registers must reside in RAM, further slowing things down. Nevertheless, it would be fun ;-) On the other hand, the C version runs well on 32-bit CPUs. Why would you like to have the 64-bit version backported? The reason why I started with "x86-32.l" back then was for testing purposes, but this can be done as well using qemu. Cheers, - Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe