HP Forums

Full Version: [idea] SASM to ARM transcoding
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What if one could transcode Saturn asm code source to ARM for native HP50/Prime.
Registers+Address+arithmetic syntax mapping and a few tricks should be enough isn't it?
I do think would be quite a project (and pretty powerful). You may coordinate with Claudio Lapilli for ideas (he is developing the newRPL after hpgcc3, two amazing projects).
I worked with a team that created a binary translator in the 90's. The problem is harder than it appears.

As a simple example, the Saturn has a 20-bit address. Each address points to a 4-bit nibble. How will you translate this to ARM? If you keep the 20-bit address space, then you'll surely run out of room with the larger opcodes in the ARM. If you change the size of the addresses then the size of everything on the stack changes. And when a program reads an address into a 20-bit register, what will you do with the extra bits that don't fit?

There are ways to handle this sort of problem but I hope this gives you a sense of hte difficulties. A much better approach is to provide compatibility at a higher level, such as UserRPL like Claudio is doing. I have been working on-and-off on a modern RPL implementation with the goal System RPL compatibility, but at the rate I'm going, it won't be ready for a couple of centuries.... Sad

Reference URL's