Skip to content

[Feature Request] Literals (inline section fragments) #500

Open
@popeyeotaku

Description

This is gonna be the weirdest feature request, and I don't mind if you don't think it worth adding. But I've dabbled with some old Mainframe assemblers from back in the 70s, and one of them had an interesting feature they called "Literals".

Basically, you could put code in square brackets, and it would cause that code to be assembled in a block at the end of your code (you could also relocated this block to other places, and I think you could redefine it several times thru your code), and the square brackets would be replaced with the address it ended up getting assembled to.

So you could type things like:

ld hl, [.db "HELLO WORLD"]
call Print

and the string would get assembled to some place, and replaced in the hl with its address. You could also use it to call a short block of code that returns, things like that.

Like I said, while useful, this is not exactly a standard feature, and I don't mind if you don't think it worth adding.

Metadata

Assignees

No one assigned

    Labels

    enhancementTypically new features; lesser priority than bugsrgbasmThis affects RGBASM

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions