

BIOS - pencil

i understand that BIOS is a small program written in some language and stored on a chip/flashmemory.can someone tell me how does this instruction written by us gets stored inside a chip made of transistors?how do they make the instruction get inside a chip made of silicon?
======
godDLL
Questions like this one should be on <http://superuser.com/>

This isn't HN material.

------
CyberFonic
Most BIOSes are written in a mixture of assembly language and C. Have a look
at www.coreboot.org if you want to get into more detail. The BIOS found in a
typical PC is rather large, 1 MB is common.

The flash memory is programmed in the factory before being installed into the
motherboard and can also be reprogrammed in the field. There are other
technologies, such as JTAG which allow you to reprogram flash memories. In
effect, part of the memory contains a very simple computer (if you dare call
it that) which will communicate with an external device to perform the task.

Older technologies, e.g. EPROMs used high voltages (as in 12V vs. 5V) to
program what was in effect a huge array of capacitors which could be erased by
ultraviolet light. Before them ROMs were actually programmed by changing the
manufacturing masks.

------
zitterbewegung
You should take a computer architecture class at your college or at least
audit it. It would help you understand how your computer works.

------
razerbeans
This gives a general overview of how the BIOS works, but I'm not entirely sure
if it goes as in depth as you may want it to. However, it should be a good
starting point. <http://mikeos.berlios.de/write-your-own-os.html> (See "PC
primer" paragraph)

------
billpg
The chips these days use flash memory which can be written into like RAM
chips, except these keep their contents without power.

In days of old, ROM chips would be mass produced with their contents literally
hard wired as an intrinsic part of the chip layout.

------
georgecmu
You can learn how these 'chips made of silicon' store data by following links
here: <http://en.wikipedia.org/wiki/Read-only_memory#Types_of_ROMs>

------
pencil
i'am also interested in knowing what a microcode is {wikipedia doesn't have
much on this} what's it written in ?

~~~
hga
(Warning, major simplifications here, and mostly from '80s knowledge of the
field.)

Real microcode is below the level of assembly language. E.g. a horizontal
microcode will potentially be controlling the function of each gate or sub-
block in a microprocessor.

The clock frequency of a synchronous design is generally the time it takes to
execute each microcode instruction. So one machine code op code may translate
into several microcode operations to achieve the desired outcome.

Writing microcode is _hard_.

~~~
joezydeco
I don't know what it's like in CS/EE courses today, but back in the day most
computer architecture students had to create a simple microcoded-ALU and write
both sides of the code.

Doing the microcode for those projects was kind of fun, I miss that kind of
work sometimes. Now get off my lawn.

~~~
hga
MIT still does it that way: [http://ocw.mit.edu/OcwWeb/Electrical-Engineering-
and-Compute...](http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-
Science/6-004Spring-2009/CourseHome/index.htm)

Back in the late '80s a friend who was taking it told me about a contest of
sort they had to the side: you were given an instruction set to implement in
hardware and firmware (microcode) and on the day of the contest you were given
a program to run on it. The fastest implementations after a day of hacking and
tuning won.

I notice that the last lab for the above spring 2009 version has a
price/performance challenge, which is very apropos to what's hot in this area
today (e.g. the ARM, Atom, etc.). You're to minimize the number of gates while
still making it run a sample application quickly.

