| ??? 01/25/04 01:05 Read: times |
#63299 - RE: Read-modify-write instructions Responding to: ???'s previous message |
Sandor wrote:
What is this bible business? I ask an assembly language question and I'm told by not one but two responses to go read the bible? That's not the sort of response I'd anticipate. Sandor, Anders and I recommended you to have a look at the 'bible' chapters, which you will find, when pushing the 'Links' field at the left of your screen. If you would have pressed this field you would have seen a list of several links. And you would have found those 'bible' chapters links... These pdf-files are called 'bible' chapters, because they explain in every detail how and why this 8051 microcontroller was designed as it is designed. In the 'bible', if we sometimes shorten, you will find many information, which is often omitted in todays data sheets. So, if you want to know something about the port's performance, e.g., having a look into the 'bible' is often very advantegous. You wrote: I wasn't asking WHY the read-modify-write instructions read the latch and not the pin values. The reason for that was obvious to me already. Requires no explanation. What I want to know is WHICH, if not all, read-write-modify instructions do that. And I replied: All instructions listed in your posting are read-modify-write instructions. The instructions read the latch, not the pins, possibly change it and then rewrite it to the latch. You wrote: For the specific case in the program I'm writing, I just wanted to know if changing the source of the information to and/or/xor with the port values from A to a literal hexadecimal number made any difference. And the answer is: No, of course not, Sandor! It would not make any difference. Would anything else make sense? I told you, that the reason for reading the latch instead of pins is to avoid misinterpretation of voltage level at pins. If with 'ANL P1,A' there's a possibility of misinterpretation and because of this the latch is read instead of pin, then there should with 'ANL P2, #data' exist the same possibility of misinterpretation, right? It does not depend on what you call 'source', but on the destination! Whenever the destination operand is a port or port bit, read-modify-write instructions read the latch, not the pin, in order to avoid the possibility of misinterpretation!! Kai |
| Topic | Author | Date |
| Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
| RE: Read-modify-write instructions | 01/01/70 00:00 | |
RE: Read-modify-write instructions | 01/01/70 00:00 |



