??? 04/13/11 17:00 Read: times |
#181863 - I have tested !! Responding to: ???'s previous message |
Per Westermark said:
First thing - don't write comments that describe an assembler instruction. Tell why instead. ok I will try it. Per Westermark said:
We can see that you store a value into R0. We can see the value 25. So why duplicate the information in the comment? Why not a comment saying "Set up number of bytes to receive"? ok thank you Per Westermark said:
Why a comment "Wait for 8051 to set the RI flag"? Why not a comment "Wait for a character to be received"? Shouldn't you write comments that tell what/why the program does, instead of comments telling what the instruction does? ok I will try it. Per Westermark said:
Another thing - what happens if you only get 24 bytes and then a pause? What do you do? Wait for next transmission of 25 characters to eat the first character? This is fix, I must take 25 bytes, there is no way to take more bytes. If I take less bytes there is a problem that I must see it. Per Westermark said:
Next - your code can't work because you haven't even used pen and paper and tried it out. You think so ?? Per Westermark said:
You have a loop that you intend to run for 25 turns. So why do you load DPTR with 0xfe00 each time and use this address for storage and then increment DPTR? What happens with your increment when you once more loads DPTR with the original value again? Yes, is not happen what I would like. I thought it would increase the adrress at a time. |