News:

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

64 bit ASM Programming + WinAPI

Started by Slugsnack, June 21, 2009, 01:11:42 PM

Previous topic - Next topic

Slugsnack

i have a free summer and one thing i wanted to learn was 64 bit ASM programming but on top of that i wanted to learn it with winapi possibly GUI creations and that sorta thing. since i got a whole summer wondering if someone has a good book that they have personally read and recommend or know as highly rated, i'm willing to invest some decent money into it so price is no issue for the book ( there is a limit to how expensive books are ^_^ )

dedndave

honestly, i think the guys in here know as much as anyone does about 64-bit assembler

mitchi

Well you can check out Jeremy Gordon's website. The GoAsm 64 bit section is very interesting.
And you could study a 64 bit C++ compiler disassembly to see how it's done.

Slugsnack

Quote from: dedndave on June 21, 2009, 01:36:13 PM
honestly, i think the guys in here know as much as anyone does about 64-bit assembler
they do but i can learn a lot faster through a book than asking stupid questions every other second to the guys here
Quote from: mitchi on June 21, 2009, 01:40:14 PM
Well you can check out Jeremy Gordon's website. The GoAsm 64 bit section is very interesting.
And you could study a 64 bit C++ compiler disassembly to see how it's done.
checked that site but there's not TOO much stuff there to keep me busy over a whole summer : ) i was really looking for a good book that i can sit down and get through. looking at disassembly was last resort. that is how i learnt 32 bit ASM, through ollydbg but i wanna try a different route this time

dedndave

well, you may have some luck finding a book
but, i don't think the book you are looking for has been written, yet
64-bit asm is still in its' infant stages
from what i gather, MASM doesn't support it particularly well
GoAsm seems to be a good alternative and the author lives right here
that is why i mentioned it
if you look through the previous posts, either by going through the "64 Bit Assembler" subforum or by using search,
you will find the problems and solutions that the MASM32 forum programmers have already bumped into
you are also likely to find some good examples of 64-bit code to learn from
i can't imagine any book that would carry more up-to-date information
which brings to mind - these guys should write a book - lol

also, Mitchi is right...
QuoteAnd you could study a 64 bit C++ compiler disassembly to see how it's done
that would be "the other" best resource for information

ramguru

I'm doing 64 bit asm + WinAPI programming right now.
It's not very different from 32 bit. The toughest part
was finding the right assembler that properly supports invoke
& don't mess with stack in 64 bit mode. My findings ended in GOASM sub-forum.
Now as for book, I've bought 32/64-Bit 80x86 Assembly Language Architecture when lived in US.
I use it only when I need some examples for complex instructions.
To get basic impression on how things in 64bit mode are different from 32bit mode .. just read some online tutorials.

Mark Jones

Quote from: Slugsnack on June 21, 2009, 02:16:06 PM
[looking at disassembly] ... is how i learnt 32 bit ASM, through ollydbg but i wanna try a different route this time

Good idea, because OllyDbg is unstable in 64 bits and you probably will not be using it for analysis. Apparently there is a third-party plug-in to help with "compatibility," but even so, many "Single Step Event" breakpoints occur in Olly duing all kinds of OS calls, so it is very cumbersome to use in 64-bit. Period.

As alternatives, try FDBG (64-bit only) or WinDBG. WinDBG is a very powerful package, but its display is quite "barren." WinDBG has the added advantage of being able to read .DMP files, and (apparently) has a high success rate at finding the crash culprit using one command. On its down-side, all useful debugging data is read from .PDB files, which can be configured to read from the MSDN site, however this won't help you debug applications with no .PDB data. (No local vars/function names/offset labels/etc.)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

GregL

I haven't yet seen a book that covers x64 assembly language programming for Windows, or for any other OS.  I have the book ramguru mentioned and it's really limited, mostly just covers x64 instructions.  If anyone knows of a good book on the subject please let us all know.

The Visual Studio 2008 debugger is great for debugging x64 programs.  The Pele's C debugger is good for x64 too.  And Mark already mentioned WinDbg.


disintx

Quote from: Mark Jones on June 23, 2009, 01:40:18 PM
Quote from: Slugsnack on June 21, 2009, 02:16:06 PM
[looking at disassembly] ... is how i learnt 32 bit ASM, through ollydbg but i wanna try a different route this time

Good idea, because OllyDbg is unstable in 64 bits and you probably will not be using it for analysis. Apparently there is a third-party plug-in to help with "compatibility," but even so, many "Single Step Event" breakpoints occur in Olly duing all kinds of OS calls, so it is very cumbersome to use in 64-bit. Period.

As alternatives, try FDBG (64-bit only) or WinDBG. WinDBG is a very powerful package, but its display is quite "barren." WinDBG has the added advantage of being able to read .DMP files, and (apparently) has a high success rate at finding the crash culprit using one command. On its down-side, all useful debugging data is read from .PDB files, which can be configured to read from the MSDN site, however this won't help you debug applications with no .PDB data. (No local vars/function names/offset labels/etc.)

Off: Wow! FDBG is awesome. I haven't coded much beyond the standard HW in 64 bit, but this will certainly give me incentive to do so. Thanks for the link!

On: I actually haven't heard of any true 64-bit books. Most cover instructions but focus on 32 bit. For the most part, you'll probably be stuck with AMD/Intel 64-bit documentations and trial and error. :/