Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Writing a Boot loader

    I couldn't find an intro thread so I figured I'd just go ahead and make a thread on my topic and at the same time introduce myself. I'm Troncoso! I'm currently in college with the intentions of a computer science degree. Something I haven't learned to much about is the whole machine code to low level language deal. I'd like to write my own bootloader in assembly, but first I have some questions:

    Besides learning the assembly language, what do I need to learn (hardware or software wise) to competently tackle this project?

    What software can I use to write/compile/write to a disk in Windows 7?

    Once I've completed the bootloader, what do I need to do to boot different partitions? Or what is that process?

    Thanks for any help. I've looked at several threads throughout the internet of people who want to try this sort of thing and a lot of people will just sit there and say "you need to learn how to program first" "you need to start with smaller projects". I know this stuff. I don't plan on using the answers to these questions and jumping into the fray of it all. I want to learn all I can about this and I figure the best way to learn is to tackle a project that presents different challenges that I need to learn in order to continue to the final result. So, Again, thanks for any help!

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Well if you want to see how to write one, you can look at the source code of the very popular open source bootloader, GRUB.
    OracleGuy

  • #3
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for that but it's not exactly what I'm looking for. I would use that when actually writing my own but what I'd like to know doesn't deal with the actual coding.

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Troncoso View Post
    Thank you for that but it's not exactly what I'm looking for. I would use that when actually writing my own but what I'd like to know doesn't deal with the actual coding.
    how did you know that is not exactly what you are looking for since you have no idea from where to start?

    best regards

  • #5
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I never said I had no idea where to start. I know I need to know assembly. And I've even done some simple loaders for practice. What I'm looking for are the answers to the questions I asked.

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by Troncoso View Post
    I never said I had no idea where to start. I know I need to know assembly. And I've even done some simple loaders for practice. What I'm looking for are the answers to the questions I asked.
    Well ok then.

    Quote Originally Posted by Troncoso View Post
    Besides learning the assembly language, what do I need to learn (hardware or software wise) to competently tackle this project?
    You'll also need to know how to program in C.

    And you'll need to understand how the architecture is designed when it is powered on. I am guessing you want to do this on x86 so you'll want to do some research on how it works when it is first powered on. I don't know how much information there is on the net about, you might find better resources in books though.

    Quote Originally Posted by Troncoso View Post
    What software can I use to write/compile/write to a disk in Windows 7?
    Can you clarify what you mean, like what are you trying to do? You can write files to the hd from pretty much any lanauge.
    OracleGuy

  • #7
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Troncoso View Post
    I couldn't find an intro thread so I figured I'd just go ahead and make a thread on my topic and at the same time introduce myself. I'm Troncoso! I'm currently in college with the intentions of a computer science degree. Something I haven't learned to much about is the whole machine code to low level language deal. I'd like to write my own bootloader in assembly, but first I have some questions:

    Besides learning the assembly language, what do I need to learn (hardware or software wise) to competently tackle this project?

    What software can I use to write/compile/write to a disk in Windows 7?

    Once I've completed the bootloader, what do I need to do to boot different partitions? Or what is that process?

    Thanks for any help. I've looked at several threads throughout the internet of people who want to try this sort of thing and a lot of people will just sit there and say "you need to learn how to program first" "you need to start with smaller projects". I know this stuff. I don't plan on using the answers to these questions and jumping into the fray of it all. I want to learn all I can about this and I figure the best way to learn is to tackle a project that presents different challenges that I need to learn in order to continue to the final result. So, Again, thanks for any help!

    The project is kind of advance if you do not know much about programming, but if you get a book on C, which I'm sure they recommend in your classes, you will start to learn how to the language to do write to the disk, load programs etc. All that you want to do comes with learning the language and using library from others, or building your own.

  • #8
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oracleguy View Post
    Well ok then.



    You'll also need to know how to program in C.

    And you'll need to understand how the architecture is designed when it is powered on. I am guessing you want to do this on x86 so you'll want to do some research on how it works when it is first powered on. I don't know how much information there is on the net about, you might find better resources in books though.



    Can you clarify what you mean, like what are you trying to do? You can write files to the hd from pretty much any lanauge.
    What I mean by the last question is, how can I compile and run/emulate the bootloader in windows 7. I'm tired of writing it to a disk and restarting my pc to test it out.

    And I have experience in programming, but its all high level language stuff, ie. Python, vb.net, c++, etc.

    Once I get better at assembly I don't feel this will be too hard to do.

  • #9
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by Troncoso View Post
    What I mean by the last question is, how can I compile and run/emulate the bootloader in windows 7. I'm tired of writing it to a disk and restarting my pc to test it out.

    And I have experience in programming, but its all high level language stuff, ie. Python, vb.net, c++, etc.

    Once I get better at assembly I don't feel this will be too hard to do.
    Use a virtual machine instead, then you don't need to reboot, you can just load your code into the VM and try booting that.
    OracleGuy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •