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

expressions for read_char and read_byte #38

Open
elnv opened this issue Jul 6, 2023 · 1 comment
Open

expressions for read_char and read_byte #38

elnv opened this issue Jul 6, 2023 · 1 comment
Labels
request New feature or request

Comments

@elnv
Copy link

elnv commented Jul 6, 2023

We would like to request that reading instructions read_char and the requested read_byte could be used inside parenthesized expressions, like other operators that push a result.

For example store8!! (read_char) &2

This make easier using these instructions in C embedded assembly, without thinking in stack adjustments.

@elnv elnv added the request New feature or request label Jul 6, 2023
@ivar-rummelhoff
Copy link
Collaborator

Expressions are assumed to be without side effects so that subexpressions can be reordered or even eliminated. However,

store8!! (* 0 (read_char)) &2

is not the same as:

store8!! 0 &2

Consequently, this feature would require changes that are too large for the current project; and I am not even sure it is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants