Linux Format logo

Calling all BASIC coders!

Do you long for the days of 8-bit BASIC? When GOTO wasn't considered evil, REM wasn't just an American alternative rock band, and PEEKing and POKEing didn't get you into trouble with the police? Well, those days are back with the release of MikeOS 4.0.

Yes, I've released a new version of my x86 assembly language operating system, and the big news here is a BASIC interpreter. It includes 24 instructions and supports nested FOR loops and GOSUBS, numeric and string variable handling, file loading and saving, and more. Here's the Handbook -- see the end for some sample programs demonstrating its features:

It's really easy to code in MikeOS BASIC: fire up the editor (EDIT.BIN), load the .BAS file you want, and get editing. When you're ready, hit F2 to save your code, and then F8 to run it -- you don't even need to exit the editor. When your BASIC program ends, you'll be back in the editor at the same point you left it. EXAMPLE.BAS on the disc demonstrates file loading and parsing, along with screen and keyboard handling via a simple Tron-like game.

Plus, you can now run MikeOS from a USB key, as detailed in the User Handbook! So if you loved coding back on the Speccy or C64, give it a go and send me your work -- I'd love to include more BASIC apps and games in the next release. Cheers!

Your comments

BASIC - no thanks

There were certainly some things that were easier to do with only 8 bits to play about - and Amstrad CP/M dates ran out in 2151 rather than 2038 for Unix dates.

But BASIC - no thanks - a terrible programming language; one of the reasons I avoided anything MS even in the 1980s and 90s.

Re: BASIC - no thanks

@John Hudson: Well, yes, you wouldn't want to write a modern office suite or web browser in an 8-bit BASIC dialect today. But this is a simple 16-bit tutorial operating system, and the goals are extremely different...

"But BASIC - no thanks - a terrible programming language; one of the reasons I avoided anything MS even in the 1980s and 90s."

You avoided Microsoft because it had a BASIC compiler (amongst other languages)? Presumably you also avoid Linux today because it has Gambas? There were (and are) plenty of sensible, rational reasons to avoid Microsoft, but I can't make sense of that one :-)



I love BASIC, it brings me back - I wrote a few games with QBasic before putting my mind to the web - maybe some of those will run!

"MikeOS ftw 1337 r0x0rz h4x0rz b0x0rz" as you might say.

Avoiding MS

I avoided MS because I discovered that to program a lot of things in MS products you had to use BASIC and that the programming commands to do the same things in other programs were far simpler. For example, my brother who is a BASIC expert and I compared the code needed to do some fairly straightforward things in BASIC and in dBASE and in all cases BASIC required two lines or more to do something which could be done in a single line of dBASE code.

Similarly, trying to do anything out of the ordinary, like conditional mailmerge, which takes a line or two of code in WordStar, was either impossible or incredibly longwinded in Word.

And, of course, WordStar, dBASE and Supercalc all used the same open formats for data exchange making integration a breeze.

People forget that in the 1980s nobody used MS programs for serious work; they just weren't up to scratch.

With Linux I have the choice whether or not to use BASIC; I objected to being forced to use it to do simple things in MS programs.

Goto 10

Good job, Mike. I may have a flick thru my Spectrum and Amos books to see if anything can be adapted. :)

I think it is cool what you are doing...

Hi Mike...

I think your extremely simple OS suits my simple mind.

Great job matey. I shall start giving it a real screw from now.

As for the BASIC; as I am no coder but do code badly, then what
I have seen so far seems extremely powerful, even with the limited
statements/commands. I shall certainly do that SPP ADC project
within the next few days and pass it all over to LXF or you
whichever is the easier.

