There's more than one way to do things | |
PerlMonks |
Re^4: Interpreting Assemblyby misc (Friar) |
on Dec 02, 2019 at 18:13 UTC ( [id://11109559]=note: print w/replies, xml ) | Need Help?? |
> ..what Addressing Modes are.
I'd say, it's only about parsing the syntax. The registers ( ds, cs , .. ), depending on the architecture, have to be stored anyways. Furthermore, I didn't get so close yet, but the MIPS architecture/assembly seems to be a good target as intermediate language between c and perl. (according to schmorp, who chose the architecture cause it's simplicity for his emulator http://blog.schmorp.de/2015-07-01-emulating-linux-mips-in-perl-3.html) Oh, and I did find the movfuscator, which "compiles programs into "mov" instructions, and only "mov" instructions. Arithmetic, comparisons, jumps, function calls, and everything else a program needs are all performed through mov operations; there is no self-modifying code, no transport-triggered calculation, and no other form of non-mov cheating." :)) haven't got the thing to compile yet. And I can't imagine yet, how this should work at all. But this would not only solve the problem of addressing the pseudo ram, it might render the resulting code close to undebuggable. As long as there is no tool, which translates back into "normal" code. When this is possible at all.
In Section
Seekers of Perl Wisdom
|
|