Skip to content

Implement instruction: BCHG #14

@tjhancocks

Description

@tjhancocks

Feature Request
An implementation for the BCHG instruction needs to be added to the emulation layer. Below is a brief description of the BCHG instruction taken from the M68000 Programmers Reference Manual.

Tests a bit in the destination operand and sets the Z condition code appropriately, then inverts the specified bit in the destination. When the destination is a data register, any of the 32 bits can be specified by the modulo 32-bit number. When the destination is a memory location, the operation is a byte operation, and the bit number is modulo 8. In all cases, bit zero refers to the least significant bit. The bit number for this operation may be specified in either of two ways:

  1. Immediate—The bit number is specified in a second word of the instruction.
  2. Register—The specified data register contains the bit number.

Describe the solution you'd like
The solution should match the existing conventions and patterns used by other implemented instructions. At the time of reporting this only includes the ABCD instruction.

Describe alternatives you've considered
N/a

Additional context
N/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions