Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement BIOR instruction #95

Open
craigthomas opened this issue Jul 9, 2023 · 0 comments
Open

Implement BIOR instruction #95

craigthomas opened this issue Jul 9, 2023 · 0 comments

Comments

@craigthomas
Copy link
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant