Reading Master Boot Record

This is a discussion on Reading Master Boot Record within the C Programming forums, part of the General Programming Boards category; Hello all, After a drunken discussion with a friend I've foolishly agreed to accept a challenge that I've really no ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    1

    Reading Master Boot Record

    Hello all,
    After a drunken discussion with a friend I've foolishly agreed to accept a challenge that I've really no idea how to solve. I need to write a program which will prevent a PC booting up depending on the status of a bit in the master boot record. For example if it's set to '1' the PC will boot normally otherwise the PC should not boot but instead display an error message. I'm a decent programmer but I'm not used to such low level stuff so don't have a clue on how to approach it. Personally I don't think it's possible. Could people please tell me what their thoughts are and how I could get started? Thanks in advance.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    I think its possible if you have the ability to rewrite your operating systems boot sector. Not something id like to mess with personally.
    What os does this have to work on?
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    2
    There is such a way by using assembly. U can just make a function out of it in assembly. Close to begining of ur code write "extern writembr();" or what function name u chose to have. Make an object out of it, link the object to ur exe. The assembly code itself I may post later becouse I have to write the code.... I sugest using NASM (netwide - assembler) for the assembly section and link it (method depending on what compiler u are using).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 06:27 AM
  2. Replies: 2
    Last Post: 01-28-2008, 02:07 AM
  3. updating and deleting a record
    By Burritt in forum C Programming
    Replies: 2
    Last Post: 04-19-2003, 04:58 PM
  4. Reading a binary file
    By Cyber Kitten in forum C Programming
    Replies: 2
    Last Post: 11-23-2001, 04:45 PM
  5. CD Boot - Need Help
    By (TNT) in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-19-2001, 12:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21