I am new to coding in the ARM architecture (AM1808 Experimenter's Kit w/ CCS5.5). Previous experience is with assembly code on Microchip products.
I am having difficulty determining the best way to control memory mapped control register bits using assembly commands. I cannot find any example assembly code which suggests there are mnemonics for the registers (for instance the GPIO DIRx registers). Please let me know if I am mistaken. This leads me to believe that I need to reference the 32 bit memory location for the register in question using the LDR command. Would you please suggest the most efficient way to do this?
This is my current strategy but seems unnecessarily complicated:
Load a register with the 32 bit register address by separating the address using 8 bit evenly rotated MOV commands to separate registers followed by AND commands to synthesize the full address. Then write to this address.
The ARM literature suggests that LDR can be used to simplify the above using immediate addressing and literal pools. I have not found this to work in CCS5.5. I am aware that their mnemonics are not exactly the same as those used by CCS5.5.
Please let me know what is best.
Thanks,
Aaron