??? 04/14/04 21:53 Read: times |
#68499 - RE: STARTUP.A51 Responding to: ???'s previous message |
The flaw in the code is that it clears R0 as the last thing. R0 then gets decremented to FF and the whole loop starts over. But this time the loop starts at address FFh, which is the stack area. Crash!
Why? Because the R0 register is located at memory address 00h, R1 at 01h, etc. The registers on the 51 series CPU's exist at the lower addresses in RAM. Read up on register banks and the memory architecture. Change your code to MOV R0, #IDATALEN-2 and try it again. Rgs, Steve |
Topic | Author | Date |
Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
STARTUP.A51 | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
Stand Still... | 01/01/70 00:00 | |
RE: Stand Still... | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
function for LCD in C... | 01/01/70 00:00 | |
RE: function for LCD in C...![]() | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 |