Hacker News new | ask | show | jobs
by vunderba 1 day ago
I’m working on a 100% faithful adaptation of both QBasic and QuickBasic 4.5 that runs entirely in the browser running on a virtual CPU and hardware abstraction layer. It’s a love letter to everyone who learned to program on Microsoft’s BASIC interpreters in the ’80s and early ’90s. The whole project is fully open source.

The best compliment I’ve received so far is from friends who grew up in the same era I did: when I fullscreen the browser, a few of them assumed it was a virtual machine running the real thing.

I’ve tried hard to capture the spirit of what made QBasic great: built-in IDE help, an interactive, line-by-line interpretive environment, no compilation step, and a fast feedback loop. So far, every program you write in the simulator can be taken to an old 386 and will run exactly the same.

It started out as a bit of a mad scientist experiment, but I’ve already put close to a hundred hours into it.

Silly video demo (take a PEEK - see what I did there?)

https://mordenstar.com/share/qbasic-core-demos

1 comments

I am also doing something similar here [1]. But I decided to NOT use BASIC as the language. Instead I implemented a new language with more modern features like foreach loops, closures and a less verbose syntax etc. But the focus is still on getting the same IDE experience as QBasic IDE as well as the graphics/sound capabilities as the good old QBasic. Another priority was the availability of built in documentation help with example, which was also a great thing about QBasic.

Not being able to run in the browser is a purposeful choice I made. I want the users to distance themselves from the browser (which I think is an abstraction that is best avoided in the context).

You can take a peek here [2] where you can see a video demo of the IDE loaded with the program for a partial clone of the paratrooper game.

[1] https://hackage.haskell.org/package/spade [2] https://vimeo.com/835347764

Nice.

Mine is definitely more about achieving as close to perfect parity as possible with Microsoft QBASIC (a dog-eared copy of the Microsoft QuickBASIC Compiler book circa 1985 is sitting on my desk right now), but it also dives pretty deeply into the technical decisions behind some of QBasic’s quirks and how it worked with MS‑DOS at the time.

So it’s just as much an educational tool for understanding how BASIC pulled off certain effects. And with the hardware abstraction layer, it also mimics period‑appropriate hardware (386SX, 486DX, etc.).

I took a look at the video. The only thing is that I had a hard time making out what was going on. I could clearly see the green cannon at the bottom, but at the top it just kind of turned into a smeary, artifact-y mess. I don’t know if that was a result of vimeo's compression or what, but I'd consider re‑uploading it at a higher quality.