Implement fixed length arrays

This commit is contained in:
2025-08-03 15:19:27 -07:00
parent 42494142bb
commit fbd75700d5

View File

@@ -195,6 +195,14 @@ function splubp:write_shr(n)
self:wnx(n)
end
function splubp:write_a(tbl)
self:write_c(#tbl)
local rpt = self.cri
for item in all(tbl) do
self.cri = rpt
self:wnx(item)
end
end
-->8
-- loader
@@ -217,3 +225,12 @@ function splubp:shr()
local amt = self:op()
return self:rnx() >>> amt
end
function splubp:a()
local ret,rpt = {},self.cri
for i = 1,self:c() do
self.cri=rpt
add(ret, self:rnx())
end
return ret
end