#50561 - anoneem - Wed Aug 10, 2005 7:47 pm
Hye!
Here's a small piece of code:
ldr r0, =#0x403
ldrb r1, [r0]
ldr r2, [$403]
My interpretation of it:
1. load an immediate value $403
2. load byte from adress holden by r0
3. load value from adress $00000403
VBA's opinion...
1. Yes, r0 contains 0x403 but...
Instruction was assembled as...
ldr r0, [$08000010]
2. Everything looks nice, but r1 = $e0.
It should (?) be 0 (byte @ 0x403 is)
3. This is the worst.
Assembled as:
ldr r2, [$08000403] (=$03020202)
But r2 is... 01020002
I am sure that goldroad1_7 is OK. Problem is propably in my head - what am i understanding bad in this code?
Here's a small piece of code:
ldr r0, =#0x403
ldrb r1, [r0]
ldr r2, [$403]
My interpretation of it:
1. load an immediate value $403
2. load byte from adress holden by r0
3. load value from adress $00000403
VBA's opinion...
1. Yes, r0 contains 0x403 but...
Instruction was assembled as...
ldr r0, [$08000010]
2. Everything looks nice, but r1 = $e0.
It should (?) be 0 (byte @ 0x403 is)
3. This is the worst.
Assembled as:
ldr r2, [$08000403] (=$03020202)
But r2 is... 01020002
I am sure that goldroad1_7 is OK. Problem is propably in my head - what am i understanding bad in this code?