#91865 - Dwedit - Mon Jul 10, 2006 8:37 am
Does GCC have an equivalent to ARM SDT's MAP directive? PocketNES heavily uses this feature, and it would be hard to do without it.
The MAP directive takes in a register, then defines offsets from that register.
for example:
MAP 0,r11
nes_ram # 0x800
nes_sram # 0x2000
chr_decode # 0x400
...
Here nes_sram becomes [r11+0x800] when used in an instruction like ldr r0,nes_sram
But also you can do ldr r2,nes_sram+4, and it will just work. You can also use the ADR instruction to generate an address (it just turns it into addition).
Any equivalents in GCC?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
The MAP directive takes in a register, then defines offsets from that register.
for example:
MAP 0,r11
nes_ram # 0x800
nes_sram # 0x2000
chr_decode # 0x400
...
Here nes_sram becomes [r11+0x800] when used in an instruction like ldr r0,nes_sram
But also you can do ldr r2,nes_sram+4, and it will just work. You can also use the ADR instruction to generate an address (it just turns it into addition).
Any equivalents in GCC?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."