Skip to content

Add Stack, Boolean, and Math functions. With unit tests.#3

Open
NeilFraser wants to merge 5 commits intomainfrom
Comparison
Open

Add Stack, Boolean, and Math functions. With unit tests.#3
NeilFraser wants to merge 5 commits intomainfrom
Comparison

Conversation

@NeilFraser
Copy link
Copy Markdown
Owner

An interesting and flexible way to do ==, !=, <, >, <=, and >= comparison operators.
Fully tested.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a small set of stack-based comparison helpers to the Apps/Blockly.agc runtime so Blockly-generated programs can implement ==, !=, <, >, <=, >= via simple chained TCR calls.

Changes:

  • Added OP-EQ plus suffix helpers (OP-LTE, OP-GTE, OP-NEG) to implement all six comparison operators.
  • Introduced DROP as a companion to POP for stack manipulation.
  • Renamed the T4 interrupt wakeup label to T4WAKEUP and tightened a couple of inline comments in SLEEP.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NeilFraser NeilFraser changed the title Add six equality operators. Add Stack, Boolean, and Math functions. With unit tests. Mar 29, 2026
@NeilFraser NeilFraser requested a review from Copilot March 29, 2026 21:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


# SU subtracts a number from the 'A' register, must be in EraseableMem(0ct 0-1777)
# SU subtracts a number from the 'A' register,
# must be in Eraseable Memory (OCT 0-1777)
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: 'Eraseable' should be 'Erasable' (one 'e'). Consider also keeping the phrasing consistent with other docs/comments (e.g., 'Erasable memory (OCT 0–1777)').

Suggested change
# must be in Eraseable Memory (OCT 0-1777)
# must be in Erasable memory (OCT 0-1777)

Copilot uses AI. Check for mistakes.

# T5 (interrupt #2)
XCH ARUPT
CA 100MS # Reschedule T5 soon.
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the T5 interrupt handler, other apps in this repo reschedule the timer with CAF 100MS (e.g. Apps/Minimal.agc, Apps/Print.agc). Using CA 100MS here may be incorrect or at least inconsistent with that established interrupt pattern. Consider switching this reschedule load back to CAF to match the convention and avoid any bank/addressing surprises in interrupt context.

Suggested change
CA 100MS # Reschedule T5 soon.
CAF 100MS # Reschedule T5 soon.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants