Yes, but program should not be terminated, it should be "paused" while another part is executing. Let me illustrate by this simple "CODE"
Conventional BASIC:
DO:
FOR A=1 TO 10
PRINT "A=";A
NEXT A
FOR B=1 TO 10
PRINT "B=";B
NEXT B
LOOP
The above program will print value of A first, and then it will print value of B.
But I need a output like this:
A=1
B=1
A=2
B=2
A=3
B=3
and so on.
I need to somehow "multiplex" two different parts of code in a such way, that they would run in "parallel" If you have heard about Parallax "propeller" chip, which has 8 "cores" but they being executed sequentally, at high speed, so user gets feeling of multi-core system. So I want basically to emulate something like that.




Bookmarks