??? 04/16/10 00:51 Modified: 04/16/10 00:54 Read: times |
#175080 - incorrect addressing method Responding to: ???'s previous message |
As Jan was trying to tell you, you are trying to DIRECTLY access ram that can only be accessed INDIRECTLY. SFR's (Special Function Registers) and INDIRECT ram share the same address space, 080h to 0FFh. The SFR's are accessed DIRECTLY while the ram with the same addresses can only be accessed INDIRECTLY, that is, by using R0 or R1 as a pointer. At label ELEGXOSCODE1: you are trying to place the contents of locations 91 - 94 into the Accumulator using DIRECT ACCESS. It won't work right because you are actually moving the contents of whatever SFR is at that address. You need to set up R0 or R1 as a pointer to ram location 91 - 94. Something like:
mov R0, #91h mov A, @R0 . . inc R0 mov A, @R0 . . and so on... |
Topic | Author | Date |
Problem with succesive memory locations | 01/01/70 00:00 | |
Debugging | 01/01/70 00:00 | |
How can i see the code of pressed key | 01/01/70 00:00 | |
Turn them into ASCII | 01/01/70 00:00 | |
Or use 2 characters | 01/01/70 00:00 | |
direct access to >80h => SFR | 01/01/70 00:00 | |
incorrect addressing method | 01/01/70 00:00 | |
(back to) basics - "bible" time | 01/01/70 00:00 | |
Hal Albach's way | 01/01/70 00:00 | |
It works | 01/01/70 00:00 | |
You are not showing enough | 01/01/70 00:00 | |
the danger of uniformity![]() | 01/01/70 00:00 |