Basic arithmetic and jump labels

This commit is contained in:
2019-11-17 21:02:35 +01:00
commit b84557b3e1
34 changed files with 1350 additions and 0 deletions

16
bin/example.wasm Normal file
View File

@@ -0,0 +1,16 @@
addi $10 $-5 %A;
subi %A $2 %B;
muli $2 %B %C;
divi $2 %C %D;
loop:
addi $1 $0 %A;
addi $1 %A %B;
addi $1 %B %C;
addi $1 %C %D;
subi %D $1 %D;
subi %C $1 %C;
subi %B $1 %B;
subi %A $1 %A;
jmp loop;