LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-23-2002, 08:24 AM   #1
rao
LQ Newbie
 
Registered: Jun 2002
Location: Malaysia
Posts: 14

Rep: Reputation: 0
Thumbs up CMOS program


Hi friends,

I am requesting one small(may be difficult) program.

How to write CMOS program in 'C'?. I ran one loop
for(int i = 0; i<=100; i++)
{
printf("%d",i);
sleep(5);
}

at the 45th time power failure, After recovering power, I ran same application. This time i want continue from 45th.. How to write this program.

Thanks & Regards
 
Old 10-23-2002, 09:42 AM   #2
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
Unless you write your counter to a file for each iteration through your loop, you can't resume the count after a power failure. Since the program is running in memory, a power failure will wipe memory.

Unless I don't understand the full question that you're asking .
 
Old 10-24-2002, 11:52 AM   #3
rao
LQ Newbie
 
Registered: Jun 2002
Location: Malaysia
Posts: 14

Original Poster
Rep: Reputation: 0
Dear jglen490,
U did not understand my problem. Already i told as this is CMOS program. I will agree every applications running in memory. My problem is not belong to memory. My problem belong to CMOS.
Try to understand and if you got answer then give reply. Any how
thanks for responding
 
Old 10-28-2002, 06:44 AM   #4
rao
LQ Newbie
 
Registered: Jun 2002
Location: Malaysia
Posts: 14

Original Poster
Rep: Reputation: 0
Hello every one... pls help me above problem
 
Old 10-28-2002, 08:27 AM   #5
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
Regardless of where the program resides, you must have a means of storing the counter outside of volatile memory. If this program does not use disk storage in any way, then the counter must be written to some sort of non-volatile storage to preserve it between program runs. So I imagine that you must have data space available somewhere, perhaps on the chip itself, with a specific address range that can be used as a storage location.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cmos denning Linux - Hardware 3 10-13-2005 10:12 AM
CMOS checksum error? slackwarefan Slackware 13 09-16-2004 01:58 PM
Problems with CMOS brokenflea Linux - Hardware 3 08-30-2004 09:07 AM
cmos fried? tzonga1 Linux - Hardware 8 12-27-2003 10:39 AM
Getting into cmos settings CINIMON Linux - Newbie 3 01-08-2003 11:59 PM


All times are GMT -5. The time now is 02:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration