Hacker News new | ask | show | jobs
by t__r 4451 days ago
I too started with Basic. First steps on the Acorn Electron, then got an MSX and finally switched to a PC and used Q(uick)Basic. My ambitions ran ahead of my capabilities. Being fascinated by operating systems (I vividly remember tinkering with OS/2, Windows 95 Beta, DesqView/X, Linux 1.1.18) I wanted to write one on my own. The main aim was to have that magical thing called multitasking. I wrote a "kernel" in QBasic. Upon starting a new "process" it would:

- read in the text file of the new process, which was a specially programmed QBasic program that included predefined hooks to facilitate preemptive multitasking and that was capable of saving and loading its state (i.e. values of all variables).

- merge this text file with the text files of all other running processes, including the "kernel", and saving the new "system image" to disk.

- call the "save state" of all running processes

- exit from QBasic by running a batch file that would restart QBasic with the new system image, which would initiate by calling the "load state" of all processes.

It kind of worked :-) Such a pity I lost that code...