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

ld16 is bugged #17

Closed
ISSOtm opened this issue May 8, 2019 · 2 comments
Closed

ld16 is bugged #17

ISSOtm opened this issue May 8, 2019 · 2 comments

Comments

@ISSOtm
Copy link
Contributor

ISSOtm commented May 8, 2019

This condition can never be met.

Unsure how to fix it.

@joeldipops
Copy link
Owner

rgbasm macro language can be very weird about brackets. To get it working I had to surround the two terms with brackets.
IF STRIN("\1", "[") == 1 && STRIN("\1", "]") == STRLEN("\1")
vs
IF (STRIN("\1", "[") == 1) && (STRIN("\1", "]") == STRLEN("\1"))

All good now:

MEH EQU $c000
ld16 [MEH], BC
ld16 BC, [$ff10]

becomes

ld A, B
ld [$c000], A
ld A, C
ld [$c001], A
ldh A, $ff10
ld B, A
ldh A, $ff11
ld C, A

@ISSOtm
Copy link
Contributor Author

ISSOtm commented May 9, 2019

I hardly see how that could work, since this expects STRIN("\1", "[") to return two different values.

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

No branches or pull requests

2 participants