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
232 stars 25 forks source link

add cpu mode emulator #164

Open RodrigoDornelles opened 3 years ago

RodrigoDornelles commented 3 years ago

able to instantiate another 3BC virtual machine, and add a bytecode aside, and run it.

can be useful for creating interpreters for other languages, and concurrent programming.

possible registers

register description
ttyp tty port select
ttyt tty type config
ttys tty set value
3bcc 3bc compiler (add column and finish line after third)
3bcr 3bc run last line (aux set 0 when program is end)
RodrigoDornelles commented 3 years ago

this way can't be that good, because it doesn't take advantage of the lightness of the virtual machine, it would be better to be able to instantiate it several times!