Skip to content

Implement BIOR instruction #95

@craigthomas

Description

@craigthomas

Implement the BIOR 6309 instruction mnemonic in the assembler. Logically ORs the specified bit in the A, B, or CC with an inverted 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 - $1133, 4 bytes

Example:

BIOR B,2,4,$40

The above would OR bit 4 of B with the inverted value of 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 33 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