![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 20
Rep Power: 0
![]() |
i'm trying to make a startup disk , i want to study the boot code that i will write on the first sector on the disk
anybody can tell me where is that code and what assembler do i use to compile it ? thanks |
|
|
|
|
|
#2 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
You can use pretty much any assembler to assemble it, and what do you mean "where is that code?" If you're asking for an example, here's one that helped me when I was experimenting a couple of years ago:
http://osdever.net/tutorials/hello_btldr.php?the_id=85
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower Last edited by Mjordan2nd; May 6th, 2006 at 6:32 PM. |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Apr 2006
Posts: 20
Rep Power: 0
![]() |
i'll take a look at that
but if u have anything that is quick and easy to write on a floppy boot sector i want to boot from the floppy the CMD or write anything on the screen thanks and it will be alot better if it's compatible with MASM |
|
|
|
|
|
#4 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
I used NASM, so I tried to use more material for NASM. I don't have any of the MASM sites bookmarked, so i can't help you there, but it's the same concept so it shouldn't be too difficult to change the code up a little bit and make it compatible with MASM. Also, I used debug to write to the disk. You could try that.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Apr 2006
Posts: 20
Rep Power: 0
![]() |
i'm a biginner i couldnt understand most of the code
i just really need to get the job done and then do the understanding part i know it sounds crazy but i gotta do it so how can i get a code straight to a compiler and then write the files to a disk and boot from it ? thanks for helping me |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Why don't you begin your beginneriness with something that clues you in a tad more than you are. Or, if you want someone to do your stuff FOR you, don't beat around the bush, just say so.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 | ||
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
Quote:
Quote:
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
||
|
|
|
|
|
#8 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 330
Rep Power: 3
![]() |
before you create a bootloader you have to understand that the bios looks for the value 0x55 in the 510 location of the device (which is a drive A) and 0xaa in the 511 location. here is the code to write a simple bootdisk in C but this is not very good because it just goes into the bootloader and comes straight out.
Here is the code Quote:
|
|
|
|
|
|
|
#9 | |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
Quote:
|
|
|
|
|
|
|
#10 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
There's a tab key reachable by your left pinky on most keyboards. Learning to use it wisely might induce more people to read your code. Just sayin'.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|