Thursday, February 05, 2009

Return to Assembler

I got a copy of The Art of Assembly Language from a local library and am working my way through it. I downloaded it from Webster years ago and have been meaning to read it, but it is much more pleasant to read a hard copy.

Assembly Language was my first programming language, but is has been two decades since I used it. I programmed 6800, 6502, 8080, Z-80 & 8086 CPUs in Assembly Language and read up on the 80386 instruction set, but never used it. Things have changed a bit. I never used the FPU before, it is a bit different; and the MMX instruction are not at all what I'm used to. But the basics are still the same.

I have read lots of complaints about HLA. I understand the complaints. The whole point of writing in assembler is to exercise total control over the machine code, polymorphic functions and exception handling seem to fly in the face of this idea. However, I find to be a very good learning tool. It allows me focus my attention of what I'm trying to understand, not the gory details of I/O etc.

The book assumes that you have an operating system, so it does not get into issues like resets and IPL. I wish it covered this because I'm very curious how IPL is handled on a multi core CPU.

Labels:

4 Comments:

Blogger -ahd- said...

Machines don't boot multi-core. They boot single CPU/core and then start the other CPUs after initialization.

Thursday, February 5, 2009 at 9:36:00 PM UTC  
Blogger Ed said...

I did not know that. Are there special instructions to start the other CPU's?

Thursday, February 5, 2009 at 10:04:00 PM UTC  
Blogger -ahd- said...

I would suspect no, it's the same instruction but sent to a different CPU via motherboad chip set routing. Looking at the FreeBSD kernel, the start MP routine mostly initializes the APICs before going to town.

That said, I really have not got a clue, I'm not much of a systems jockey.

(I'd download the FreeBSD kernel or browse it online -- it's mostly C with a few embedded assembler instructions.)

Friday, February 6, 2009 at 3:39:00 AM UTC  
Blogger -ahd- said...

I would suspect no, it's the same instruction but sent to a different CPU via motherboad chip set routing. Looking at the FreeBSD kernel, the start MP routine mostly initializes the APICs before going to town.

That said, I really have not got a clue, I'm not much of a systems jockey.

(I'd download the FreeBSD kernel or browse it online -- it's mostly C with a few embedded assembler instructions.)

Friday, February 6, 2009 at 3:39:00 AM UTC  

Post a Comment

<< Home