Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • this is actually a really cool project been thinking of something like this ever since i saw a dudes Pascal (amd64) uefi loader and OS project

    looks like a lot of fun to explore and learn from thank you

  • I am on a similar quest with https://hackage.haskell.org/package/spade

    But it is not bare metal yet and it is not BASIC.

  • Very nice! I am curious how you built your BASIC as an EFI application. I didn't find any source code or build instructions in the downloads.

    I am investigating whether it would be feasible to do something similar for Python.

  • Maybe the embedded python flavors would be a good fit?
  • It's C code compiled with MSVS. Not sure about a FOSS release yet. I'm still in the early stages of experimenting.
  • Not the author.

    But binding micropython and posix-uefi is a weekend project. [0]

    [0] https://gitlab.com/bztsrc/posix-uefi

  • Great, nice project! In the time of Electron bloat, it's really refreshing to see bare-metal UEFI stuff.
  • Looking at the download sizes:

    UEFI "native" 114kb

    Windows version 1.4mb

    VHD version 12.6mb

    None of them are huge but it does emphasize how much difference in resource savings is available if your program can run directly on "bare metal" without even an OS at all.

  • This is great! Allowing anyone to program like it is the 1980s and bring them back to their hardware somewhat. I think it will also find it's way to the permacomputing crowd since UEFI is so ubiquitous these days it may be a good platform for that can offer modern features with a understandable interface.
  • "The machine boots into BASIC" :-)

    I was 8 or 9 years old when the ZX Spectrum +2 arrived home.

    I'm seriously considering installing this on an old laptop and giving it to my son when he's 8 years old, together with a hard-copy of a BASIC reference and a few simple programs and games to type in.

    Getting a FAT32 filesystem on day 1 is already a huge jump from my childhood experience (loading from tape).

  • As a parent who had a very similar experience growing up, I've tried putting BASIC in front of my young kids. It didn't work at all; the magic just isn't there anymore. If you've got an iPad, there's unfortunately no wonder in "I can make the computer do whatever I want". Also, kids know how modern computers are supposed to look and feel, and BASIC won't get them there.

    Sorry.

  • I really like this! I started a personal project a long time ago to boot a Raspberry PI into an environment like this, the idea being to bring back the good old days of the ZX Spectrum, Amstrad CPC, Commodore 64, etc. I had to abandon the project but seeing this makes me want to resurrect it.
  • What hardware have you run the UEFI version on?

    Can you assume that pretty much any computer these days provides UEFI firmware that supports ThoreauBASIC, or might some computers provide only a cut-down UEFI that doesn't provide all the functions you need?

    Is there some way to investigate the UEFI implementation on any computer? Can you get to the UEFI shell on any computer somehow or is the UEFI shell a separate application you have to download from somewhere and install?

    I realize these questions are getting far afield from what you wanted to tell us about, but UEFI is still kind of a mystery despite being installed almost everywhere -- it's hard to find explanations about it.

  • I learned to program on the Commodore 64 and in QBASIC in th 90's. I'll give it a try.

    Considering how much it supports, if it could chainload a full operating system, it would make a great replacement for GRUB or rEFIt.

  • That's an interesting idea. :-)
  • What's wrong with those bootloaders? Maybe try syslinux?
  • > it would make a great replacement for GRUB or rEFIt.

    Try https://gitlab.com/bztsrc/easyboot

  • Not FOSS? That's a real pity.

    I learned to program on 8 bit micros, and created a rough boot-to-BASIC experiment ~15 years ago following the JeOS pattern. So this project sounds really exciting, but I'd be more interested if I weren't restricted to being a passive end user.

  • Any BASIC is FLOSS if it provides full PEEK and POKE implementations.

    > PRINT PEEK ( A )

    88

    > A: pop %rax

  • I agree, it's a shame it's not FOSS.

    Besides UEFI, it has a Windows GDI port, but if it were FOSS one could add SDL backend for example and then one could compile it for Linux and Webassembly as well.

  • This is a great project. How do you handle saving/loading data? You mentioned file operations but you need some sort of file system - perhaps FAT32 - to support that. I'd need that to consider using it on UEFI.

    One thing you could use for more test cases is the book 101 BASIC Computers Games by David Ahl. Games always encouraged people to use computers and that's as classic as it gets!

  • > How do you handle saving/loading data?

    The linked page has this to say:

    "Disk I/O — SAVE, LOAD, MERGE, FILES, KILL, running directly on the UEFI Simple File System."

  • Very cool! The raw-metal boot part is impressive.

    BASIC requires more support than you'd expect. Here's an interpreter, with a similarly long list of features it has to support:

    https://www.moondew.com/basic/index.htm