This repository was archived by the owner on Nov 11, 2021. It is now read-only.

Description
Right now macros in porth.porth refer to addresses of corresponding objects
And they de referenced as needed
Proposal:
Template for names of addresses:
So, macros that gets value of single cell object can be implemented like this:
macro {name}
&{name} @64
end
And for writing single cell values, like this (not sure about syntax):
macro ={name}
&{name} !64
end
With #129 this code
macro push-op // type operand --
ops-count @64 sizeof(Op) * ops +
dup Op.operand rot swap !64
Op.type !64
ops-count inc64
end
transforms into this
macro push-op // type operand --
ops-count &ops[]
dup Op.operand rot swap !64
Op.type !64
&ops-count inc64
end
A lot more readable