-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
3top1a
committed
Jan 17, 2025
1 parent
b4d8dd3
commit e622370
Showing
6 changed files
with
131 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,52 @@ | ||
x = 4 | ||
y = 5 | ||
// This will generate a single - because it's faster | ||
z = 255 | ||
array = [1 2 3 4 5] | ||
c = 'c' | ||
// No arrays for now | ||
|
||
x = 1 | ||
y = 2 | ||
|
||
fn + a b { | ||
ret = 0 | ||
copy a ret | ||
copy b ret | ||
return ret | ||
} | ||
|
||
z = +( x y) | ||
goto(z) | ||
basm(".") | ||
newline = '\n' | ||
basm(".") | ||
x = "\nHello, World!" | ||
basm("<<<<<<<<<<<<.>.>.>.>.>.>.>.>.>.>.>.>.") | ||
|
||
|
||
--- | ||
|
||
|
||
set x | ||
> (alloc) + (add) | ||
|
||
set y | ||
> (alloc) ++ (add) | ||
|
||
|
||
function call | ||
allocate z | ||
> (alloc) | ||
new stack | ||
> | ||
|
||
set a | ||
> (alloc) (copy) | ||
|
||
set b | ||
> (alloc) (copy) | ||
|
||
copy a | ||
copy b | ||
return ret | ||
(move ret to z) | ||
|
||
pop stack | ||
(zero b) | ||
(zero a) | ||
|
||
goto z | ||
< (goto z) | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.