RodrigoDornelles / 3bc-lang

Low-level language, tiny virtual machine, minimal runtime, intermediate representation, embeddable, easy for beginners. (Friendly Punched cards)
https://3bc-lang.org
GNU General Public License v3.0
242 stars 27 forks source link

add MODE_TRUE_SLEEP for different system ticket clocks #385

Open RodrigoDornelles opened 1 year ago

RodrigoDornelles commented 1 year ago

It would be interesting to focus the language to be a Language/VirtualMachine in realtime, that is, not allowing times to miss deadlines, and increasing the accuracy of its waiting times.

It is interesting both for implementation, ease of use and hardware limitations, to focus on the old MODE_SLEEP one register for each time magnitude. preventing it from being greater than the next average.

related #128

limits

Register otcal bit Description
~real~ micr 1 001 pause n microseconds
~fake~ mili 2 010 pause n miliseconds
~micr~ seco 3 011 pause n seconds
~mili~ minu 4 100 pause n minutes
~seco~ hour 5 101 pause n hour

new MODE_TRUE_SLEEP

Register otcal bit Description
rms1 1 001 cpu tickets
rms2 2 010 hypervisor tickets
rms3 3 011 virtualmachine tickets