When people refer to 32-bit
and 64-bit
assembly, they're talking about which instruction set you'll use - they're also sometimes called Ia32
and x64
in the Intel case, which I presume you're asking about. There is a lot more going on in the 64-bit case, so starting with 32-bit is probably good; you just need to make sure you're assembling your program with a 32-bit assembler into a 32-bit binary. Windows will still know how to run it.
What I really recommend for getting started with assembly would be something with a simpler instruction set to get a handle on. Go learn MIPS assembly - the spim
simulator is great and easy to use. If you really want to dive straight into the Intel assembly world, write yourself a little C program that calls your assembly routines for you; doing all the setup and teardown for a 'real program' is a big mess, and you won't even be able to get started there. So just write a C wrapper with main()
in it, and compile and link that with the object files you get from writing your assembly code.
Please don't get in the habit of writing inline assembly in your C code - it's a code portability nightmare, and there's no reason for it.
You can download all of the Intel 64 and IA-32 Architectures Software Developer's Manuals to get started.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…