Humans seem to have a need to do things that aren’t practical. Make the biggest ball of twine. Engrave the Declaration of Independence on a grain of rice. We want to make things bigger, smaller, faster, or whatever. That might explain why [nanochess] put out bootBASIC.
The 8088 (or later) assembly code gives you a very restricted BASIC interpreter that you can boot up. That means it has to fit in the 512-byte boot block that the hardware loads to get an operating system running. How restricted? Keep in mind it fits in 512 bytes. Each line can only have 19 characters or less. Backspace works, but doesn’t update the screen. Line numbers range from 1 to 999 and there are only 26 integer variables named a through z that hold 16 bits. All statements are in lower case.
While that’s pretty draconian, it still isn’t bad for less than 1K of space. Not only are the four common math operators available, but they obey standard precedence rules (that is, multiply and divide before add and subtract). You can even use parenthesis.
This isn’t going to replace VisualBasic or anything else, of course. But that really isn’t the point. It looks like [nanochess] is using this to promote a book about developing for the boot sector, but that’s not something everyone needs to know how to do. The readme implies the code comments are only in the book, but we glanced through the code on GitHub and it seemed well commented if you are interested in learning a little assembly language.
If you’d rather do your Basic programming for the Web, that’s easy. Or there’s always QuckBasic.
A bad idea whose time has come! Bravo!!
“Make the biggest ball of twine.”
I feel 99% invisible right now.
Is there a prize for the largest/slowest BASIC interpreter. We can write it in java. It sure as heck won’t fit on the boot sector, maybe in a “snap” weighing in at a paltry 2-3GB.
Sooner or later someone is going to find a legitimate use for this.
The author is legendary for impressive coding hacks. He is the author of nanochess, and has won the IOCCC a number of times, and churns out games for a wide variety of vintage gaming systems.
Brutal.
Just awesome.
Couldn’t he access the rest of the drive to make it more robust?
BASIC RULES! HA. Took several decades but finally BluePC boots to BASIC when it DOES find a boot sector. Which is better than ‘no bootable device’ or ‘insert boot disk’_ IMO. Wonderful beginning to boot sector virus written in BASIC.
Congratulations!
Don’t forget to give a look to bootOS, an operating system in 512 bytes 😉 https://github.com/nanochess/bootOS
brings back memories of various boot-sector stuff patched onto random people’s floppies left around school…
LOLz moving GRAPHICS until disk is ejected, or fake “hollywood-style virus” simulation… makes computer-labs more fun
they kept using/sharing the disk until someone leaves it in when computer is off…. these are people that NEVER remember to eject ALL disks before turning it on.
PS: a compuer lab is a room with computers in it, enough for a class. computer time was usually spent using instant-messaging, unless you were the type to get in trouble for going against the grain and doing something different.
did i mention that because the disk is PATCHED and not re-written the existing files and stuff are still there… so it ends up in the special computer on a wheeled cart with a projector in front of the whole class during a presentation, then someone trips over the powercord and it is plugged back in… you get a suprise bootsector-show!
all this from a disk that was “clean” when it was lost and only touched by the lab-admin XD
a book bag, an outdated laptop with working battery, a copy of the FAT12 filesystem documentation, and direct DISK HEX EDITOR with load and save of selected regions.
you had to incluse the AA55 (or was it 55AA?) at the end of the code-block.
This is the author of nano chess, on the the tiny chess programs out there. Him calling this program bootBASIC is clearly a pun at his “rival” Poudade, who made bootChess.
https://kernelmag.dailydot.com/issue-sections/headline-story/14353/small-chess-program-bootchess-nanochess/
No pun intended. Tried several word combinations on G and this one wasn’t used and is catchy.
Thanks for the clarification Oscar. It’s a piece of art, congratulations! Definitely something I would like to take a look at for porting to my minimalistic TTL computer. Our TinyBASIC is 3K (but it can draw lines..), and we just got the original Microchess running, but that is 1K… Oh all that waste..
awww i thought you were going to say scala (i kid)
There was also BSBasic, written in 2001 by Blacklight: it is a basic compiler that produces a boot sector from basic source code, allowing the creation of custom boot sectors to anyone.
It is a “basic” BASIC !