Skip to content

Implement BEOR instruction #92

@craigthomas

Description

@craigthomas

Implement the BEOR 6309 instruction mnemonic in the assembler. Logically XORs the specified bit in the A, B, or CC with a bit in memory. Result is stored in the source register. Direct addressing mode only. The first two bytes of the instruction are the instruction code, the next byte is a postbyte, and the last byte is the address least significant byte.

Direct - $1134, 4 bytes

Example:

BEOR B,2,4,$40

The above would XOR bit 4 of B with bit 2 of DP:40, storing the result in B. Note the strange order here - following B you specify the bit in the memory location, followed by the bit in the register. The resulting machine code would be:

11 34 A2 40

The postbyte is composed of the following sections:

  • Bits 7-6: register code where 00 = CC, 01 = A, 10 = B, 11 = invalid
  • Bits 5-3: the bit number (0-7) in memory
  • Bits 2-0: the bit number (0-7) in the register

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions