Doc Bot

Download | Tutorials | Instruction Set | Hardware Reference
Introduction | About Doc Bot | Site Map | Search | Use License | Contact Us
Download
Screenshots
Table Of Contents | Addressing Modes | Memory Model | External Ports | Instruction Set | Hardware Reference | Turn Cycles | File format
Table Of Contents | Introduction | Types Of Memory | Special Function Registers | Basic Registers | Addressing Modes | Program Flow | Timers | External Ports | Interrupts | Power Control Modes | Hardware Components
Table Of Contents | Calculate Square Roots | Safe Division

Documentation

small logo

Logical Instructions

ORL (#|&|@|R|@R)op1 (#|&|@|R|@R)op2
  • Opcode: 0x42
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Logical op1 OR op2

Does a bitwise OR on the values of op1 and op2 and stores the result in the memory address pointed to by op1. The value of op2 is not affected. A logical OR compares the bits of each operand and sets the corresponding bit in the resulting value if the bit was set in either of the original operands, otherwise the resulting bit is cleared.

ANL (#|&|@|R|@R)op1 (#|&|@|R|@R)op2
  • Opcode: 0x52
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Logical op1 AND op2

Does a bitwise AND on the values of op1 and op2 and stores the result in the memory address pointed to by op1. The value of op2 is not affected. A logical AND compares the bits of each operand and sets the corresponding bit in the resulting value only if the bit was set in both of the original operands, otherwise the resulting bit is cleared.

XRL (#|&|@|R|@R)op1 (#|&|@|R|@R)op2
  • Opcode: 0x62
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Logical op1 XOR op2

Does a bitwise EXCLUSIVE OR on the values of op1 and op2 and stores the result in the memory address pointed to by op1. The value of op2 is not affected. A logical EXCLUSIVE OR compares the bits of each operand and sets the corresponding bit in the resulting value if the bit was set in either (but not both) of the original operands, otherwise the bit is cleared.

CPL (#|&|@|R|@R)op1
  • Opcode: 0xF4
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Complement op1

Complements the value of op1 leaving the result in op1. A logical complement reverses the state of all the bits of the operand.

RR (#|&|@|R|@R)op1
  • Opcode: 0x03
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Right shift op1

Shifts the bits of memory address op1 to the right. The right-most bit is loaded into the left-most bit.

RRC (#|&|@|R|@R)op1
  • Opcode: 0x13
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Right shift op1 with carry

Shifts the bits of memory address op1 to the right. The right-most bit is loaded into the Carry Flag (C) and the Carry Flag is loaded into the left-most bit.

RL (#|&|@|R|@R)op1
  • Opcode: 0x23
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Left shift op1

Shifts the bits of memory address op1 to the left. The left-most bit is loaded into the right-most bit.

RLC (#|&|@|R|@R)op1
  • Opcode: 0x33
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Left shift op1 with carry

Shifts the bits of memory address op1 to the left. The left-most bit is loaded into the Carry Flag (C) and the Carry Flag is loaded into the right-most bit.

CLR (#|&|@|R|@R)op1
  • Opcode: 0xC3
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Clear op1

Clears the memory address pointed to by op1 by setting it to 0x0000.

See also:
ANLB | ORLB | XRLB | CPLB | CLRB

Introduction | About Doc Bot | Site Map | Search | Use License | Contact Us
©2009 Daniel Julivert