#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
A single point I just would like to say is the fact your Blog is so ideal valuable for us.
ReplyDeleteGreat post. All readers will definitely like this post. Looking forward for your next post.
ReplyDeleteYour tips are extremely valuable. Thanks a lot for writing this post.Thanks a lot for sharing. Keep blogging.
ReplyDeleteGreat article …Thanks for your great information, the contents are quiet interesting. I will be waiting for your next post.
ReplyDeleteI really appreciate your professional approach. These are pieces of very useful information that will be of great use for me in future.
ReplyDeleteValuable 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.
ReplyDeleteVisit my web-site graduate certificate online
I seriously consider this site needs much more attention.
ReplyDeleteA person essentially help to make seriously articles I would state.
ReplyDeleteThis 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
My spouse and I stumbled over here from a different website and thought I may as well check things out.
ReplyDeleteI like what I see so now i'm following you. Look forward to looking at your web page repeatedly.
my webpage - best diet
Thanks for sharing with us..
ReplyDeleteThis tools are very useful for me for that really thanks for sharing with us.
ReplyDeleteI will probably be back again to browse much more, many thanks for the data.
ReplyDeleteI enjoyed all the information you provided and appreciated the work you did in getting it written. You evidentially did a lot of research.
ReplyDelete