Assembly language programming in unix environment

Odd iodine at runbox.no
Mon Sep 21 11:14:12 UTC 2009


freeburn wrote:
> On Mon, 2009-09-21 at 04:02 +0000, Christopher Lemire wrote:
>> Freeburn. As of now, all I know is quite a bit about java, data
>> structures algorithms and efficient ones,etc but I haven't learned
>> anything lower than c++  I do want to learn asm. I have an amd 64 bit
>> proc dual core. I can provide more info on it if needed. I run 2.6.31
>> kernel I compiled and configured. All of what I know about low level
>> is just basic concepts from talking to developers and computer science
>> professors. I do know its very tedious and very efficient and the cpu
>> specific such as mips. What do you suggest. I absolutely hate coding
>> in windoze. Don't get me started on visual, net, sharp and other crap.
>> I want to code in asm for my proc. Can u give me some pointers,
>> advice, getting started. Feel free to contact me offlist as well. I'm
>> sure we could learn a lot from each other and my blog shares to the
>> linux community what I know as well.
>> http://linuxinnovations.blogspot.com
> 
> Dear Christopher Lemire
> 
> u have an AMD processor which is kind of difficult to program. AMD is
> RISC processor whereas intel is CISC.

You are so wrong. There is no difference between AMD and Intel
processors, except for performance. They are both RISC under the
hood. The instruction set is CISC, but at the chip level they both
break down the CISC into RISC ops.

> and we were taught all about CISC
> processor. so i know how to program intel processors. and as far as i
> know programming RISC machine is way more difficult than CISC one.

Nope. It's easier. The Intel instruction set is very convoluted, while
most RISC chips have a well thought out, easy to learn instruction set.

> you
> see in CISC architecture one instruction can be decoded by the processor
> by several steps. where as in RISC architecture this is not true. here
> the processor is less intelligent so the instructions has to be further
> broken apart for the processor.

Geeze, where so you get this from? It's the exact opposite. Intel/AMD's
CISC stuff is the ones that are broken down into RISC ops. The only
RISC processor that does anything similar, AFAIK, is IBM's Power.
And that is only for a few instructions. Intel and AMD does it on a
almost total scale.

Oh, and the istruction set is only as "intelligent" as the programmer
makes it.

> thats why it is more cumbersome coding
> for RISC machine. i have part time job in a company which specialises in
> embedded systems.

I'm kind of surprised you are this misinformed then.

> we have to use different micro-controllers. most of
> them uses AVR family of microprocessors.  when we program them we always
> try use "c" . but sometimes we jsut have to use assembly language when
> the memory of that system is severely low and when we need very high
> efficiency in speed. and i'm telling you ,programming RISC processors is
> a quiet a tusk.

You sound like the AVR is the only RISC on the market. The most
used embedded CPU is the ARM. The instructon set for that is
very good. Then you have MIPS, SuperH, PowerPC and a lot of
others. Don't think your exposure to the AVR has any bearing on
the rest of the RISCs.

-- 
Odd




More information about the ubuntu-users mailing list