0b1 is the bitmask (in binary), the same as 0x01 in the "shift and mask" code I sent. Since the bit you want is already in the least significant location in a byte, you don't really have to shift it first. You can do the move and mask with a single AND instruction.
On 6/21/2014 7:57 AM, Manuel Berro Madero wrote: > Why 0b1? > > > > > On 06/21/2014 01:40 AM, TJF wrote: >> Am Samstag, 21. Juni 2014 01:37:20 UTC+2 schrieb Manu: >> >> I need to read the bit r31.t16 and capture the current state >> either 1 or 0 and set it to r3 >> >> Try >> >> AND r3, r31.b2, 0b1 >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "BeagleBoard" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/beagleboard/PzuzGgfGvBU/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] >> <mailto:[email protected]>. >> For more options, visit https://groups.google.com/d/optout. > -- Charles Steinkuehler [email protected] -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
