16 bit Assembly

Home   Site Map   Instruction Index  


OR   - OR Bitwise Instruction

The OR Instruction performs an OR action with the second operand on the first operand.
The first operand holds the result of this operation. All matching bits of 0 are retained, all other non-matching bits and 1's become 1.
This command has 3 parts, Instruction, then either operand can be a Register or Immediate value or a memory address. However 2 memmory addresses cannot be used together.

Assembly Sample Description   16 bit Machine Code
OR AL, 0x03 ;  8 bit immediate number with AL   0C 03
OR AX, 0x0003 ;  16 bit immediate number with AX   0D 03 00
OR BL, 0x03 ;  8 bit immediate number with Register   80 C3 03
OR BX, 0x0003 ;  16 bit immediate number with Register   81 CB 03 00
OR [BX], 0x03 ;  8 bit immediate number with memory address   80 0F 03
OR [BX], 0x0003 ;  16 bit immediate number with memory address   81 0F 03 00
OR AL, BL ;  8 bit Registers   08 D8
OR BL, AL ;  8 bit Registers   0A D8
OR AX, BX ;  16 bit Registers   09 D8
OR BX, AX ;  16 bit Registers   0B D8
OR [BX], AX ;  Register to memory address   09 07
OR AX, [BX] ;  Memory address to Register   0B 07
OR [BX+2], AX ;  Register to   09 47 02
OR AX, [BX+2] ;  Memory address and offset to Register   0B 47 02




Last Update 06/02/2023