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

LOAD sections allow specification of a non-RAM type #576

Closed
SuperDisk opened this issue Sep 25, 2020 · 2 comments · Fixed by #651
Closed

LOAD sections allow specification of a non-RAM type #576

SuperDisk opened this issue Sep 25, 2020 · 2 comments · Fixed by #651
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM

Comments

@SuperDisk
Copy link

rgbasm doesn't complain when assembling this program:

SECTION "Hello", ROM0
ld a, 1
LOAD "Wello", ROM0
ld a, 2
ENDL

but it produces nonsensical output when linked:

Screenshot 2020-09-25 103654

I corresponded with @ISSOtm and he indicated that a LOAD section that doesn't use a RAM type should be a parse error.

@ISSOtm
Copy link
Member

ISSOtm commented Sep 25, 2020

There simply isn't a use case for LOAD into ROM sections; the LOAD-created section is still placed like usual, but would only contain empty space.

As for the nonsensical output, can you try with latest master instead? This looks awfully like 9d62b4b; you should get 3E 01 3E 02 in one section, and probably two bytes of garbage in the other one, which should by default be placed right after.

@ISSOtm ISSOtm added enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM labels Sep 25, 2020
@Rangi42
Copy link
Contributor

Rangi42 commented Dec 16, 2020

With master as of 1d9cc01, that test case does now output 3E 01 3E 02 followed by 00 00 and then padding 00s.

Rangi42 added a commit to Rangi42/rgbds that referenced this issue Dec 16, 2020
Rangi42 added a commit to Rangi42/rgbds that referenced this issue Dec 18, 2020
Rangi42 added a commit to Rangi42/rgbds that referenced this issue Dec 18, 2020
ISSOtm pushed a commit that referenced this issue Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants