News for hackers. Stuff that matters.
Re:Z80 arithmetic: also surprisingly terrible (2018) by peteri on Monday January 14, 2019 @04:58AM (#18901926)
The z80 version only supported recursion if it was specifically enabled so I suspect it tended use fixed locations for variables. Z80 support for a traditional stack frame for recursion isn't very good (although IX,IY with offsets could work).
Re:Z80 arithmetic: also surprisingly terrible (2018) by jonsen on Monday January 14, 2019 @05:58AM (#18902129)
I’d guess that it used the old times trick of saving the return address by modifying the code of the called subroutine. A recursive call would then overwrite the primary callers return address.
Re:Z80 arithmetic: also surprisingly terrible (2018) by timonoko on Monday January 14, 2019 @05:28AM (#18902019)
"Stack Frames"? I think they just pushed the current values of pertaining variables onto CPU stack upon entering a recursive function. Does Pascal even have lexical/dynamic binding issues? I do not think so.
Re:Z80 arithmetic: also surprisingly terrible (2018) by mavhc on Monday January 14, 2019 @10:39AM (#18903746)
Cowgol doesn't have recursion at all anyway