This again isn't really impressive when it comes to output
, but there's a lot going under the hood.
A couple of days ago, I ported a TinyBASIC compiler to my Virtual Machine, I've been experimenting with it since then, I've managed to extend the language a little bit, (adding while loops, operators, etc.), and today I managed to be able to run the code on the VM.
Here's a little Fibonacci generator written in my "extended" dialect of TinyBASIC:
Code: Select all
REM Fibonacci generator
LET I = 1
LET X = 1
LET Y = 0
WHILE I <= 10
PRINT "FIB: "; I, X
LET Z = X
LET X = X + Y
LET Y = Z
LET I = I + 1
ENDW
ASM ".data \{ mystr : db 'Thank You!', 0 \}"
ASM "push mystr"
ASM "syscall SYSCALL_PUTS"
END
And oh, the screenshot: