Bit manipulations

Z MAM wiki

Přejít na: navigace, hledání

See AVR Instruction Set Manual for details of instructions.

These are the basic instructions you want to know:

  • LSL, LSR, ASR, ROL, ROR - shifts and rotations
  • AND, OR, EOR, ANDI, ORI - logical functions bit-per-bit (usable with hex masks)

These are special for small chips but quite handy (last resort if those above are not good):

  • BST, BLD - one-bit moves via T flag

And you can also use:

  • SWAP
Osobní nástroje