Hi @theandrew168 ,
Would it be possible to add support for writing basic macros in the assembly programs? I wanted to see how derzforth would change in size if I inlined all the j next instructions.
For the moment my hack in derzforth.asm is to replace <4 spaces>j next with include next.asm, which contains:
# standard forth routine: next "macro"
lw W, 0(IP) # W <- [IP]
addi IP, IP, 4 # IP += 4
lw t0, 0(W) # t0 <- [W]
jr t0
The binary size increased by exactly 200 bytes, which I think is worth it for the performance gain.
Either way, I think it would be interesting to have a real macro syntax or something similar to what GAS and NASM provide... doesn't have to be as complex/powerful though. What do you think?
Hi @theandrew168 ,
Would it be possible to add support for writing basic macros in the assembly programs? I wanted to see how
derzforthwould change in size if I inlined all thej nextinstructions.For the moment my hack in
derzforth.asmis to replace<4 spaces>j nextwithinclude next.asm, which contains:The binary size increased by exactly 200 bytes, which I think is worth it for the performance gain.
Either way, I think it would be interesting to have a real macro syntax or something similar to what
GASandNASMprovide... doesn't have to be as complex/powerful though. What do you think?