facebook

Friday, 1 February 2013

How to restart your computer, C restart



#define B_ADR (0xFFFF0000UL)// You point it at memory location 0xFFFF0000 which is where the cold boot function is located

#define R_ADR (0x00400072UL)

#define C_BOOT (0)
#define W_BOOT (1)
void Restart( int type )
{
void ((far *fp)()) = (void (far *)()) B_ADR;
if ( type==C_BOOT )
*(unsigned int far *) R_ADR = 0;
else
*(unsigned int far *) R_ADR = 0x1234;
(*fp)( );
}



int main( void )
{
int reboot_type;
printf( " This program will reboot your program \n\n"
"0. Cold Boot \n"
"1. Warm Boot \n"
"2. Exit \n"
"What is your choice: "
);
scanf( "%d", & reboot_type );
if (reboot_type ==0 || reboot_type ==1 )
Restart(reboot_type );
return(0);
}

This c restart program will teach you some deep understanding of rebooting concepts in computers. This C programming tutorial will let you know how we can reboot(cold or warm boot), computer with the help of sample c  program. This C program after executing will reboot your pc. You can restart the computer with two options, either clod boot or warm boot, once you will pass your option as argument your computer will reboot either cold or warm.
Cold-booting refers to when power is cycled “off” and then “on” without letting a computer shut down cleanly, or, if available, pressing the “reset” button, A hard reboot (also known as a cold reboot, cold boot or cold start) involves power cycling a computer or otherwise forcibly resetting the state of its hardware. A hard reboot may be commenced by disconnecting a power cord or battery, toggling a hardware power switch or pressing a dedicated reset button. A hard reboot may be caused by power failure, by accident or deliberately as a last resort to reset an unresponsive system or in case of a critical error.
Definition from Wikipedia

A soft reboot (also known as a warm reboot) involves restarting a computer "normally" under software control, without power cycling the machine or (directly) triggering a hardware-based reset. It usually, though not always, refers to an orderly shutdown and restart of the machine that includes safely flushing of any cached write operations to persistent storage.
Definition from Wikipedia
Go through this c restart program and enjoy! Stay tuned for more
 

14 comments:

  1. A single point I just would like to say is the fact your Blog is so ideal valuable for us.

    ReplyDelete
  2. Great post. All readers will definitely like this post. Looking forward for your next post.

    ReplyDelete
  3. Your tips are extremely valuable. Thanks a lot for writing this post.Thanks a lot for sharing. Keep blogging.

    ReplyDelete
  4. Great article …Thanks for your great information, the contents are quiet interesting. I will be waiting for your next post.

    ReplyDelete
  5. I really appreciate your professional approach. These are pieces of very useful information that will be of great use for me in future.

    ReplyDelete
  6. Valuable info. Lucky me I found your web site by chance, and I'm stunned why this accident did not took place earlier! I bookmarked it.

    Visit my web-site graduate certificate online

    ReplyDelete
  7. I seriously consider this site needs much more attention.

    ReplyDelete
  8. A person essentially help to make seriously articles I would state.
    This is the very first time I frequented your website page and up to now?

    I amazed with the research you made to create this actual submit incredible.
    Fantastic job!

    Stop by my blog: diets that work fast for women

    ReplyDelete
  9. My spouse and I stumbled over here from a different website and thought I may as well check things out.

    I like what I see so now i'm following you. Look forward to looking at your web page repeatedly.

    my webpage - best diet

    ReplyDelete
  10. Thanks for sharing with us..

    ReplyDelete
  11. This tools are very useful for me for that really thanks for sharing with us.

    ReplyDelete
  12. I will probably be back again to browse much more, many thanks for the data.

    ReplyDelete
  13. I enjoyed all the information you provided and appreciated the work you did in getting it written. You evidentially did a lot of research.

    ReplyDelete
  14. Nice Post. I simply stumbled upon your blog and wanted to say that I have really enjoyed browsing your weblog posts. After all I’ll be subscribing on your feed and I am hoping you to write again very soon!

    ReplyDelete