• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
Storm13
Reaction score
0

Profile posts Latest activity Postings About

  • Hi, unfortunately I don't exactly have the time these days to take on a student. Like I suggested to you earlier on IRC, I think you should just dive intro trying something especially if you've read the tutorials.
    Consider we have a register r0 = 88XXXXXX where the Xs is the data we want.

    Bit shifting:
    lsl r0, r0, #0x8
    lsr r0, r0, #0x8
    -- with two instructions R0 now contains the Xs.

    Bit masking:
    ldr r1, = (0xFFFFFF)
    and r0, r0, r1
    -- Now we have R0 with the Xs too.

    So to answer your question, yeah, you bit mask it as well. Though it's better to use lsl and lsr in most cases, because they don't require a second register to set up the mask, and lsl with an immediate like this is only takes 1 CPU cycle to execute (the fastest an instruction runs).
  • Loading…
  • Loading…
  • Loading…
Back
Top