Skip to content

Implement instruction: Bcc #13

@tjhancocks

Description

@tjhancocks

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

If the specified condition is true, program execution continues at location (PC) + displacement. The program counter contains the address of the instruction word for the Bcc instruction plus two. The displacement is a twos-complement integer that represents the relative distance in bytes from the current program counter to the destination program counter. If the 8-bit displacement field in the instruction word is zero, a 16-bit displacement (the word immediately following the instruction) is used. If the 8-bit displacement field in the instruction word is all ones ($FF), the 32-bit displacement (long word immediately following the instruction) is used. Condition code cc specifies one of the following conditional tests (refer to Table 3-19 for more information on these conditional tests):

Mnemonic Condition
CC(HI) Carry Clear
CS(LO) Carry Set
EQ Equal
GE Greater or Equal
GT Greater Than
HI High
LE Less or Equal
LS Low or Same
LT Less Than
MI Minus
NE Not Equal
PL Plus
VC Overflow Clear
VS Overflow Set

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