Browser-Based QBasic Environment
kavak.run
Browser-Based QBasic Environment
1–8 of 8 posts
Re: Browser-Based QBasic Environment
#2Try this out:
SCREEN 12
N = 14
R = 220
FOR i = N TO 1 STEP -1
CIRCLE (320, 240), R * i / N, i
PAINT (320, 240), i
NEXT
Ouch.It also suffers from the same fundamental problem most online QBasic emulators have (Qb.js is another well‑known example): they’re essentially compilers. For those of us who grew up with QBasic, one of its biggest strengths was that it was an interpreter. It loaded extremely fast, you could set breakpoints on the fly, and it had immediate feedback.
Another huge part of the original experience was integrated help. If you didn’t understand a command, you slapped that F1 key and got instant context‑sensitive help right inside the IDE.
I’m actually working on a truly browser‑native QBasic environment. It uses a virtual CPU plus a typed AST built from the original BAS source, so you can start and stop execution just like in classic QBasic. It’s pretty much feature‑complete at this point.
My goal is to have an online QBasic IDE that behaves with one‑to‑one parity with QBasic 1.1, and optionally lets you switch the interpreter to QuickBasic 4.5 for more advanced features like including `.BI` library files. I’ve already built a hardware abstraction layer that can mimic VGA memory/registers, BIOS interrupts, and even a COM modem. It’s about 95% feature‑complete at this point (DONKEY, GORILLA, NIBBLES all run perfectly)
One of the core design goals is full round‑trip compatibility: if you write a program in this web‑based IDE, you should be able to take the BAS file to an original 386 running QBasic and have it behave exactly the same and vice versa.
Small teaser demonstration:
Re: Browser-Based QBasic Environment
#3The example linked in the post has a lot of issues. It seems to be case‑sensitive (it errors on `Screen` instead of `SCREEN`), a simple `GOTO` loop can lock up the VM (in real QB you can break out with Ctrl+Break), doesn't attempt any real emulation of `PEEK` and `POKE` memory access, and its flood-fill algorithm is fundamentally broken for `PAINT`. Try this out: SCREEN 12 N = 14 R = 220 FOR i = N TO 1 STEP -1 CIRCLE…
Re: Browser-Based QBasic Environment
#4The example linked in the post has a lot of issues. It seems to be case‑sensitive (it errors on `Screen` instead of `SCREEN`), a simple `GOTO` loop can lock up the VM (in real QB you can break out with Ctrl+Break), doesn't attempt any real emulation of `PEEK` and `POKE` memory access, and its flood-fill algorithm is fundamentally broken for `PAINT`. Try this out: SCREEN 12 N = 14 R = 220 FOR i = N TO 1 STEP -1 CIRCLE…
Thanks for the feedback. I've resolved the issue.
Re: Browser-Based QBasic Environment
#5Earlier quoted context omitted.
Thanks for the feedback. I've resolved the issue.
Sure. Honestly I'd advise renaming it to "BASIC" compiler though. I threw a couple more QBASIC programs at it and it blew up on almost all of them.
Thanks.
Re: Browser-Based QBasic Environment
#6Earlier quoted context omitted.
Sure. Honestly I'd advise renaming it to "BASIC" compiler though. I threw a couple more QBASIC programs at it and it blew up on almost all of them.
Well, actually, Kavak is a generic framework. QBasic was just a stepping stone I wanted to demonstrate there. Since it won't be the flagship, I can't focus on it too much, but I'll try to improve it as much as I can. Thanks.
Re: Browser-Based QBasic Environment
#7The example linked in the post has a lot of issues. It seems to be case‑sensitive (it errors on `Screen` instead of `SCREEN`), a simple `GOTO` loop can lock up the VM (in real QB you can break out with Ctrl+Break), doesn't attempt any real emulation of `PEEK` and `POKE` memory access, and its flood-fill algorithm is fundamentally broken for `PAINT`. Try this out: SCREEN 12 N = 14 R = 220 FOR i = N TO 1 STEP -1 CIRCLE…
Re: Browser-Based QBasic Environment
#8The example linked in the post has a lot of issues. It seems to be case‑sensitive (it errors on `Screen` instead of `SCREEN`), a simple `GOTO` loop can lock up the VM (in real QB you can break out with Ctrl+Break), doesn't attempt any real emulation of `PEEK` and `POKE` memory access, and its flood-fill algorithm is fundamentally broken for `PAINT`. Try this out: SCREEN 12 N = 14 R = 220 FOR i = N TO 1 STEP -1 CIRCLE…
I look forward to the day you release this! Watching your teaser gave me lots of nostalgia for the BASIC days of my youth.
Trying to make it as faithful as I can to period-correct hardware of the 80s/90s. I'm hoping to get it done in the next week or so and will definitely do a Show HN!