News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Calc in Hex

Started by Fernand, September 06, 2007, 02:39:06 PM

Previous topic - Next topic

Fernand

I am looking for a calculator or a emulator that I can verify my code,
Ex:  mov eax, 12345678h and I get a answer that the eax=12345678h
Fernand :bg

arek

Hi Fernand,
I'm not quite sure if that's even close to answering your question, but calc.exe from Windows can calculate in hex. Select View | Scientific and press F5.

Regards,
Arek

Fernand

I Arek, thank for your help I appreciat it.
Excuse me if I have some problem in english
What I want to get, it is a emulator that if I put a mnemonic like:
mov eax, 12345678h
mov cl, ah
sub cl, 10
mov al, cl
That at the end, I get the answer in the eax......
Fernand

sonic

Im not sure but it seems what you are asking is a debugger. Search OllyDbg in google.

Mark Jones

Indeed, a great way to "see" what that code does, is to assemble that program, then open it in OllyDbg. Press F8 repeatedly to jump over calls, and F7 if you want to follow the calls.

What I usually do is stick a NOP where I want to see the code, then open the executable in OllyDbg and press CTRL-F, enter NOP, then press <Enter>. This should take you to where the NOP is. Then press F2 to set that instruction as a breakpoint, and press F9 to execute the code. It should stop at the breakpoint, then you can press F8/F7 to step through each instruction.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Fernand

A big thank to Mark and sonic. :clap:
I found OllyDbg 1.10 and I will try it ....
Fernand

sonic

Quote from: Mark Jones on September 07, 2007, 12:37:43 AM
What I usually do is stick a NOP where I want to see the code, then open the executable in OllyDbg and press CTRL-F, enter NOP, then press <Enter>.
I prefer int 3 breakpoints. Make sure in OllyDbg's "Debugging Options" Under the "Exceptions" Tab int3 breakpoints is Unchecked. Comment out the int 3 lines in Final Execuatable after you are satisfied with results.

evlncrn8

easier and quicker method is to put a tag above the code

db 'hi this is the code i want to see'

load hiew or any decent hex editor that has disassembler capabilities
and search for your tag, the code is right below it

each to their own i guess