[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] New suggestion about call convention



Michael Riepe wrote:

> I have to admit that static (link-time) allocation and register masking
> together will probably do even better. It also depends very much on the
> code - the linker may have to take loops etc. into account when it selects
> the save/restore points. But in general, the `lazy save' algorithm
> I outlined above should work pretty well.

BYTE or Dr Dobb's  magazine a few years ago had a good idea when the
Z80 was still a popular computer. Sort all subroutines into recursive
and non-recursive piles. Recursive routines use normal stack addressing.
Non-recursive routines would be sorted into the level of subroutine 
calls made, and static global memory would be alloted for the variables.
Since the Z80/8080 does not have easy stack addresssing this idea could
save time and space.



*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/