[Oberon] a module a page (keeps the mind sane)?

Jörg joerg.straube at iaeth.ch
Tue Nov 6 11:05:42 CET 2018

"Coroutines" is very small;  if I remember correctly a page of code for the whole module or so.
This module is very compact but not easy to understand for outsiders as it "just" plays around with internal registers.
If I have time I might port it over.
 -----Original Message-----
From: Frans-Pieter Vonck <fp at vonck.nl> 
Sent: Tuesday, November 6, 2018 9:09 AM
To: Jörg Straube <joerg.straube at iaeth.ch>
Cc: ETH Oberon and related systems <oberon at lists.inf.ethz.ch>; paulreed at paddedcell.com
Subject: Re: [Oberon] a module a page (keeps the mind sane)?

Hi Jörg,

I saw the coroutine module is not yet written for project oberon.
But that does not keep me from trying out the concept of cooperatieve multitasking.
I will look into that,


Jörg Straube schreef op 2018-11-05 23:22:
> F.P.
> Installing tasks in the Oberon loop is THE way to enable multi tasking 
> in Oberon.
> T := Oberon.NewTask(myHandler, 1000);
> Oberon.Install(T);
> Every 1000 ms the procedure „myHandler“ will be called.
> Another way to have cooperative multitasking is to implement module 
> „Coroutines“.
> br
> Jörg
>> Am 05.11.2018 um 22:02 schrieb Frans-Pieter Vonck <fp at vonck.nl>:
>> Eventloop the arduino way.
>> (a little offtopic
>> Here is a nice  example on Adafruit how multitasking can be achieved 
>> with a timer.
>> https://learn.adafruit.com/multi-tasking-the-arduino-part-1/overview
>> As the tutorial progresses the event loop is cleaned up by using 
>> classes.
>> a snippet from the code:
>>  Flasher led1(12, 100, 400);
>>  Flasher led2(13, 350, 350);
>> void loop()
>> {
>>    led1.Update();
>>    led2.Update();
>> }
>> A scheduler is not necessary and the code is still readable.
>> Could be nice also as an example for oberon07 (astrobe)
>> Greets,
>> F.P.
>> --
>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related 
>> systems https://lists.inf.ethz.ch/mailman/listinfo/oberon

More information about the Oberon mailing list