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

'fill' keyword doesn't allow single quoted length #50

Open
fraser125 opened this issue Dec 2, 2022 · 1 comment
Open

'fill' keyword doesn't allow single quoted length #50

fraser125 opened this issue Dec 2, 2022 · 1 comment

Comments

@fraser125
Copy link

The following line fails to assemble using the latest release of bass v18.

error: mismatched quotes in expression
Video002.asm:6:1: fill $0010'1000

This has worked in the past (Dec 2019).
I'm really trying to narrow this issue down and did the following research.

  1. VALID: origin $0000'0000
  2. VALID: base $8000'0000
  3. Error message mismatched quotes in expression is from bass/core/utility.cpp function Bass::split
  4. The fill keyword uses the split function while the other mentioned keywords do not.
  5. The documentation isn't "conditional" for everything except 'fill' doc/basics.md regarding the use of the single quote character for making numbers easier to read.

It seems like there are a couple of different possible fixes, so I leave that up to you.

Please let me know if you need any further information.

@fraser125
Copy link
Author

It looks like the following code change caused the functionality change
Old

if(s.match("fill ?*")) {
    lstring p = s.ltrim<1>("fill ").qsplit(",").strip();
    unsigned length = evaluate(p(0));
    unsigned byte = evaluate(p(1, "0"));
    while(length--) write(byte);
    return true;
  }

New

if(s.match("fill ?*")) {
    auto p = split(s.trimLeft("fill ", 1L));
    uint length = evaluate(p(0));
    uint byte = evaluate(p(1, "0"));
    while(length--) write(byte);
    return true;
  }

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

1 participant