PDA

View Full Version : The best Assembler and Assembly language


elf1984
Jan 3, 2009, 01:37 PM
Hello,
Let me start by saying thank you to the owner and administrator of this website for providing a helpful platform like this.

As a beginner, I have dream of becoming an Assembly programmer, I am not a math wiz but I have some few questions.

1) Which assembly language is the best? (I am targeting x86 intel)
2) Which assembler is the best (I have tested nasm)

3) What is the intelligent or smartest way to learn assembly? And what is the most hard area of it

I have ebook on 'The Art of Assembly Language' by Randall Hyde which teach something called HLA (High Level Assembly), this seems to be simpler than the original assembly but tech bad practice because the code here is too efferent from other assembly language.

What should I do? Where should I start? I am on windows XP and I have just installed ubuntu linux

KISS
Jan 3, 2009, 02:57 PM
Assembly language use will be dependent on the architecture of the machine, even so Assembly is sometimes used to get the cost down or routines that MUST be in assembly.

Most work might be with embedded designs and Intel won't likely be there.

Take a peek at Microchip Technology Inc. - a Leading Provider of Microcontroller and Analog Semiconductors (http://www.microchip.com)

There is a wealth of information there. Come back here if you like and ask questions.

elf1984
Jan 4, 2009, 01:16 AM
Assembly language use will be dependent on the archetecture of the machine, even so Assembly is sometimes used to get the cost down or routines that MUST be in assembly.

Most work might be with embedded designs and Intel won't likely be there.

Take a peek at Microchip Technology Inc. - a Leading Provider of Microcontroller and Analog Semiconductors (http://www.microchip.com)

There is a wealth of information there. Come back here if you like and ask questions.

Thank you for the reply.
Can you point me to a step by step binary arithmetic tutorial? I have read some tutorial but not fully understood it, mostly hex to binary but I can do something like

200 (dec)

200 / 2 = 100 R 0
100/ 2 = 50 R 0
50 / 2 = 25 R 0
25/2 = 12 R 1
12/2 = 6 R 0
6/2 = 3 R 0
3/2 = 1 R 1
1/2 = 1 R 1
= 11001000

I need more ticks

KISS
Jan 4, 2009, 01:45 AM
Hex to binary and binary to hex is simple

e.g. 11001000 on little endian and straight encoding

Before I get too carried away. Little endian is how you wrote the digits. 0 on the right is the Least Significant bit (lsb). Big endian is where the 1 at the left is the lsb. The above system can have two representations for zero which isn't good. The other system is 2's complement which has negative numbers.

Break into patterns of 4

1100 1000 and convert each pattern to a HEX digit

A 8 or A8 (hex)

1=1 = 0001 = 0+0+0+1
A=10 = 1010 = 8+0+2+1
B=11 = 1011
C=12
E=13
...
F =15 = 1111 = 8 + 4 + 2 + 1

Octal, just break into patterns of 3 bits

11001000b becomes 11 001 000 or 310 octal

Words - variable- usually a multiple of 8 bits
bytes = multiple of 8 bits
nibble = multiple of 4 bits

Help?

KISS
Jan 4, 2009, 02:06 AM
Your 200 (dec) to binary example can easily be done with a power of 2 table. e.g for 8 bit 128 64 32 16 8 4 1

By inspection 200-128 = 72 (200>128) 1
... 72-64 = 8 1
... 32 0
... 16 0
... 8 1
... 4 0
... 2 0
... 1 0

or 1100 1000

KISS
Jan 4, 2009, 02:18 AM
ASCII ART doesn't work well.

Use HEX as a shorthand to/from binary

You will basically use the binary system and the decimal system for a while until doing base 16 arithmetic is second nature. I don't do it often enough.

KISS
Jan 4, 2009, 02:26 AM
You need at a minimum to memorize the binary TRUTH tables for AND, OR, NOT, XOR and
you need to know that shifting left or right is multiplying and dividing by a power of 2.
e.g. 1001 shift right = 0100 = integer 9 divided by 2 = 4. Shifting 2x divides or multiples by 4.

Lesson for today.

elf1984
Jan 4, 2009, 04:47 PM
Thank you so much, this one helps a lot, I will be practicing all night today