Page 2 of 3
Re:Getting a OS going quickly.
Posted: Sun Dec 15, 2002 6:29 pm
by James
I don't want to run FritzOS. I am just cannibalizing some of its code. Is that OK? I compiled the above ASM instructions and now I want to put them onto a floppy. How do I make the compiled code into the boot strip on the floppy?
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
Posted: Sun Dec 15, 2002 6:57 pm
by jrfritz
dd if=<your boot.bin> of=/dev/<your floppy drive>
and reboot to test your code.
Re:Getting a OS going quickly.
Posted: Sun Dec 15, 2002 7:27 pm
by jrfritz
Did that work?
Re:Getting a OS going quickly.
Posted: Sun Dec 15, 2002 8:57 pm
by James
Yep! It works! Will you give a link to some documents on protected mode and the BIOS functions. By the way, thanks for the link to your source code. MUCH essayer to understand the the BSD code. Is there a big table or something with a list of every X86 ASM instruction and every register with a brief description of each? I don't want a big document I just want the basics, 1 page devoted to each instruction or something.
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
Posted: Mon Dec 16, 2002 12:11 am
by Guest
This is the Intel Instruction Set Refernece, it is 6.62mb in size but it gives you a complete description of each instruction.
ftp://download.intel.com/design/Pentium ... 547109.pdf
hope this helps.
Re:Getting a OS going quickly.
Posted: Mon Dec 16, 2002 12:06 pm
by jrfritz
What do you mean it's easier to understand the BSD code?
Re:Getting a OS going quickly.
Posted: Mon Dec 16, 2002 12:52 pm
by damonbrinkley
I believe he/she meant 'it's easier to understand than then BSD code'
Re:Getting a OS going quickly.
Posted: Mon Dec 16, 2002 1:07 pm
by jrfritz
My code is easier to understand than the BSD code?
Re:Getting a OS going quickly.
Posted: Mon Dec 16, 2002 7:20 pm
by James
IMHO your code is was essayer for me to wrap my mind around. Its small and strait to the point.
Any idea ware I can get a hard copy of that pdf (without printing it?).
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
Posted: Mon Dec 16, 2002 7:47 pm
by James
What about BIOS calls? Someone has to have put together a big reference book with all the BIOS call, CPU instructions and registers in it.
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
Posted: Mon Dec 16, 2002 9:15 pm
by James
I have another question. Whats the easiest way to get a C kernel loaded? I am using the gcc tools to compile/build my kernel. I more or less copied the FritzOS boot loader. I don't want to use a ASM and C kernel like Fritz douse. Is there anyway I can load my C kernel without ASM? If so, how do I declare main, how do compile and build it and then put it on the floppy (what are the commands)? What is the in-line ASM macro in gcc (I want to embed ASM code in my C code)?
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
Posted: Tue Dec 17, 2002 9:32 am
by Curufir
The easiest way (So I've been told) is to create your kernel in elf format and get GRUB to load it for you.
Try these: HelpPC (For BIOS Interrupts/Instruction set), Ralf Brown's Interrupt List (For...*drumroll*...interrupts and ports), the NASM manual for a description of the intel instructions, the intel opcode manual (Usually number 2 of a series of 3/processor. There was a recent link on here). All those are easily accessible via google, so I'm not gonna go find them for you.
Re:Getting a OS going quickly.
Posted: Tue Dec 17, 2002 10:55 am
by jrfritz
[attachment deleted by admin]
Re:Getting a OS going quickly.
Posted: Tue Dec 17, 2002 3:05 pm
by df
James wrote:
I have another question. Whats the easiest way to get a C kernel loaded? I am using the gcc tools to compile/build my kernel. I more or less copied the FritzOS boot loader. I don't want to use a ASM and C kernel like Fritz douse. Is there anyway I can load my C kernel without ASM? If so, how do I declare main, how do compile and build it and then put it on the floppy (what are the commands)? What is the in-line ASM macro in gcc (I want to embed ASM code in my C code)?
use grub. there is msdos floppy disks with grub on them, all you have to do is copy your kernel file over to the grub disk, its that simple.
Re:Getting a OS going quickly.
Posted: Tue Dec 17, 2002 3:17 pm
by jrfritz
The Asmmbly command in GCC is in AT&T syntax...if you want NASM syntax in your C code, you do this:
#define inasm(s) asm( ".intel_syntax no_prefix" ); asm(s);asm(".att_syntax prefix" );
and in your main C code, do this ( with pk0.3 that I posted above ):
void start()
{
// stuff
// asm code in GCC:
inasm( "Your Assembly Stuff Here" );
inasm( "mov eax, 1\n
mov ebx, 2" );
}