ststic arrays and dynamic arrays

This commit is contained in:
IgorCielniak
2026-01-08 18:34:34 +01:00
parent 1727bab944
commit e7abc47cdf
8 changed files with 376 additions and 4 deletions

9
tests/list.sl Normal file
View File

@@ -0,0 +1,9 @@
import ../stdlib/stdlib.sl
import ../stdlib/io.sl
word main
[ 1 2 3 4 ]
# element i is at: list_ptr + 8 + i*8
dup 8 2 * 8 + + @ puti cr # index 2 = 3
dup 8 1 * 8 + + @ puti cr # index 1 = 2
end