#81257 - racarate - Fri Apr 28, 2006 12:23 am
Hi, I am just starting to learn ARM7.
Is it possible to acess only one byte?
_________________
Neko: I love meow-tain climbing!
Need anything? I'll even save your game!
#81261 - DekuTree64 - Fri Apr 28, 2006 12:38 am
Yes, you can read bytes, halfwords (2 bytes), and words (4 bytes). All registers are 32-bit though, so bytes and halfwords are zero or sign extended when loaded.
There is one catch though, that VRAM can't do byte access. You can actually read bytes because the CPU handles fetching only 8 bits from the bus, but if you try to write a byte to VRAM it will write 2 bytes instead.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#81267 - DekuTree64 - Fri Apr 28, 2006 1:05 am
Looks like that article is about some fancy new IBM chip.
One thing to note about ARM processors is that you can only read from an address aligned to the size you're reading. Like, halfword access must be on 2 byte boundaries. If you read from an odd address, the upper and lower bytes get swapped.
I have worked on a system before that ONLY had 2 byte access though. Quite fun actually, but ARM is much nicer :)
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku