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

create literal for label #408

Open
RodrigoDornelles opened this issue Jun 11, 2023 · 1 comment
Open

create literal for label #408

RodrigoDornelles opened this issue Jun 11, 2023 · 1 comment
Assignees

Comments

@RodrigoDornelles
Copy link
Owner

considering that the virtual machine was separated from the interpreter itself and the djb2 hash literal :like_this will be maintained, the behavior of cpu modes 9 and 42 was also changed to absolute address. this is a new idea to facilitate jumps.

  • must be work only with normal stack
  • move hashmap of labels to interpreter

read

MODE NILL 0d2
STRC NILL 'A'
STRC NILL 'M'
STRC NILL 'O'
$LABEL
STRX NILL 0xCA
STRX NILL 0xFE
MODE NILL 0d9
GOTO NILL $LABEL

result

MODE NILL 0d2
STRC NILL 'A'
STRC NILL 'M'
STRC NILL 'O'
MODE NILL 0d4 #5
STRX NILL 0xCA
STRX NILL 0xFE
MODE NILL 0d9
GOTO NILL 5
@RodrigoDornelles
Copy link
Owner Author

MODE NILL 0d2
STRC NILL 'A'
STRC NILL 'M'
STRC NILL 'O'
LABEL:
STRX NILL 0xCA
STRX NILL 0xFE
MODE NILL 0d9
GOTO NILL $LABEL

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