[chbot] GCC and recursion

Charles Manning cdhmanning at gmail.com
Sun Apr 14 03:24:20 BST 2024


I really find computer architecture interesting. But I'm taking the other
approach that life is too short so I'm jumping in with the RISC V community.

Have you looked at some of the tiny Forth machines? eg. Swapforth and J1a.


On Sun, Apr 14, 2024 at 2:07 PM Mark Atherton <markaren1 at xtra.co.nz> wrote:

> Ha! I have already implemented RPN, and it works fine. This whole
> project is an experiment; interested to see what how far I can push
> things before the parser gets ugly.
>
> I guess then next step is to write a small compiler running on an x86,
> generating P-code to be run on a *tiny* interpreter on the machine (and
> its associated 128 word limit). There is plenty of micro-code space, so
> might be able to dream up some complex instructions to make the
> interpreter very small.
>
> Oh god, look what you have made me do now... :)
>
>
> On 4/14/2024 12:06 PM, Charles Manning wrote:
> > There is always an equivalent algorithm using arrays etc to make a
> > manual stack (ie. looping instead of function calling to get the
> > "recursion".).
> >
> > Sometimes that's all you've got. eg. Fortran 77 etc does not provide
> > recursion because it is not stack based (like C).
> >
> > Function calling recursion is a lot easier and cleaner though.
> >
> > Have you considered just saying sod it and using RPN for your assembler?
> > Well for a first cut anyway.
>
>
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.ourshack.com
> https://lists.ourshack.com/mailman/listinfo/chchrobotics
> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
> Meetings usually 3rd Monday each month. See http://kiwibots.org for
> venue, directions and dates.
> When replying, please edit your Subject line to reflect new subjects.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/chchrobotics/attachments/20240414/bc3cc675/attachment-0001.html>


More information about the Chchrobotics mailing list