Search code examples
assemblyprocessormsp430

MSP430 assembly instructions


I am trying to understand what these instructions do for the MSP 430 processor:

(1) MOV.w  #0x0055,R5
(2)   BIC.w  #0xFFEE,R5
(3)   BIS.w  #0x1144,R5

I haven't been able to find much that explains the assembly instructions and would love to find out what these instructions do and what is stored in the r5 register after each instruction. Could someone explain?


Solution

  • MOV moves a value to the destination. In this case R5 will contain the value 0x0055.

    BIC clears bits in the destination value. If R5 would contain 0x0055 before the instruction, it will contain the value 0x0011. (Think of this as an inversed and instruction).

    BIS sets bits -- this is effectively the same as an or operation. R5 will have the value 0x1155 after this instruction.