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

Bit Instructions

CLRB (B)op1
  • Opcode: 0xC2
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Clear bit op1

Clears the bit op1 by setting it to 0.

SETB (B)op1
  • Opcode: 0xD2
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Set bit op1

Sets the bit op1 to 1.

ORLB (B)op1 (B)op2
  • Opcode: 0x72
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Logical bit 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 both operands and sets the resulting bit if either of the original operands were set, otherwise the resulting bit is cleared.

ANLB (B)op1 (B)op2
  • Opcode: 0x82
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Logical bit op1 AND op2

Does a bitwise AND on the values of op1 and op2 and stores the result in bit op1. The value of op2 is not affected. A logical AND compares both operands and sets the resulting bit only if both of the original operands were set, otherwise the resulting bit is cleared.

XRLB (B)op1 (B)op2
  • Opcode: 0x63
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Logical bit op1 XOR op2

Does a bitwise EXCLUSIVE OR on the values of op1 and op2 and stores the result in bit op1. The value of op2 is not affected. A logical EXCLUSIVE OR compares both operands and sets the resulting bit if either of the original operands were set (but not both), otherwise the resulting bit is cleared.

CPLB (B)op1
  • Opcode: 0xB2
  • Addresses: 2
  • Flags: none
  • Registers: none
  • Function: Complement bit op1

Complements the value of op1 leaving the result in op1. A logical complement reverses the state of the bit.

JB (B)op1 (&|@|@R)op2
  • Opcode: 0x20
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Jump to op2 if bit op1 set

Jumps to the memory address pointed to by op2 if bit op1 is set.

JNB (B)op1 (&|@|@R)op2
  • Opcode: 0x30
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Jump to op2 if bit op1 not set

Jumps to the memory address pointed to by op2 if bit op1 is not set.

JBC (B)op1 (&|@|@R)op2
  • Opcode: 0x10
  • Addresses: 3
  • Flags: none
  • Registers: none
  • Function: Jump to op2 if bit op1 set and clear it

Jumps to the memory address pointed to by op2 if bit op1 is set, and clears it.

See also:
ANL | ORL | XRL | CPL | RR | RRC | RL | RLC | CLR

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