Boot Strap

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Profeta

Boot Strap

Post by Profeta »

I am starting to design my boot strap i already know the basic, what i am wondering is

What can i include in my boot strap? (A2) what else)
Is there any difference between programming in AMD and Intel?
Where can i find some Assembly tutorial?
Chase

RE:Boot Strap

Post by Chase »

Which type of boot strap? A floppy boot sector or a dos->pmode type loader?

For basic boot strap stuff you're probably only going to be using 386 compatible stuff so both AMD and Intel should function the same unless you're code has errors and then sometimes you'll see differences.

For the best asm tutorial look in the links section for "The art of assembly language".

-Chase
Profetas

RE:Boot Strap

Post by Profetas »

Thanks
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

RE:Boot Strap

Post by Neo »

You do not need to change your boot strap(, sector, loader) to get it to work on different processors HOWEVER it won't work on anything but an x86 PC.  The string "AA55" needs to be at byte 510 in your loader or else it will not work (except on my PC).  Do that like this:
dw 'AA55'
Oh yeah, it needs to be exactly 512 bytes long.  I hope that this information has helped (but you have probably already found it).
                                                            -Neo :)
Only Human
Chase

RE:Boot Strap

Post by Chase »

The string "AA55" needs to be at byte 510 in your loader or else it will not work (except on my PC)

I've come across a couple of systems myself that didn't need it but yea, it should be there.

-Chase
mikeleany

RE:Boot Strap

Post by mikeleany »

Just a minor correction. It's not the string "AA55" but the value 0xAA55, so it should look like this:

dw 0xAA55
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

RE:Boot Strap

Post by Neo »

Thanks for the correction xSadar.  I guess I'm not very good at explaining things.
                              -Neo :)
Only Human
Profetas

RE:Boot Strap

Post by Profetas »

I was starting using NASM, can i create a file using NASM or i Have to create the file using anothe linux editor??
josemx

RE:nasm

Post by josemx »

nasm is only a compiler, translate your asm code into machine code
you need a plain text editor like vi, pico, etc.

-josemx
-----
sfmbe
Profeta

RE:nasm

Post by Profeta »

how can i create a C file in lunux and how can i run it?
do i need any C program? or i can create using txt editor and compile and run?
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

RE:nasm

Post by Neo »

You can create C files using just about any text editor.  Save them with a ".c" extension and compile them with GCC ("gcc -c file.c -o outfile.whatever") or another C compiler.  You may also need to use a linker (I use LD) but the usage varies from program to program.
Only Human
Post Reply