Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/03/05 17:20
Read: times


 
#98778 - 1) no it is not the weekly puzzle, that
Responding to: ???'s previous message
1) no it is not the weekly puzzle, that is on hold till when and if Craig establishes a format for everybody to submit puzzles.

2) what is wrong is that it will very likely hang you, the solution (sketched in C - same principle should be in asm)
for (timeout = some high number; timeout !=0 ; timeout--)
{
  if (RI) break;
}
if (!RI) timeout_error(HERE); // this routine does not return
else
{
RI = 0;
...
...
}

// this routine does not return
// it reports the error and times the watchdog out to reset the processor
void timeout_error(U8 where){
...
...
Erik

PS note the neat use of the "break" instead of packing all conditions into the for loop. It makes the program soooo much more readable.

List of 39 messages in thread
TopicAuthorDate
Coding competition idea            01/01/70 00:00      
   YES!            01/01/70 00:00      
      That would be            01/01/70 00:00      
   In progress            01/01/70 00:00      
      I have a few, but            01/01/70 00:00      
         Last post            01/01/70 00:00      
            C-illiteracy            01/01/70 00:00      
               C-illiterate (non) anonymous            01/01/70 00:00      
                  Where can I get it?            01/01/70 00:00      
                     8051, AVR, (ARM ? ) and Rabbit            01/01/70 00:00      
                        Embedded Pascal et al            01/01/70 00:00      
                           Modula            01/01/70 00:00      
         same thing here            01/01/70 00:00      
         <10k, ???            01/01/70 00:00      
            not a html tag proble            01/01/70 00:00      
               Quote problem            01/01/70 00:00      
                  Escape sequence            01/01/70 00:00      
         Derivatives, languages, and voting            01/01/70 00:00      
         derivatives            01/01/70 00:00      
            Derivatives            01/01/70 00:00      
               this is it!            01/01/70 00:00      
                  I can't            01/01/70 00:00      
               Issues with C challenges            01/01/70 00:00      
                  an example            01/01/70 00:00      
                     I was wrong on both points            01/01/70 00:00      
                        answer            01/01/70 00:00      
                           actually I do not because ...            01/01/70 00:00      
                     puzzle?            01/01/70 00:00      
                        Wondering same thhong            01/01/70 00:00      
                           1) no it is not the weekly puzzle, that            01/01/70 00:00      
                              depends on usage            01/01/70 00:00      
                                 yes, but not forever            01/01/70 00:00      
                                    wait forever            01/01/70 00:00      
                                       Behave people.            01/01/70 00:00      
                                          That's the good thing            01/01/70 00:00      
                     C challenges            01/01/70 00:00      
                     Hardware problems            01/01/70 00:00      
                  the answer is what gets "marked"            01/01/70 00:00      
                  Null points...            01/01/70 00:00      

Back to Subject List