Skip to content

Implement BRGE and BRLT signed branch instructions #10

Closed

Description

@sql-hkr

Currently, our Tiny8 CPU simulator supports unsigned branch instructions such as BRCS and BRCC.
To fully support signed comparisons, we need to implement the BRGE (Branch if Greater or Equal,
Signed) and BRLT (Branch if Less Than, Signed) instructions.

Tasks:

  • Implement BRGE to branch when Rd >= Rr for signed integers.
  • Implement BRLT to branch when Rd < Rr for signed integers.
  • Ensure the instructions correctly use the S flag (S = N xor V) from SREG.
  • Add unit tests demonstrating signed comparisons.

References:

Activity

  1. linked a pull request that will close this issueAdd BRGE and BRLT branch instructions (#10) #11on Oct 25, 2025
  2. added a commit that references this issue on Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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