??? 12/03/04 19:36 Read: times |
#82492 - Relocable. Responding to: ???'s previous message |
Not worth much if the '51 works as standard, single-purpose, "program once, use forever" embedded chip, but if you want to create something like OS, where you allocate memory for an application/module, then load it into that memory from some external sources, and the memory allocation address isn't know earlier, you have two options - either first (just before, during or just after loading into the memory) pass the program through some preprocessor that would adjust all addresses - slow, bulky, error-prone solution, or just write the programs/modules so they can be relocated - using only relative addressesing modes - sjmp, cjne, djnz, @A+PC etc, so no matter where the program is located in the memory, it behaves just the same. Of course if the allocation is more "stiff", i.e. your OS allocates whole 2K pages and loads the modules at the beginning of given page, your program can use AJMP but not LJMP etc. |
Topic | Author | Date |
sjmp vs ajmp | 01/01/70 00:00 | |
as you said | 01/01/70 00:00 | |
Different jmps | 01/01/70 00:00 | |
re:AJMP, SJMP | 01/01/70 00:00 | |
AJMP is 2 bytes LJMP is 3 | 01/01/70 00:00 | |
LJMP was not the question | 01/01/70 00:00 | |
AJMP vs SJMP | 01/01/70 00:00 | |
Relocable. | 01/01/70 00:00 | |
relocatable | 01/01/70 00:00 | |
Re:Relocatable | 01/01/70 00:00 | |
relocatable - not in a 51 | 01/01/70 00:00 | |
Relocatable Code is Valid | 01/01/70 00:00 | |
Not JMPs, relocatable | 01/01/70 00:00 | |
I can anticipate all kinds of situations | 01/01/70 00:00 | |
If I can devise concepts others will too | 01/01/70 00:00 | |
"driver". | 01/01/70 00:00 | |
Re: driver | 01/01/70 00:00 | |
maybe... maybe not.![]() | 01/01/70 00:00 | |
16M derivatives... | 01/01/70 00:00 | |
SJMP is 2 bytes | 01/01/70 00:00 | |
Maybe he means additional bytes | 01/01/70 00:00 | |
yes. | 01/01/70 00:00 |