News:

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

show the hex value of a register

Started by durexlw, December 19, 2008, 01:01:29 AM

Previous topic - Next topic

durexlw

For example: EDX contains the value BEDDCBE8h

If I use the command:
print str$ (edx)

the decimal value is printed: -1092760600
I want to print on screen this literal hex value: BEDDCBE8

How is this done?

jj2007

Open \masm32\help\masmlib.chm and type dw2 in the search box. Alternatively, open \masm32\macros\macros.asm in an editor and search for hex.

durexlw

Quote from: jj2007 on December 19, 2008, 02:57:42 AM
Open \masm32\help\masmlib.chm and type dw2 in the search box. Alternatively, open \masm32\macros\macros.asm in an editor and search for hex.
I very much appreciate that you didn't give a direct answer, but that you showed me where to find an answer. I find this way more valuable.

I'm wondering:
I'm new to MASM, what's good ways/resources/references to get started?

durexlw

for information purpose:

print hex$ (edx)

is what I was looking for.

jj2007

Quote from: durexlw on December 19, 2008, 11:28:57 AM
Quote from: jj2007 on December 19, 2008, 02:57:42 AM
Open \masm32\help\masmlib.chm and type dw2 in the search box. Alternatively, open \masm32\macros\macros.asm in an editor and search for hex.
I very much appreciate that you didn't give a direct answer, but that you showed me where to find an answer. I find this way more valuable.
:bg

Quote
I'm wondering:
I'm new to MASM, what's good ways/resources/references to get started?

The two files mentioned above, the rest of the help directory, the examples section, and the Iczelion tutorials. And the forum, of course - the search function is very efficient.
Best, jj

Spudster

#5
Durexlw, what kind of previous programming experience do you have?  I just started a few weeks ago myself.  For your IDE, I would recommend RadASM.  You'll have to download and configure the package for MASM32.  If you want more information about the internal workings of the computer, and assembly, I would recommend The Art of Assembly 32bit (http://portal.aauj.edu/portal_resources/downloads/programming/assembly_language32bit_edition.pdf), (I don't know how to make text other than the website the link in this forum).  Download OllyDBG v2.0 for debugging and disassembly.  I prefer HxD as a hex editor.  And really my biggest help learning MASM32 has been this forum.

[edit] The pdf link I posted above is not the one I thought it was.  Excuse me.  I'll look for the tutorial that I meant to post, and return when I find it.

durexlw

Quote from: jj2007 on December 19, 2008, 04:36:59 PM
The two files mentioned above, the rest of the help directory, the examples section, and the Iczelion tutorials. And the forum, of course - the search function is very efficient.
Best, jj
Thanks for the references jj. The 'Iczelion tutorials' looks like an awomse resource.
I'm just wondering: if I try to lookup commands like "print" I don't find anything about the command itself, not about its parameters like 'hex$' or 'str$', so I'm kinda wondering: "am I missing something?".

durexlw

Quote from: Spudster on December 19, 2008, 05:30:21 PM
Durexlw, what kind of previous programming experience do you have?  I just started a few weeks ago myself.  For your IDE, I would recommend RadASM.  You'll have to download and configure the package for MASM32.  If you want more information about the internal workings of the computer, and assembly, I would recommend The Art of Assembly 32bit (http://portal.aauj.edu/portal_resources/downloads/programming/assembly_language32bit_edition.pdf), (I don't know how to make text other than the website the link in this forum).  Download OllyDBG v2.0 for debugging and disassembly.  I prefer HxD as a hex editor.  And really my biggest help learning MASM32 has been this forum.

[edit] The pdf link I posted above is not the one I thought it was.  Excuse me.  I'll look for the tutorial that I meant to post, and return when I find it.
I started with Pascal, went on to ASM from there, picked up C, java and afterwards .NET. I've been doing some Reverse Engineering in between
Anyway, I need ASM again: I only used it in Pascal and RE up till now, so I'm kinda foreign to this MASM idea.

Thanks for the RadASM recommendation, looks great indeed. I won't be doing much windows developing right now, so MASM will do, however I'll keep this compiler in mind.

IDA is my standard debugger. I used to use olly, but when I saw the graph views in IDA, I was sold. By the way, OllyDBG 2 is still in pre-release... If I understand correctly, it still lacks functionality compared to its older previous versions. Checkout IDA man, you may love it.

As for the ASM topic: I'm not so much after ASM tutorials, I'm more trying to get my head around the whole idea that drives MASM. The whole idea of macro's and build-in functions seems handy, but currently it's driving me insane and I end up coding everything by hand. I'm kinda guessing I'm not using this tool optimal.

Like I said in the reply to jj: when I look up commands like 'print' I find no references in the helpfiles... this situation is not exactly helping me, so I'm looking for some more info on this (not so much the 'pint' specifically, but more: the question why I can't seem to find documentation on certain commands).

MichaelW

For information on print and the other MASM32 macros, depending on the MASM32 version look in \masm32\help\hlhelp.hlp or \masm32\help\hlhelp.chm, or in QE on the Help menu under High Level Macro Help.

eschew obfuscation

durexlw

Quote from: MichaelW on December 24, 2008, 02:18:02 AM
For information on print and the other MASM32 macros, depending on the MASM32 version look in \masm32\help\hlhelp.hlp or \masm32\help\hlhelp.chm, or in QE on the Help menu under High Level Macro Help.
Found it... that's what I was looking for. Thanks for the help man.