Become a fan of Slashdot on Facebook


Forgot your password?
Programming Amiga OS X Operating Systems IT Technology

Scripting In Commodore BASIC For Windows & Linux 213

SomeoneGotMyNick writes "Someone more nostalgic than I am, and with a lot of time on their hands, had created a scripting language based on Commodore BASIC for Mac OS X. They recently finished a version that works on Windows and Linux. You can pass the text of a BASIC program as a parameter to the program. I found it odd that it took 1.8 MB of source code to compile to an interpreter that used to fit in 8K of ROM space. If this ever becomes popular, perhaps we'll see Obfuscated CBM BASIC contests." In a simliar vein, in the comments someone points out what is essentially an open source AmigaOS Classic.
This discussion has been archived. No new comments can be posted.

Scripting In Commodore BASIC For Windows & Linux

Comments Filter:
  • TI Basic (Score:2, Interesting)

    by mfh ( 56 ) on Tuesday November 04, 2008 @05:43PM (#25633179) Homepage Journal

    I remember coding four pages from 99er, to make a little box go from one side of the screen to the other and change colors, while playing a midi tune. More serious business was the epic dungeon text adventures!

    Now of course this would be nice to have on Linux.

  • Re:TI Basic (Score:3, Interesting)

    by jojisan ( 465449 ) on Tuesday November 04, 2008 @05:51PM (#25633313)

    Was that a stock 99-4A or did you have the extended memory cartridge?
    I really do miss call sprite...

  • by Zarhan ( 415465 ) on Tuesday November 04, 2008 @05:54PM (#25633351)

    If you have any of those old CBM-BASIC listings from 80's computing magazines, it's full of POKE x,y statements (and sometimes the program is just a hex loader with bunch of READ...DATAs). So I'm really not so sure of the value of this experiment.

    (One of the longest "commercial" CBM-BASIC programs I remember - that actually used it for lots of things - was Sid Meier's Pirates! []. (Haven't tested the newest Remake - I did like Pirates Gold!, the first remake, a lot)

  • by sucker_muts ( 776572 ) <> on Tuesday November 04, 2008 @05:58PM (#25633407) Homepage Journal
    I found it odd that it took 1.8 MB of source code to compile to an interpreter that used to fit in 8K of ROM space

    Don't forget that the commodore cpu was 8 bit and current cpu's are 32 or 64 bit: Most of the commands were 8 bit and their equivalents are bigger nowadays. That explains the 8KB of ROM

    And they did not need fancy memory protection stuff, they hacked straight into the hardware. No dll's, so's to use or API's to follow. Even if it is a lot assembly code, there are a lot more bytes in assembly source than in binary executables.

    Context, people, context! ;-)
  • Re:Commodore BASIC (Score:4, Interesting)

    by decipher_saint ( 72686 ) on Tuesday November 04, 2008 @05:58PM (#25633421)

    Compared to...?

    I'm actually quite curious what the differences would be that would make it a bad interpreter.

    C64 was my first exposure to programming (I was 8 when I got my hot little hands on it), and not having tried anything else from that particular era of home computing I don't have a yardstick to measure that sort of thing.

    So please, tell me more :-)

  • Re:Commodore BASIC (Score:3, Interesting)

    by LWATCDR ( 28044 ) on Tuesday November 04, 2008 @05:59PM (#25633429) Homepage Journal

    Actually Atari Basic was arguably worse the Basic 2.0.
    Atari Basic had totally none standard String handling.
    C64 Basic lacked extensions for graphics and sound but other than that it wasn't terrible.

  • by tjstork ( 137384 ) <> on Tuesday November 04, 2008 @06:00PM (#25633447) Homepage Journal

    Is that, some old assembly hackers ought to be able to whip up a fairly tiny basic interpreter. It should be fun in a way and still easier than in the old days of 6502. You have more registers, some basic string instructions, and outstanding support for floating point. I doubt it could be quite as small though, as, the big thing that would bloat it up would be that instructions themselves in 32 bit. For an easier and almost weekend job of it, you could do it in 64 bit assembly for Linux only. That spares you the need to do COM type of stuff and other weirdness that permeates the Windows API. In Linux, you are just doing normal C calls throughout to the OS and so you could bring up basic file services fairly quickly. A clever coder could probably make the BASIC actually be some sort of assembler with it... there's nothing genuinely fancy about it and the memory management of those guys was fairly primitive.

  • Re:TI Basic (Score:3, Interesting)

    by digitalhermit ( 113459 ) on Tuesday November 04, 2008 @07:03PM (#25634265) Homepage

    I remember a similar demo in the TI/994A Reference Manual. It also had a program to re-define a character to make a little jumping man in an 8x16 grid. One of my first programs was to make a running man move across the screen based on the code in the reference manual.

  • Re:Commodore BASIC (Score:4, Interesting)

    by ACMENEWSLLC ( 940904 ) on Tuesday November 04, 2008 @07:26PM (#25634479) Homepage

    I learned BASIC on an Apple and then moved to the C16 then to a C128 with C64 embedded. I really enjoyed BASIC on the Commodore platform. I loved POKE and PEEK. The with my Super Snapshot card I could get into a pretty good machine language decompiler. From there I could create programs in the $c000 range, store them to a floppy, and sys them. I loved monitoring the raster ($d018 or somewhere close) and changing it's color when it's at various positions to create screenshots better than what the C64 normally allowed.

    I never have got as deep with the x86 platform.

    The thing I've found with most emulators is that this trickery just doesn't work right. A lot of it depended on the set Mhz rate of the hardware.

    I find it odd as many fanboys of the C64 as there are, why not embed one onto a USB dongle. The other end with a RS232C cord?
        Something like this [] ported for us programmer types.

  • by TaoPhoenix ( 980487 ) * <> on Tuesday November 04, 2008 @07:37PM (#25634589) Journal

    Being less talented than your average /.er, Commodore *64* basic reduced me to whimpers at that tender age. I pulled out all the stops and mortgaged my childhood in chores to upgrade to the Commodore 128, and that is basically the best value in an upgrade I'll ever see. Helped by the extra passage of years, on the 128 I made maze programs, a Dodge-The-Mall-Traffic Simulator as a joke, Ethnic dialects of Eliza including the Angry New Yorker, and a few quasi-utilities that were more basic concept exercises. Then I sold it to my neighbor for $100 of munchie cash, thus learning about Exiting the Market.

  • Re:TI Basic (Score:3, Interesting)

    by AmberBlackCat ( 829689 ) on Tuesday November 04, 2008 @08:58PM (#25635453)
    I was in the Apple store, asking a Genius why Ms. Pac-Man, which ran on an Atari 2600, is taking up almost 20 megabytes on my iPod Nano. He told me it's because they have to fit all those in-game sound effects into the download. Pure genius.
  • Here you are (Score:1, Interesting)

    by Anonymous Coward on Wednesday November 05, 2008 @05:25AM (#25637947)

    Here, a reimplementation of BASIC in C.

    In about 1.5 KB, and it actually works a treat!


Would you people stop playing these stupid games?!?!?!!!!