Hi, I'm trying to learn more about the hardware level of all of this stuff.

Please let me know if I'm way off.
Consider a computer with no OS, when it first boots, shouldn't I be able to have an ASM program that writes something to the console?
I think I should, but writeconsole is not available... right?, because I don't have windows.
So, how do I do things at this level?
For instance after my bios does its stuff, I just read in keys and then spit them back out.

Posted on 2005-01-01 20:59:16 by cehupper
You make use of the bios interrrupt or write directly to the video memory. :-D
Posted on 2005-01-01 21:09:48 by roticv
That's enough right?

Also, remember that the switch on an off are ok in your hardware.
Remember to use the nano-tech chips. The mission is to recover the
RETURN of the BIOS. You can buy those big computers, if you want them?
Posted on 2005-01-01 21:43:29 by Statix Star
Disassembler the i386 in your WINDOW files, you're able to compile your sources there. http://webster.cs.ucr.edu/ Visit here and open
the Art of Assembly Language. You'll see the secrets of your BIOS.
Posted on 2005-01-01 21:50:27 by Statix Star
To make it simple...
When computer starts and after the bios has finished it's initializations. It expects executable code to be at a particular address to which the cpu transfers execution. This code usually called bootsector and loaded by a computer from bootable device (floppy, cdrom, etc.). Next if you want to print some characters you can use either interrupts or direct videomemory

I suggest you to search for bootsector examples. And check out http://www.nondot.org/sabre/os/articles/TheBootProcess/ (especially bootsec1.zip example). It contains mostly os-making related material, but you should be able to find the stuff you wanted to know there.
Posted on 2005-01-02 07:34:44 by arafel
You can I make a bootable floppy disk.. I have only done this with nasm so maybe someone else can tell you have you do this in masm or which assembler you use..
In the top of the source code. I used the ORG directive to set the address where nasm will assume the program begins at when it is loaded in memory. Because the boot record is loaded at 7C00h:

To print out strings and whatever you want you'll have to use the BIOS interrupts.. Ralf Brown has made an interrupt list: http://www.ctyme.com/intr/int.htm
You have to use interrupt 10.. And if you are going to read characters from the keyboard you'll have to use interrupt 16.
I don't know if you have to set the video mode first but I did.. Use interrupt 10 for this: http://www.ctyme.com/intr/rb-0069.htm

Use ntrawrite, dd or a similar tool to write the program to a floppy disk.
Posted on 2005-01-02 09:35:48 by dev_zero
Thanks everyone, I'll look into all these.
Posted on 2005-01-03 09:04:16 by cehupper