@pagetable Nice article. Thanks for this series.

I might have found a typo in this one by the way. In the article, you have a code snippet that says "bra showErrorAndExit". Isn't this meant to be "bne"?

@loke It's a "bra" in the original code. "bra" is a 65c02 instruction that does not exist on the 6502, but the GEOS headers come with a macro for "bra".
Here's the weird thing about it though: It resolves into
clv
bvc
So it's a relative jump, but it takes up 3 bytes and uses 5 cycles. A jmp would be 3 bytes and 3 cycles. All of GEOS and its apps is full of clv/bvc. :(

Follow

@pagetable @loke Please modify the macro so I can sleep at night.

@modrobert @loke The GEOS KERNAL defines the macro (and also uses it). You can change it in my reverse-engineered source: github.com/mist64/geos/blob/ma :)

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.