BASIC Programming




Introduction: BASIC Programming

Hi! I will show you today how to program in BASIC.
(BASIC=Beginner's All-Purpose Symbolic Instruction Code)

Step 1: How to Get BASIC-256

You can download it here:
Ubuntu Linux
Go to Applications / Add/Remove
Now make sure all applications are displayed
Search for basic-256
And install it.
(see picture)

Step 2: Text 1 - Hello, World!

Start BASIC-256 (for Ubuntu users: It's in Applications / Education.
Now enter into the programming window:

print "Hello, world!"

and run the program.

Hello, world!

Step 3: Text 2 - Math

The new program:

print "1 + 3"
print 1 + 3
print "7 - 5"
print 7 - 5
print "9 * 7"
print 9 * 7
print "5 / 4"
print 1 / 1

And the output:

1 + 3
7 - 5
9 * 7
5 / 4

The "print" command prints a message exactly when it is enclosed in "quotation marks".
If not, you can do math with numbers and variables.

Step 4: Graphics 1 - a Circle!

Now add to the beginning of the code:


and to the end:

color black
circle 145, 145, 145

so that it looks like this:

print "Hello, world!"
color black
circle 145, 145, 145

Run it, and you see a big circle in the graphics window.

Step 5: Graphics 2 - a Rectangle!

Replace "circle 145, 145, 145" with "rect 0, 0, 290, 290"
And what do you see? A square instead of a circle!

Step 6: Graphics 3 - All Colors...


"clear" isn't really a color. You can erase other colors with it.
Try it out! Replace "color black" in the program with "color blue", for example.

Step 7: Finish!

That's it for now. I'll make a second instructable as soon as possible.



    • Fix It! Contest

      Fix It! Contest
    • Water Contest

      Water Contest
    • Tiny Home Contest

      Tiny Home Contest

    12 Discussions

    Cool language to teach kids. There is no swift2 for Windows yet (the lab runs on windows), but the kids loves to make cool graphics with it, music, and paint with the mouse (mouseX, MouseY).

    It's cool and fun for 4th, 5th and 6th graders, and I am writing a blog in spanish about each class for them, please visit. I hope you find it fun too (by the way, I earn basic on a Texas Instruments TI-99/4)

    Oh () not "hello world"? I think that may actually predate the internet.. To stop being flippant and be serious - who uses basic for anything these days? The that time I touched BASIC was to modify MS "Gorillas" (QBASIC) such that the gorilla got totally nuked on the banana-throw. And I'm certain that MS stopped shipping QBASIC a long time ago... L

    9 replies

    . I can remember using "Hello, World!" in the '70s.
    . I doubt if anyone does any serious work with BASIC any more. I helped write a billing program in AppleBASIC (circa 1983), but BASIC would be nowhere on my list of language candidates for such a project today. I miss HyperTalk. :(
    . BTW, you can d/l QBASIC 1.1 from MS for free. Link at the bottom of the Wikipedia article on QBASIC. I don't know if it works with current versions of Windows. Scanning the article, it looks like it may.

    . BTW, I meant getting the files, not programming. :) . It's been years since I did any real programming (been doing a little bit of work with PHP, but nothing serious). But there may still be a few bits of BASIC still rattling around in my brain that I can dredge up. . I'd be interested in knowing how the install goes. There's a few things I've been trying to do with PHP (eg, merging slightly disparate data files) that might be easier to do (for me) with BASIC.

    who uses basic for anything these days?

    . I doubt if anyone does any serious work with BASIC any more.

    I have spent the last 10 months or so writing a commercial software product almost entirely in VBA (Visual Basic for Applications)- it's an add in for Excel that lets you do funky things with tables you import from the web. When I had to pick up Perl to write some QA stuff I had forgotten that real programming languages end lines with semicolons :$

    I suspect you may be right that no-one seriously uses BASIC basic, but Microsoft's weird insistence on beating the dead horse of VBscript, VBA and VB.NET means that something very much like BASIC is still very much in use. I do know, however, that the size and complexity of my project puts me almost in uncharted territory- I haven't come across a single other person on the web trying to do nearly as much with VBA as this product.

    So, there you go- PKM's employers use BASIC, no-one else in the world does :)

    Most of the shop machines I run in my shop are run by 'discarded' computers. Using QuickBasic 4.5 is easy and lets me program all of the machines to accept Gcodes, etc. Who uses BASIC? Many more people than they think. I took classes in college for programming in C. It sucked. When the language gets to the point of being cryptic, its no longer an easy to use interface. I've seen C programming that may as well have just been done in machine code (which I think is easier to look at).