Scott Perretta
Scott Perretta

Reputation: 39

What is the different between or and ori in assembly language?

I'm doing a homework assignment and I am puzzled with which one I should use. What does the i add to the command.

Upvotes: 2

Views: 10622

Answers (1)

Jonathon Reinhart
Jonathon Reinhart

Reputation: 137398

  • OR performs the bitwise OR operation between two registers.
  • ORI performs the bitwise OR operation between one register, and an immediate value

If you have two registers you want to OR together, then use OR. If you want to OR a register with some constant value, use ORI.

Questions like this should always be addressed by first consulting an instruction set reference.

Upvotes: 8

Related Questions