> > The Cowgol page (http://cowlark.com/cowgol/index.html) says that the > > lack of recursion is because most of the target platforms "don't really > > support stack frames". I wonder if that means there will also be a > > problem writing, say, thread-safe routines or re-entrant routines. > > Likely. But if you need to do that, why would you write in cowgol? > > I am trying to imagine Honest to $DEITY threaded code on an 8 bit > micro, and failing.
I've done it before on microprocessors to get them speaking TCP/IP. You might be responding to requests on two different sockets at the same time (e.g. telnet and HTTP) so need some kind of "thread" to make that easier. The uIP library[1] comes with its own thread-like implementation which uses C compiler tricks and switch statements to jump in and out of functions at various points to give the impression of multiple functions running at the same time, but under the hood it's actually two different functions being called repeatedly, with the switch statement causing the function to jump back to where it was up to the last time it was called, then returning early to allow the next function to run for a while. Cheers, Adam. [1]: https://en.wikipedia.org/wiki/UIP_(micro_IP) _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user