Hey, I'm reading JPAN's THUMB Tutorial, but I'm having a problem to understand something here
.align 2
.thumb
Make_address: push{r1-r3,lr}
lsl r0, r0, #0x20 @this is how I clean registers
add r0, r0, #0x08
lsl r1, r0, #0x8 @this will make the 0x8 we placed become a 0x800
lsr r0, r0, #0x4 @this also cleans the register because 0x8 is 1000b
add r2, r0, 0x0 @cleans r2. purely for educational purposes
add r1, r0, #0x80 @r1 now has 0x880
lsl r1, r1, #0x10 @r1 was pushed left 0x08800000
and r0,r2 @not needed, but educational. X And 0 = 0. another way @to clean variables
lsr r0,r1,#0x0 @places r0 in r1, another way I use to move them around
Pop{r1-r3}
Pop {pc}
Why does "lsl r1, r0, #0x8" results 0x800?
Why does "lsr r0,r1,#0x0" places r0 in r1? Shouldn't it places r1 in r0?
I guess it's a typo because "add r2, r0, 0x0" should be "add r2, r0, #0x0"?
.align 2
.thumb
Make_address: push{r1-r3,lr}
lsl r0, r0, #0x20 @this is how I clean registers
add r0, r0, #0x08
lsl r1, r0, #0x8 @this will make the 0x8 we placed become a 0x800
lsr r0, r0, #0x4 @this also cleans the register because 0x8 is 1000b
add r2, r0, 0x0 @cleans r2. purely for educational purposes
add r1, r0, #0x80 @r1 now has 0x880
lsl r1, r1, #0x10 @r1 was pushed left 0x08800000
and r0,r2 @not needed, but educational. X And 0 = 0. another way @to clean variables
lsr r0,r1,#0x0 @places r0 in r1, another way I use to move them around
Pop{r1-r3}
Pop {pc}
Why does "lsl r1, r0, #0x8" results 0x800?
Why does "lsr r0,r1,#0x0" places r0 in r1? Shouldn't it places r1 in r0?
I guess it's a typo because "add r2, r0, 0x0" should be "add r2, r0, #0x0"?