View Single Post
  #4   (View Single Post)  
Old 22nd April 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

BSDNewbie:

"Assemblers" have text files as input, as do "Compilers" -- and they both output executable binary objects. That is where their similarities end.

The difference is that the text file written in an "assembly language" or in "assembler" describe the specific CPU instructions to be placed in the binary output file. CPU instruction sets are hardware specific, and may be as simple or as complex as the instruction-set of the individual processor. The old PDP-8, one of the first processors I did programming for, had only 8 different instructions. The last OS built entirely from assembler language, that I dealt with regularly, was one for IBM's System/370, which still survives in their zSeries, if I recall correctly. It had several hundred different CPU instructions.

If you've never looked at a CPU instruction set, they commonly have instructions that are relatively simplistic, such as:

"copy a chunk of memory at this specified address into that CPU register, for later manipulation"

"add the values in these two registers together"

"copy a chunk of memory, for some number of bytes, from this address to that address"

"subtract 1 from this register value. If the register has reached zero, jump to that address, else execute the next instruction after this one"

"Issue the I/O instruction at this address to that hardware controller."

------------------------

indienick:

OpenBSD uses a "monolithic kernel" --- this is a big name to describe what just means, really, "built all into one single file". However, it has the capability to add kernel modules; emulators/kqemu is an example of a kernel module port/package for OpenBSD.
Reply With Quote