Mail Archives: djgpp/1996/09/25/18:46:08
On Wed, 25 Sep 1996, Ian Chapman wrote:
> Hi,
> I'm not too sure what is involved in learning Assembler for a
> 486. I started on more primative m/c's. Try getting a 6502, 8080,
> Z80 or 6800 manual and figure out some of the examples first. I think
> with a 486 you have to get the 8086 section running to set up the
> segmentation and I do not know whatelse.
>
> Regards Ian.
Say what? Assembly is not really that hard. You have these registers,
kinda like those little memory cells in your calculator. And you have
a few instructions that manipulate things. Like: addl %ebx, %eax
which will add whatever is in the ebx register to the eax register.
"addl" meaning add long.. or 32-bit add. Quite simple really.
The only thing is since most things in assembly use registers,
you don't always get to use nice self-explanatory variable names..
You use the register names instead. So, lots of comments on what you
are doing is a must. Aside from that it's almost like C.
Just get a book that tells you all the registers, and all the opcodes.
(It will probably teach you in Intel assembly style.) Learn the AT&T
assembly style (not a whole lot that's different, just looks different.)
My example above was AT&T syntax. IMHO assembly in a 32-bit flat
addressing environment is a great deal easier than in a 16-bit
segmented addressing environment (real mode).
-Sam
- Raw text -