Skip to content

create literal for label #408

@RodrigoDornelles

Description

@RodrigoDornelles

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

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions