As for your second question:
You build a gui & the interpreter in your prog. The interpreter would work in this manner for eg:
-------------------------------example.prg------------------------------Proc Main()
DefWin 160, 200, 400, 300, "Ruudboy",...
End Proc
------------------------------------------------------------------------
Now the interpreter will always search for a procedure(proc) Main() in the prog. When it finds it, it will execute all instructions present it. In this case just a defwin statement.
The interpreter will break the command into tokens like this.
DefWin
160
200
400
300
"Ruudboy"
...
So the first argument will be the command i.e. 'DefWin' and the rest will be the parameters required by that command. Now that you have obtained the parameters, the interpreter will just pass them as is to the DefineWindow SUB in your QB prog(Fake OS) which will setup a new window on the screen. Thats how you 'control' windows using the command line interpreter.
As for multitasking:
For i% = 1 to No_Of_Progs
Prog(i%).CurrentLine = Prog(i%).CurrentLine + 1
ExecuteLine Prog(i%).CurrentLine
Next i%
That should explain how multitasking is accomplished in a very rudimentary manner. Also, only scripts written for your Phoenix OS will be multitasked. If you want to multitask EXEs then you will have to search the web for them. I am too lazy to post it(May be later)
