Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 233705

Forum Post: RE: Jump to address stored in SRAM without the use of registers

$
0
0

Westin,

You will be using the PC as the base address, and you need to put the address within reach of a pc-relative LDR.

So you'll do:

      LDR PC, test_addr

...

test_addr   .word  0x0803FF00

You just need to make sure there's not too much code between the LDR and the '.word'.

This will translate to  LDR PC, [PC, #offset].    I don't remember the reach of the offset off hand but it's not that big.
For a short though this shouldn't be an issue.

You can google 'arm literal pool' and find out more about this method,  we do not however support the '=' syntax in the TI assembler so you have to put the .word in yourself.

 


Viewing all articles
Browse latest Browse all 233705

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>