Tibbo Operating System (TiOS)
Tibbo programmable devices run TiOS (Tibbo OS) — our proprietary lightweight operating system.
TiOS is an extremely efficient, event-based, two-process system.
The first process, also known as the master process, takes care of all real-time tasks (like TCP/IP and serial communications). The second process implements a software virtual machine ( VM).
The VM is responsible for executing p-code (pseudo-code, a.k.a. bytecode), which is a kind of machine code your Tibbo BASIC/C applications compile into.
TiOS is a single-application system: only one compiled application can be uploaded and executed at at any given time.
Tibbo BASIC/C applications are sandboxed. That is, they run within the confines of the VM and are prevented from derailing TiOS. TiOS always has the complete control over your application.
TiOS includes an upload and debug interface allowing you to upload a compiled application binary to the device and then control the VM with commands sent over the Ethernet network.
Events and event-based execution
Events are a core concept in TiOS. They are the only way in which any code gets executed, ever.
Every TiOS device maintains an event queue. Events are registered by the master process, go into the queue, and are taken out of the other end of the queue by the VM.
Whenever an event is taken out of the queue, the VM calls an event handler for this event, if such a handler is defined in your application.
Event handlers are procedures of Tibbo BASIC and Tibbo C.
The execution is single-threaded, i.e. there is only one event queue. All events begin executing in the exact order in which they were queued (more).
I am getting a bit ahead of myself right now but let me tell you that there actually is a way to execute events out-of-order. This is achieved through the doevents statement.