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

Define constants #6

Closed
SamWilsn opened this issue Feb 9, 2021 · 3 comments
Closed

Define constants #6

SamWilsn opened this issue Feb 9, 2021 · 3 comments
Assignees
Labels
A-assembler Area: assembler C-enhance Category: a request for an improvement

Comments

@SamWilsn
Copy link
Contributor

SamWilsn commented Feb 9, 2021

Pretty self explanatory: have some sort of syntax to declare a constant value, and then be able to refer to that value elsewhere in the source.

@lightclient lightclient added the C-enhance Category: a request for an improvement label Mar 10, 2021
@lightclient lightclient self-assigned this Mar 10, 2021
@lightclient
Copy link
Contributor

lightclient commented Mar 10, 2021

How about $constant?

N = 2

push1 $N
balance
div

@SamWilsn
Copy link
Contributor Author

Or maybe we reuse the macro format?

%macro foo 0
    2
%endmacro

push1 foo()

@lightclient lightclient added the A-assembler Area: assembler label Mar 10, 2021
@SamWilsn
Copy link
Contributor Author

Duplicate of #18

@SamWilsn SamWilsn marked this as a duplicate of #18 Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assembler Area: assembler C-enhance Category: a request for an improvement
Projects
None yet
Development

No branches or pull requests

2 participants