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

index register with size .b is not an m68k instruction #5

Open
matthiesenj opened this issue Apr 13, 2024 · 1 comment
Open

index register with size .b is not an m68k instruction #5

matthiesenj opened this issue Apr 13, 2024 · 1 comment

Comments

@matthiesenj
Copy link

matthiesenj commented Apr 13, 2024

If you use an indirect addressing mode with byte size index register, the web site (68kcounter.grahambates.com) calculates an incorrect size and number of cycles - this addressing mode doesn't exist on m68k.

image

@grahambates
Copy link
Owner

Hey, sorry I forgot about this and just looking at it now!

What's happening here is that while the actual rule for indirect addressing does only match .w and .l, this is matching the rule for an absolute longword address.

Thinking back, I deliberately made this the default for anything that doesn't match any other known pattern. The idea was that rather than trying to parse and interpret any combination of characters that could potentially form an expression, at this point it can only be something that equates to a number. This does have the unintended effect of silently swallowing errors, but my thinking was that it's not really the job of this tool to validate your syntax. There's likely a whole bunch of stuff that the regular expression based parsing accepts that isn't valid m68k.

I might rethink this in the future if I introduce more accurate parsing that can give useful errors.

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