Friday, January 12, 2007

Tiny BASIC Revisited

Scott and I decided to port Tiny BASIC over to Liberty BASIC last week. What we have is mostly working now and I'll make it available after I've polished it a little more.

In the Wikipedia article I mentioned before there are two versions of Tiny BASIC implemented in BASIC. The one we decided to use is here: We decided to use this one because it is simpler. It is also open source.

So what we have is a cute little line numbered BASIC interpreter. In fact the version of BASIC used in the original TRS-80 Model I computer was Tiny BASIC. So if you've ever used this machine or anything like it (VIC-20, C64, Atari 400/800, Sinclair ZX81, etc.) you remember entering code a line at a time each with a line number, typing LIST and RUN. You also have immediate evaluation, which is a nice feature that most languages (even BASIC) don't have today.

The limitations? Single letter variable names. No string variables at all. Only about 100 lines of code per program (a completely artifical limit left to the reader to remove). No GOSUB/RETURN.

Okay, so why do this at all? Clearly this is not a useful programming language, right? I'm not so sure.

First, as an example of how to create a simple programming language it is great. The code is pretty well written (even though it looks like it is also written in a version of Tiny BASIC) and I had no trouble following it.

Then, when I consider just how small this program is I am impressed. In very little code the author has created an interactive programming environment.

If someone wants to use this as a platform to experiment it is wide open. One could try extending the language with string variables, add graphics support, or build a programmable robot battle game on top of it. Perhaps it could even be used to support scripting for Liberty BASIC applications.

Very cool. :-)


Anonymous said...

good post

Anonymous said...

Our selection ofwow gold bean bags, bean bag chairs wow goldand home theater furniture are the mostwow gold comfortable pieces of furniture that will ever invade wow goldyour home. Set up your media room with coolhome theater furniture and bean bag chairs wow goldand your room will become the envy of wow goldall your neighbors. We even have some great accessories to complete your brand new LoveSac, including wow goldbean bag chairs slipcovers, LoveSac ottomans and more.

Anonymous said...

is one of the mostworld of warcraft gold common themes buy wow goldin the ."Man in My City."wow gold kaufen "I was basically talking, telling people I wasn't trying tocheap wow gold be no rapper," Lo saidworld of warcraft gold. "I wanted to be lord of the ring goldlike Baby is to Cash Money, Buy Warhammer goldPuff is to Bad Boy. Warhammer goldI'm just trying to be maple mesosthe man behind the scenes. cheap wow goldI started D4L inMaple Story meso 2003, ended up coming home maple Story mesosfrom jail in 2004. It came from the heart. maple Story mesosEven before Barack Obama won, itwow power leveling felt like he was gonna po I shouted him out in my song. I'm the man in my city." "Get Money Bi---ez" (featuring Lil' Kim).wow powerleveling "On my last album, I didn't have nothin' for the women," Lo said. "I'll be doing shows, travelling everywhere. Women ask dofus kamasme, 'When you gonna make songs for us?'wow or I went back and wrote. buy wow goldThen I reached out to e Mind drops Novemberchaeap wow gold 24. D.O.E. saidkamas dofushe definitely final fantasy 11 gilcame across some tough times recently,final fantasy xi gil as he alluded tobuy wow gold in his guest verse on LOTR GoldTimbaland's "TheLOTRO Gold Way I Are" lastcheap ffxi gilyear ("I ain't got a bigcheap wow gold ol' house/ I rent a eq2 platroom in a house"). everquest 2 goldOut with the old,flyff penya in with the new.There'sbuy flyff gold Timbo beats on there, ffxi cheap gilDanjahandz gives a track and Joell Ortiz appears on the track "Watchin' Me." The skit ahead of that record is hilariousffxi gil, but it's no laughing matter on "Streets Been Watching,"maplestory mesos though."It basically explains how dudesrunescape gold was looking at me sideways,final fantasy 11 cheap gil" D.O.E. said. "I fellflyff money on my face.eve isk Dudes was eve online isklooking at merunescape money crazy. I explained everything,buy flyff gold how I went from [owning] a Hummer to [riding] theflyff money train. Sh--flyff penya was deep.

Anonymous said...

INDIANAPOLIS – Searching for wow golda truly world of warcraft goldoriginal buy wow goldholiday cheap wow goldgift, one that wow power levelingcould bestow a wow powerlevelingbit of immortalityAge of Conan gold on a lovedAge Conan gold one or aage of conan power leveling friend?If so,aoc gold Purdue University aoc power levelinghas the goods: aoc levelingThe school iseve online iskuctioning eve iskthe naming rights toCity of Heroes influence seven newlycoh influence discovered bats City of Villains infamyand two turtles.COV infamyWinning bidders willlineage 1 adena be able to link alineage adena relative, friend or 2moons dilthemselves to an animal2moons gold's scientific Last Chaos Goldname for the ages.The first of the nineGW goldauctions began Monday, Guild Wars Goldwhen the school put up for grabsRagnarok Zeny the naming ro zenyrights to a tiny gold and black Rappelz goldinsect-munching bat found in CentralSecond Life Linden America.second life moneyThe winning bidderTabula Rasa Credit will be announced tabula rasa creditsjust beforevoyage century gold Christmas,potbs doubloon said John pirates of the burning sea goldBickham, Potbs golda Purdue professor of forestry and natural resources who discovered or co-discoveredpirates gold the nine speciesArchLord gold.He expects the auctions buy ArchLord goldto attract wide interest, EverQuest platwith the chance to include buy eq golda person's Latinized name inEverQuest gold a new species' scientificeq plat name — a tradition that dates to theeq gold mid-18th century."Unlike naming eq2 plata building or something like that,EverQuest 2 plat this is much more permanentHero online gold This will last asbuy silkroad gold long silkroad goldas we have our society.

Affordable Luxurious Wedding Dress Blog said...

cheap wedding gownsdiscount bridal gownsChina wedding dressesChina wedding online storediscount designer wedding dresses