equi

A self-descriptive stack-based PC platform
git clone git://git.luxferre.top/equi.git
Log | Files | Refs | README | LICENSE

multitask.equi (639B)


      1 (A very simple example to showcase multitasking capabilities of Equi)
      2 (by Luxferre, 2022, public domain)
      3 
      4 (save cmd buffer start to ease calculations)
      5 X1-GS
      6 
      7 (define a task multiplexer to run the second task)
      8 0026#GL+6#0Y!
      9 
     10 (and the third task)
     11 002D#GL+6#0Y!
     12 
     13 (while we define the third task, the second is already running,
     14 so some B's will be output even before A's,
     15 and when the third task will be defined, one C will be output)
     16 
     17 (define task 0 - output A in endless loop)
     18 A"$.5NJ
     19 
     20 (define task 1 - output B in endless loop)
     21 B"$.5NJ
     22 
     23 (define task 2- output C in endless loop)
     24 C"$.5NJ
     25 
     26 (and now, ABC pattern should print continuously)
     27 
     28 Q