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

Feature: carry flag for subtract in ALU #4897

Open
jxors opened this issue Apr 16, 2024 · 0 comments
Open

Feature: carry flag for subtract in ALU #4897

jxors opened this issue Apr 16, 2024 · 0 comments

Comments

@jxors
Copy link

jxors commented Apr 16, 2024

Is your feature request related to a problem? Please describe

Is there a reason the ALU always sets the carry to zero for subtraction?

To me it would make more sense if a subtraction A-B behaved as an addition A+(-B). This would make the ALU more similar to how, for example, x86 and ARM behave.

Describe the solution you'd like

Change the ALU such that subtraction outputs a carry.

I'm happy to implement this if you're willing to accept such a change.

Describe alternatives you've considered

No response

Additional context

No response

Are you working on this?

Yes

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