[chbot] GCC and recursion
Mark Atherton
markaren1 at xtra.co.nz
Sun Apr 14 03:54:01 BST 2024
Yup, for doing real-work ATmega, STM32, or RISC-V has it, no question.
Having said that, newer projects tend to be FPGA based with a small CPU
orchestrating complex logic.
I built a Threaded Interpretive Language when I was a kid, based on the
book of the same name (ISBN 978-0070383609). Ran on a 6809 and was
hugely weird/fascinating at the time (TIL, not 6809).
On 4/14/2024 2:24 PM, Charles Manning wrote:
> 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
> <mailto: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
> <mailto:Chchrobotics at lists.ourshack.com>
> https://lists.ourshack.com/mailman/listinfo/chchrobotics
> <https://lists.ourshack.com/mailman/listinfo/chchrobotics>
> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
> <http://lists.ourshack.com/pipermail/chchrobotics/>
> Meetings usually 3rd Monday each month. See http://kiwibots.org
> <http://kiwibots.org> for venue, directions and dates.
> When replying, please edit your Subject line to reflect new subjects.
>
>
> _______________________________________________
> 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.
More information about the Chchrobotics
mailing list