I'm new to assembly language, and would like to learn. I have Vista-64 (will be upgraded to Windows 7), and was wondering if 32-bit assembly programs will compile and run on my system. If not, what are the major differences, and where can I learn to program on a 64-bit system? I will soon be reinstalling 32-bit Linux, but I will end up programming on both systems. Which assembler should I use?
4 replies to this topic
#1
Posted 16 November 2009 - 10:31 AM
|
|
|
#2
Posted 16 November 2009 - 05:06 PM
Depends on the processor. Processors using Intel64 (aka IA-32e) architecture will choke on IA-32 programs, but processors with x86-64 architecture are more or less fully backwards compatible. There are only a few differences, i.e. you can't use inc or dec because those instructions have been remapped to the REX prefixes. A good place to start learning programming would be The Art of Assembly Language. There are versions for both Linux and Windows, as well as a generic version. For a soft conceptual introduction, you can also read my assembly tutorial series in the Assembly Tutorials section. (It's still a work in progress.)
As far as assemblers, I would recommend NASM, as it's portable and will work on Windows and Linux.
As far as assemblers, I would recommend NASM, as it's portable and will work on Windows and Linux.
Edited by dargueta, 16 November 2009 - 05:07 PM.
Added links
sudo rm -rf /
#3
Posted 16 November 2009 - 05:51 PM
Thank you. I think I'll go with NASM or YASM. What are reasons to choose NASM over YASM or vice versa? I understand that they are very similar; I see very little difference between them.
#4
Posted 16 November 2009 - 06:10 PM
I've never used YASM, but there's a comparison between NASM and YASM on Wikipedia that you might want to look at.
sudo rm -rf /
#5
Posted 10 December 2009 - 09:05 PM
dargueta said:
you can't use inc or dec because those instructions have been remapped to the REX prefixes.
Those instructions still work, just not specific encodings (upper-nibble on gp registers). The ones that were remapped were the single-byte versions for ah, bh, ch and dh. Single-byte encodings for al, bl, cl and dl still work, as do all 16-bit, 32-bit and memory versions (except 8-bit).
- Rick C. Hodgin
Edited by foxmuldr, 10 December 2009 - 09:11 PM.
expanded explanation
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









