mirror of
https://github.com/404Simon/WhileLoopInterpreter.git
synced 2025-09-19 00:17:30 +00:00
Compare commits
2 Commits
7c1d5ac00c
...
ca797906b2
Author | SHA1 | Date | |
---|---|---|---|
|
ca797906b2 | ||
|
95cfc0abcf |
13
README.md
13
README.md
@@ -9,14 +9,16 @@
|
|||||||
`mvn clean compile assembly:single`
|
`mvn clean compile assembly:single`
|
||||||
|
|
||||||
# Language Example
|
# Language Example
|
||||||
`//addWithWhile.txt
|
```
|
||||||
|
//addWithWhile.txt
|
||||||
x0 = x2; // this is a comment
|
x0 = x2; // this is a comment
|
||||||
WHILE x1 != 0 DO
|
WHILE x1 != 0 DO
|
||||||
x0 = x0 +1;
|
x0 = x0 +1;
|
||||||
x1 = x1 - 1;
|
x1 = x1 - 1;
|
||||||
END`
|
END
|
||||||
|
```
|
||||||
`//mulWithLoop.txt
|
```
|
||||||
|
//mulWithLoop.txt
|
||||||
z1 = x1;
|
z1 = x1;
|
||||||
z2 = x2;
|
z2 = x2;
|
||||||
x0 = 0;
|
x0 = 0;
|
||||||
@@ -39,4 +41,5 @@ LOOP z2 DO
|
|||||||
END
|
END
|
||||||
y0 = y10;
|
y0 = y10;
|
||||||
y0 = y0 + 1;
|
y0 = y0 + 1;
|
||||||
END`
|
END
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user