NefMoto

Technical => Reverse Engineering => Topic started by: TrevelXP on March 14, 2022, 12:57:43 AM



Title: Reads166 or uVision Compile HEX File Help
Post by: TrevelXP on March 14, 2022, 12:57:43 AM
Hello everyone, hope you doing all well.

Currently learning ME7 Disassembly with IDA Pro, to understand how things work.

But my question is about compiling ASM code to HEX.

I've downloaded both uVision and Reads166 (Had to run it on virtual machine WinXP as software is very old)
I've used some example ASM codes on this forum to compile it using uVision to compare it with original HEX on the flash.

But every time i compile it i get completely different HEX compare to the original.

Both (uVision and Reads166) generates exactly the same HEX file.

I'm sure I'm missing something ?


Thanks you for your time reading this post




Title: Re: Reads166 or uVision Compile HEX File Help
Post by: fknbrkn on March 14, 2022, 04:07:00 AM
Where is the code?


Title: Re: Reads166 or uVision Compile HEX File Help
Post by: TrevelXP on March 14, 2022, 05:05:27 AM
Where is the code?

Hello mate, thanks for reply.

I tried to compile rajivc666 multimap code that he posted using Reads166.
http://nefariousmotorsports.com/forum/index.php?topic=1556.0 (http://nefariousmotorsports.com/forum/index.php?topic=1556.0) 4th post.

Edit:

I compile it again using Reads166 and i noticed the actual code is in Decoded Text HxD

Original:
(https://i.ibb.co/r53cyt1/flashmultiswitch.png) (https://ibb.co/r53cyt1)

Reads166:
(https://i.ibb.co/jWzsjtS/Capture2.png) (https://ibb.co/jWzsjtS)

Question is why is it like that ?





Title: Re: Reads166 or uVision Compile HEX File Help
Post by: TrevelXP on March 14, 2022, 05:45:30 AM
Ok i imported compiled HEX as intel HEX and i got this:
(https://i.ibb.co/JK68fsf/Capture33.png) (https://ibb.co/JK68fsf)

Very similar, but its waaaay bigger then original. Any thoughts ?

Thanks


Title: Re: Reads166 or uVision Compile HEX File Help
Post by: fknbrkn on March 14, 2022, 07:38:09 AM
Ok i imported compiled HEX as intel HEX and i got this:
(https://i.ibb.co/JK68fsf/Capture33.png) (https://ibb.co/JK68fsf)

Very similar, but its waaaay bigger then original. Any thoughts ?

Thanks

This one looks good
Check your project. Maybe it has many sources that compiled in one hex file


Title: Re: Reads166 or uVision Compile HEX File Help
Post by: TrevelXP on March 14, 2022, 07:43:28 AM
Anyways i figured.

For newbie like me : When you compile your ASM to HEX you need to Read/Import that HEX file as Intel "Import Intel Hex" in HxD for example.

Reads166 Compiler works perfect.

But in uVision gives lots of errors such as "A74 Operated Type Mismatch" in mov  3008h,0xff1c.  ???



Title: Re: Reads166 or uVision Compile HEX File Help
Post by: Blazius on March 14, 2022, 01:58:22 PM
Also u can open the hex file in winols, then you can directly copy the actual code in winols where you want it.


Title: Re: Reads166 or uVision Compile HEX File Help
Post by: fknbrkn on March 14, 2022, 08:54:13 PM
Uvision works great
Learn syntax. This code wont work


Title: Re: Reads166 or uVision Compile HEX File Help
Post by: TrevelXP on March 15, 2022, 12:03:23 PM
Uvision works great
Learn syntax. This code wont work

You right ! uVision works much better.
I been experimenting with Reads166 but for some reason it doesn't recognise "ZEROS" "ONES"
I compiled LC ASM code with uVision and its exactly the same in HEX.

fukenbroken are you on drive2 as fknbrkn ? Pretty sure i'm following you :)

Thank you guys.


Title: Re: Reads166 or uVision Compile HEX File Help
Post by: fknbrkn on March 30, 2022, 12:31:13 AM
Yep thats me :)