Well done! I really love stuff like this as it gets me away from
the usual eye candy GUI crap we see day after day. I do wish you
would do more Linux assembly stuff in LXF tho`........

Basic...welcome back

Thanks Mike,

Haven't had a look at it yet, but just talking of basic takes me back to my school days. I was still a kid in the 80s and learnt basic in school when Basic was about to be no news in the 90s.

My brother created his own flight simulation using basic, so I'm gonna try to entice him to do this again. Because that was his best project ever.

The most I did was a mcq (multiple choice questions) program for different languages (spanish, italian, and french) and totally rocked my school friends world.

Naughty naughty

GOTOs not considered evil ? Someone didn't start out on a BBC or Electron, we had structured basic I'll have you know. GOTOs have always been evil and not in a good way.

Basic in Linux

I love Basic-stated writing programs on Sinclair based computers in the early 1980's then BBC Basic based machines then Qbasic then back to BBC Basic For Windows-which just about runs on Linux using Wine, I say just about, because despite being repeatedly pressed, the Wine developers have never implemented the GetBoundsRect Windows function so programs have to be writtten with a fix to get round it. However-Isn't this reinventing the wheel a bit? I wondered if it might be more interesting in Linux Format ran an article on the QB64 program which extends the original Qbasic and runs in Linux and Windows.

Howdy Mike Just wgeted the

Howdy Mike

Just wgeted the various html files and the zip from your site.
I used to do a lot of things in basic, long time ago, including a planetry 'rise/set' program (a stylised sharp basic and QBasic).

They were good days :)


Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...

Looking Good

I have no knowledge of the BASIC language really but I do keep checking out MikeOS in Virtualbox to see how its progressing.

Always making some nice improvements to it. I might not notice much changes each time but I have no idea how hard it is to program such a thing and what changes might be going on in the core (non-GUI) part of it.

What's The Point?

Aside from nostalgia, what is the point of learning or re-learning to program in BASIC?

Simple does it.

First of all, GOTO's are only as bad as the programmer using them. If you use GOTO judiciously it can make your code simpler, more objective and direct. I have a hunch that only those that feel they are not up to the task are afraid of GOTOs. And, of course, those who shouldn't be programming in the first place...

As for MikeOS: haven't tried it, but to me it looks like a wonderful, small work of simplicity. I hope it evolves not in the direction of overcomplication and bloating, like many other OSs and programming languages have. (Yeah, sadly the Linux environment also deserves this criticism.) So, Mike, thanks for your work. I'll try to make some time to get to know your little OS better.

And, to the guy above who asked what the point is of learning BASIC: well, at least you have to be good and disciplined to program well in BASIC. Consider it as a personal challenge. Memory segmentation aside, it is a great language.

BASIC as the Latin of computing

They always told me learning Latin helped you to be disciplined and that learning it would help me become a good computer programmer. So is BASIC the alternative for those who never learned Latin?

Still got my Amstrad CPC664

I still have my CPC664 with 64KB of RAM. Try programming in that amount of memory these days! I wrote a few programs on it, and it is where I learnt how to program back in the late eighties. It also taught me how to code programs as small as possible. It may be old hat but it is useful. GOTO - used it now and again but also used GOSUB - much better.

And yes, Linux is getting a bit bloated. Maybe MIkeOS is the next OS we will be using:-)


64Kb for discipline

I used to program dBASE on an Amstrad 6128 and you certainly learned how to keep you code lean.

Don't Believe the Hype

@John Hudson

I'm glad I stopped my subscription to LXF with un-educated opinions such as yours.

I've programmed dBase II and BASIC 80 professionally under CP/M for many years. I can't recall ever thinking that BASIC 80 was more verbose than dBase (or the other way around for that matter). Remember you are not comparing like with like though - BASIC 80 is a generic programming language, dBase was more geared to database management. But if you like, try comparing Java or PL/SQL to BASIC 80 and then see which is more verbose!

Without sounding like I'm blowing my own horn, I can vouch for the fact that I wrote programs in BASIC 80, which were used for very serious work in the 80s. The infrastructure of this country relied on these programs running correctly for at least a couple of years.

Have you also forgotten that many home computers based their dialect of BASIC on MS's BASIC? This fact alone probably made a great difference to the state of the software industry in this country.

I grant you that MS is not perfect, but a blinkered opinion is no reason to pick holes in them.


@Penguin Enemy

You have mixed up two different things; I never took to BASIC as a language - so when I found I needed it to do things in MS programs that could be done far more easily with a dedicated rather than a generic programming language I avoided such programs.

If you use almost any generic language in a specific situation, you will find that a dedicated language is normally easier to use; that was point one.

My second point was that programming with any language on an 8-bit computer requires you to learn how to keep you code lean. I'm sure you gained that benefit both when programming with BASIC-80 and with dBASE II - but I'm sure you were intelligent enough to know which to use in what circumstance and not try to use the wrong language for the wrong purpose.

Because of the constraints of 8-bit computers, when I did want to do something specific that wasn't covered by anything dedicated, I used assembler rather than BASIC. I think you will find that a lot of 8-bit programmers developed their skills in this way.

BASIC x dBase

I know I'm going to reveal my age with this comment but, hell, so be it.

I did program a lot with both BASIC and dBase ("dBASE"?) in the late eighties, early nineties. They have almost nothing to do with one another except for the fact that you can write programs in BASIC and in the *language of dBase*. Yeah, 'cause dBase was an early *package* for doing database stuff on PCs - not only a language. BASIC is "all-purpose" (the "A" in BASIC), the dBase language was sorta database-oriented.

So, to you guys who weren't even born at that time, there you have it. You can start an informed discussion, now.

(Ah, before I forget: dBase originated Clipper - the "dBase compiler", wow! Then, dBase grew bloated, Clipper grew bloated and, in part for that reason, both are history, now.)

MikeOS and its BASIC...

Hi Guys...

There is no point in arguing the pros and cons of differing languages
when they are suited for totally differing things.

I am no coder, I am an engineer; I code to work, NOT work to code!
Therefore by definition all of my code is crap.

A good BASIC language is highly productive in terms of the amount of
time it takes to develop a good program for ANY type of application.

It is simple to get to grips with for people with simple minds like

Take MikeOS, already it has an Analogue to Digital Converter project
through the parallel port and it is crudely talking to the Arduino
Diecimila board too through the serial port - erm, NO DRIVERS, NO

Let`s see dBase do that inside a couple of hours development work.

However MikeOS BASIC does have the capability of creating and using
a simple data base of your own design, albeit small, due to the
deliberate inbuilt limitations of the said OS.

