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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/25/04 08:33
Read: times


 
#65475 - RE: homework problem-
Responding to: ???'s previous message
hi,
let me say that your code has alot of errors. I may post you corrected example but better do it yourself.

1) it is possible to read and calculate the sum inside one loop; why do you use two ones? HINT: use two registers, for example, R2/R3 as sum16 accumulator.
2) look at the first loop (DONE). There is R0 which is initialized with #0x50 at the each itteration and not incremented during the loop. Take its initialization off from the loop body and insert INC R0 as well.
3) Now about second loop called NEXT. You setup counter to value #32. Why? Look at the begin of the loop; ask yourself: which value should I put into R7 if I need to calculate the sum of two bytes only? Yes! You need to put value equal to "number of bytes - 1", i.e. #31 here.

Regards,
Oleg


List of 8 messages in thread
TopicAuthorDate
homework problem-            01/01/70 00:00      
   RE: homework problem-            01/01/70 00:00      
      RE: homework problem-            01/01/70 00:00      
      RE: homework problem-            01/01/70 00:00      
         RE: homework problem-            01/01/70 00:00      
   RE: homework problem-            01/01/70 00:00      
   RE: homework problem-            01/01/70 00:00      
   RE: homework problem-            01/01/70 00:00      

Back to Subject List