Difference between revisions of "Assembler:Commands:OR"

From Cheat Engine
Jump to navigation Jump to search
m (Reverted edits by This content is not available (Talk) to last revision by TheyCallMeTim13)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category:Assembler]]
 
'''command''' or ''destination'', ''source''
 
'''command''' or ''destination'', ''source''
  
Line 16: Line 17:
 
Performs a bitwise inclusive OR operation between the destination (first) and source (second) operands and stores the result in the destination operand location. The source operand can be an immediate, a register, or a memory location; the destination operand can be a register or a memory location. (However, two memory operands cannot be used in one instruction.) Each bit of the result of the OR instruction is set to 0 if both corresponding bits of the first and second operands are 0; otherwise, each bit is set to 1.
 
Performs a bitwise inclusive OR operation between the destination (first) and source (second) operands and stores the result in the destination operand location. The source operand can be an immediate, a register, or a memory location; the destination operand can be a register or a memory location. (However, two memory operands cannot be used in one instruction.) Each bit of the result of the OR instruction is set to 0 if both corresponding bits of the first and second operands are 0; otherwise, each bit is set to 1.
  
[http://x86.renejeschke.de/html/file_module_x86_id_219.html x86.renejeschke.de/html/file_module_x86_id_219.html]
+
[http://c9x.me/x86/html/file_module_x86_id_219.html c9x.me/x86/html/file_module_x86_id_219.html]
 
</div>
 
</div>
  
Line 62: Line 63:
 
  or [SomeSymbol],rax
 
  or [SomeSymbol],rax
  
== See also ==
+
{{AssemblerCommandSeeAlso}}
* [[Assembler]]
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 
* [[Assembler:Commands|Assembler Commands]]
 
  
== External links ==
+
{{Template:AssemblerCommandExternalLinks}}
* [https://wikipedia.org/wiki/X86_instruction_listings wikipedia.org/wiki/X86_instruction_listings]
 
* [https://wikibooks.org/wiki/X86_Assembly/Other_Instructions wikibooks.org/wiki/X86_Assembly/Other_Instructions]
 
* [http://x86.renejeschke.de/ x86.renejeschke.de]
 
* [http://www.asmpedia.org/index.php?title=Main_Page asmpedia.org]
 

Latest revision as of 19:07, 18 March 2019

command or destination, source

The OR instruction is used for supporting logical expression by performing bitwise OR operation. The bitwise OR operator returns 1, if the matching bits from either or both operands are one. It returns 0, if both the bits are zero.

destination = destination | source

Example:

|             destination:     0101 |
|                  source:     0011 |
|-----------------------------------|
| After OR -> destination:     0111 |

The OF and CF flags are cleared; the SF, ZF, and PF flags are set according to the result. The state of the AF flag is undefined.


Performs a bitwise inclusive OR operation between the destination (first) and source (second) operands and stores the result in the destination operand location. The source operand can be an immediate, a register, or a memory location; the destination operand can be a register or a memory location. (However, two memory operands cannot be used in one instruction.) Each bit of the result of the OR instruction is set to 0 if both corresponding bits of the first and second operands are 0; otherwise, each bit is set to 1.

c9x.me/x86/html/file_module_x86_id_219.html


Command Parameters[edit]

Parameter Description
destination The destination operand
source The source operand


Examples[edit]

or al,1
or ax,1
or ax,1
or eax,1
or rax,1
or al,al
or ax,ax
or ax,ax
or eax,eax
or rax,rax
or [eax],eax
or [rax],rax
or [00123ABC],eax
or [SomeSymbol],rax

See also[edit]

External links[edit]