• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: Asm-scanner

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
Well, the non-ASM code in the picture is actually more confusing to read than pure ASM code from my point of view...

All those "+00" could be easily skipped to remove unuseful complexity, for example. Pointer dereferencing is not a very good idea as well. Oh, and brackets could help too.

Atm that's true. The +00 are there because I use string templates instead of operation-trees. To solve that I'll add a flag to each register to indicate that this value is static and can be calculated without emulating. But to do that I'll have to reimplement all opcodes. :P

And the brackets are missing for the same reason. Because I save the add-instruction like this: "1+2". The numbers are substituted by the strings from previous instructions or with the register names. For this problem I'll make a operator-priority list. The other way would be to make the patterns like "(1)+(2)" but that would be a mess. (*((((4)+(35))*(((4)-(3))+(4))/(4)))... no thanks.
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
I updated the online-version. Temporary registers are now only shown when the called function actually uses them. There are still lots of bugs (Brackets, +00, etc.) but it certainly improved. It uses Firered instead of Ruby now.

LINK REMOVED
 
Last edited:

Xenesis

Syogun Changer
55
Posts
17
Years
Yeah, I have to admit I have no idea what the heck is happening in your picture. I suppose it's one of those CISC vs RISC things and is a matter of preference.

Also, I can't connect to your site link to take a look at the real thing...

Still, good luck with it.
 
Back
Top