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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/30/05 17:38
Modified:
  07/30/05 17:41

Read: times


 
#98482 - not correct question
Responding to: ???'s previous message
Erik,

I think this is interest puzzle but I cannot agree with next your sentense:
Erik Malund said:

loop: djnz r7,loop
djnz r6,loop
ret

Little Joe finds out that this works correctly in most cases...

No, this is wrong. This subroutine fails in most cases and will work correctly only with 255 input values of 65536 total ones. This code does exactly required itterations only with numbers 0x0100, 0x0200, 0x0300 etc. By other words, if input value has low byte =0x00 then it is okay excluding 0x0000. All other values produce wrong number of itterations. For example, value 0x0001 produce 65536 itterations, value 0x0101 does no itterations etc.
If I would be him then I delete this code and write 100% correct routine like I described here

So, I think this puzzle has not correct described conditions, sorry.

Regards,
Oleg

List of 32 messages in thread
TopicAuthorDate
This weeks puzzle            01/01/70 00:00      
   This weeks Puzzle            01/01/70 00:00      
   its D-J-N-Z not J-N-Z-D            01/01/70 00:00      
   inc r6            01/01/70 00:00      
      Fails if R6 is Zero            01/01/70 00:00      
   in my point of view :            01/01/70 00:00      
   not correct question            01/01/70 00:00      
   LSB count value lost in first count            01/01/70 00:00      
   Setup R6/R7            01/01/70 00:00      
      why +1?            01/01/70 00:00      
   this is no fun            01/01/70 00:00      
      Thread closed            01/01/70 00:00      
   It is easy Erik!            01/01/70 00:00      
   Ok, you blew it            01/01/70 00:00      
      Not our mistake...            01/01/70 00:00      
         which was done again and again for the i            01/01/70 00:00      
            which the most of might never have noti            01/01/70 00:00      
               Well...            01/01/70 00:00      
                  well,well            01/01/70 00:00      
                  The explanation is:            01/01/70 00:00      
                     Never the intention            01/01/70 00:00      
                     Thoughts            01/01/70 00:00      
                        I really do not know            01/01/70 00:00      
                        discussion after the solution            01/01/70 00:00      
                           Agree            01/01/70 00:00      
                        Please, no sophisticated forum rules!            01/01/70 00:00      
                           agree            01/01/70 00:00      
      Never mind            01/01/70 00:00      
   My old solution:            01/01/70 00:00      
      constant            01/01/70 00:00      
         Re: constant            01/01/70 00:00      
   Re-Cap            01/01/70 00:00      

Back to Subject List