And with all its limitations its BASIC interpreter is now proving to
be extremely powerful as I can now control my machine and NOT have IT
control me.

I am always being told how powerful Python is - IT IS ALL RELATIVE!
(To me, Python 3000, (3.x), is a backwards step as the "NEW" print()
function is about as much use as a fart in a spacesuit!)

If it can`t do what you want then it is NOT powerful - END OF STORY.

To me, MikeOSs BASIC is proving to be a powerful, FUN, development
tool to enjoy and experiment with.

It suits my simple mentality...

Polly wanna a cracker?

@ John Hudson

"[...] I used assembler rather than BASIC. I think you will find that a lot of 8-bit programmers developed their skills in this way."

I completely agree with you there.


What exactly is the line of discussion here, now? It seems to have gotten a bit blurred. Or is it just me?

Z80 Basic

For Z80 Basic computers cammand input was easy. For example GOTO was obtaind by just pressing G from what I remember.
This meant that writing large lines of basic code was much less tiresome than it looked.
Also, another advantage was that you could do commands on the spot, without having to use an editor or a file.
MykeOS does not seem to implement and would need:
-Basic commands on the spot (probably: basic.bin)
-Easy (standardised) way of imputing commands (G for GOTO, P for PRINT)


Hmm, I wonder if I could rework my old Hangman game from Mallard BASIC on the Amstrad PCW. This could be fun! Thanks Mike!

Basic, dBase, and programming

Comparing Basic with dBase is not quite comparing apples with oranges but perhaps more like comparing apples to cider. With the apples. you can make cider, sure, but you can also make pie, sauce, juice, crumble and more. That's where the fallacy in the argument lies. dBase is great for database functions, much as cider is good for getting you drunk, while Basic can be used for many more applications (grammatical not just programming).

I do agree that if modern coders were forced to try out 8-bit languages of any kind to run on the 8-bit hardware we had in those days, it might teach them to be more careful with their coding; can you see a viable chess program in 1k these days? And as everything had to be loaded in memory (no disk drives on the ZX81) you HAD to keep it lean and compact.

Comparing an 8-bit BASIC to modern languages is a little like comparing a modern Ferrari with a steam traction engine; both will get you there, but in different ways, and in different levels of performance and comfort. I applaud Mike and his teams for this project, if only because it may show some of the younger whiz-kids what 'real' programming is...

Basic - I do not have the equipment

My keyboard does not have rubber keys and I can not find my portable cassette recorder any where. z:-(

Asserting my rights

I have just taken out a patent on the idea of combining the following letters {G O T O} into a string. A royalty is payable for their useage.

Under the terms of my newly created DRM you may not actually run any programmes written in MikeOS BASIC.

Asserting your rights... ;o}

OK Badlad; you can have the string {G O T O} AND (C) and patent it
`til your heart`s content as it is about as much use as a fart in a
spacesuit. So MikeOS can carry on with that highly useful string
GOTO... ;oD

And to Anonymous Penguin; a "uProfessor" by any chance?... ;oO

Asserting my rights

What! Tell me it ain't so

Mind you the new copyright proposals look promising..........


I think Microsoft VB.NET is one of the best development environments ever!! I say that being a big proponent of Linux - Ubuntu Linux. I know there is a lot of disdain for anything Microsoft or .NET within the Linux community but to me a cross platform development system where Visual Studio VB.NET would run on both Linux and Windows would be a big plus for Linux.

Visual Studio is one of the few Microsoft products I admire. Visual Basic, as in VB.NET, is very powerful and will accomplish everything that can be done in a language like C++.

So, yes, I admit I write in Basic -- qualified that its VB.NET that I write code in.



I dare say that MS will be thanking you for the ringing endorsement - Are you on commission?

Anyway MikeOS Basic is much more powerful can you do this in VB?

For each computerOnline{
Is OS == MikeOS-mostRecent ?{OK,IS OS == MikeOS ?{UPGRADE, REPLACE OS,MIKEOS}}



Isn't that what Mono is supposed to do?

BASIC - too easy, thats for wimps

Mike, how about implementing a proper language like Malbolge for instance?

Tic Tac Toe

Well Im Making A Sort Of Home Variant Of MikeOS Called DanOS And I Am Coding A Tic Tac Toe/naughts And Crosses Game For It Maybe If I Sent That To You When It Is Ready YOu Could Include That

Sharp PC-1248

Oh And At Least I Have A Use For That Old Sharp PC-1248 Pocket PC I Can Sharpen Up My Basic Skills On The Move (Sorry About The Pun (Sharp Sharpen Geddit!))

BBC Basic

Having written an entire college student entry system in BBC Basic in the 1980s alongside teaching Chemistry I have to say that I found it simple and robust. I had no problem adding modules as I went and as the Dep Head asked for more information. I wouldn't try lisp type coding in Basic (or any other language for that matter. It was horses for courses. The Basic worked, no question, and got the job done. As it happened it also convinced the Dep Head of the uses of computers, previous to which he was an arch cynic.

Web hosting by UKFast