Calculate stack offset from array index

This commit is contained in:
2024-12-08 16:19:52 +01:00
parent 1c996b3c8b
commit 7fc90f1d2d
4 changed files with 42 additions and 33 deletions

View File

@ -0,0 +1,2 @@
5
7

View File

@ -0,0 +1,11 @@
proc main() {
var a: array[2] of int;
var i: int;
i := 1;
a[0] := 5;
a[i] := 7;
printi(a[0]);
printi(a[i]);
}