??? 12/04/04 21:15 Read: times |
#82537 - Re:Relocatable Responding to: ???'s previous message |
Because AJMP uses "current page" so if your OS loads the program on start of the page, AJMP will jump within the same page, that is within your loaded program (and if the program spans several pages, the flow must pass to the next page either by SJMP or other relative jump, or by standard program flow.) It's still "relative address", just relative only to the start of the page (and we assume that's where the program is loaded in this case), not to arbitrary memory location like SJMP. Using LJMP would cause jump to a fixed, absolute location. Of course you could use it i.e. to abandon the program and return control to the OS (if you don't use RET), but otherwise any absolute jump like LCALL would most probably lead outside the program, to a fixed address while the program is located at a dynamically assigned one.
Similarly, LCALL then could be used to call the OS routines while ACALL would be useful for local ones. |
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 |