[subscribe]
Forums -> Off-Topics

BASIC programming


Although we live in the 21st Century and no one has to program anything anymore thanks to the 4G Cloud and a facebook, there are still dorks alive who think BASIC is the kewlest, leetest, and eighties-est way to hack silicon wafers.

I am one of those misguided fools.

About a year ago I had the hankering to do some BASIC programming but I no longer have a computer that can compile it. I said to myself, "Lil Tobster, I'm sure by now someone has written an ONLINE emulator for hackin' up some BASIC, maybe I'll Google it!"

Yes. There are BASIC emus online that run in your browser. This is both BRILLIANT and outrageously stupid simultaneously. This is a dumbing-down along the order of using your watch as the gnomon of a sundial to determine the time. Hilarious!

There are emus for all the popular flavors of BASIC both machine-specific (TRS-80 vs. Apple DOS) and general, and the one I use is Quite Basic, basically a basic BASIC based on qbasic.

I have been writing all kinds of junk. Practical apps for the weirdness I get up to, and impractical fun apps for the serious weirdness I get up to.

Example (feel free to cut and paste into the emulator):

1000 rem Drippy Faucet by Tob
1001 cls
1100 REMEMBER TO SET CANVAS TO 50x50 !!
1110 for q = 0 to 49
1120 plot q,0,"black"
1130 next q
1200 for r = 1 to 44
1220 plot 15,r,"black"
1230 next r
1250 for s = 16 to 21
1260 plot s,45,"black"
1270 next s
1280 plot 22,44,"black"
1300 for t = 17 to 19
1320 plot t, 46,"black"
1340 plot t, 44, "black"
1360 plot t, 48, "black"
1380 next t
1390 plot 18,47,"black"
1400 for u = 1 to 4
1420 plot 17,u,"black"
1440 plot 27,u,"black"
1460 next u
1500 for v = 18 to 26
1520 plot v,1,"cyan"
1540 plot v,2,"cyan"
1560 next v
1800 rem Splanknic Ganglion
1810 let y = 43
1820 let g = -.01
1830 let x = 22
1900 for p = 1 to 20
2000 rem Shock your monkey
2020 for w = y to 1 step g
2040 plot x,w,"cyan"
2060 pause 50
2080 plot x,w,"gray"
2100 let g = g*2
2120 if w<23 then let w = 3
2140 next w
2500 rem donkey
2510 plot x,w,"cyan"
2530 pause 100
2550 plot x,w,"gray"
2570 plot x+1,w+1,"cyan"
2590 plot x-1,w+1,"cyan"
2600 pause 105
2610 plot x+1,w+1,"gray"
2630 plot x-1,w+1,"gray"
2670 plot x+2,w,"cyan"
2690 plot x-2,w,"cyan"
2700 pause 25
2720 plot x+2,w,"gray"
2740 plot x-2,w,"gray"
2850 let k = int(rnd(6))+1
2860 pause k*500
2990 let y = 43 : let g = -.01
2900 next p


BASIC! Yes, I can - or at least I could - I'm from the BBC Model B era and did quite a lot of BASIC stuff at school. Went to College and learned PASCAL and Zilog Z-80 Machine Code!

Not sure I have the time and inclination to revisit it though (mainly time)


I remember messing about with something called BASICA.
I dunno why it needed the extra letter at the end.

I remember writing programs with it.

I did one that calculated some kind of esoteric government formula for medicare filings.
My Dad took that one to his work and they apparently used it for something. (There was this one calculation they had to make repeatedly, but reliably...it involved inserting numerical values into a complex formula, over, and over, and over.)

I did another one that would generate Dungeons and Dragons characters. Six ability scores, hit points, savings throws and that was about it. I think it asked for input of level, name, and maybe desired class. I don't remember exactly.


I used to dabble in BASIC on my Dad's TI-994A, then later in QBasic on our Windows 3.1 PC, and a (vastly outdated even then) mainframe version I can't recall the name of when I was in high school. My last experience with any form of BASIC anything was Visual Basic 4.0 back in college.

I've done lots of simple things like text-based adventure games, some of which even included basic combat routines and trackers for HP, inventory, etc. I made my own little markup language and converter for quickly generating HTML web pages using my own shorthand that allowed me to spend more time on content and less time on formatting. (It made headers, tables, did bold text, italics, etc). I made a few little oddities like a 2-player connect 4 game for my Dad and brother (no logic, no "win state", just a sandbox that placed an alternating red/black circle when they clicked the top of a column).

The coolest/dumbest thing I did was during my high school class. We were free to do pretty much anything once we finished any assignments for the week, so I spent most of my free time in class programming a very simple, text-based "Mortal Kombat" fighting game that used stupid comparison algorithms based on the two player's choice of which "move" their fighter would do. The gameplay was dumb and somewhat random, but the thing all the other kids in the class liked was the ASCII art animation I had the game perform for various moves, and even a few of the "Fatalities." I spent WAY to much time perfecting hundreds of lines of code that got stick figure versions of Liu Kang, Sub Zero, Scorpion, etc to perform crazy special attacks and decapitations on a tiny computer monitor. Laughing

Nowadays, I've forgotten most of what I knew back then. Most of what I still remember are basic statements, commands, etc. that probably would have little bearing on any modern programming conventions.


I spent a lot of time writing gaming aids too; character generators, combat results tables, wandering monster generators, the whole bit.

Also did text games and a lot of ASCII animation and other dorky stuff.

Spent a lot of time writing comm related stuff like uploaders, wardialers, gopher stuff, etc and I even started a BBS that I never finished. I vaguely miss that kind of stuff.

Today I have a public access Unix shell account that I use specifically for ASCII art and other old school nerdiness.

Here's a Cricket game (sim) that should be familiar to most British males of a certain age:

10 let p = 1000
20 CLS
30 input "Which team will bat? ";r$ : rem Enter some team names here...
40 input "And which team will field? "; m$ : rem ...And here
50 for k = 1 to 2 : CLS
60 if k = 2 then print m$; " chasing ";p
70 print "Let's play Cricket!": pause 2000 : print
80 rem let r$ = "England" : let m$ = "Australia"
90 if k = 1 then let d$ = r$ else let d$ = m$
100 let s = 0 : let w = 0 : let l = 0 : rem runs, wickets, balls
110 let a = int (rnd(6))+1
115 let l = l + 1
120 if s >= p then 700
130 CLS : print d$;" Balls: ";l;" Wickets: ";w;" Runs: ";s;" "; : if k = 2 then print " Chasing ";p : print : print "Here comes the delivery";
140 print " ."; : pause 500 : print " ."; : pause 500 : print " . "; : pause 500
150 if a = 5 then 400
160 print "and it's a ";
170 if a = 6 then print "sixer! Quite the ";
180 if a = 6 then pause 2000
190 if a = 5 then let a = 0
200 if a = 4 then print "long roller! Good ";
210 let s = s + a
220 print "hit! ";a;" Runs" : pause 2000 : goto 110
310 rem
320 rem -------------------------------------------------------------
330 rem Howzat / 'Owzthat / Pencil Cricket Program by
340 rem Tob 8/14/14 0708 UTC
380 rem -------------------------------------------------------------
390 rem
400 CLS : print d$;" Balls: ";l;" Wickets: ";w;" Runs: ";s;" "; : if k = 2 then print " Chasing ";p : print : print "The Appeal"
410 rem :
420 print "'Owzthat then?";
430 print " ."; : pause 500 : print " ."; : pause 500 : print " . "; : pause 500
440 let b = int (rnd(6))+1
450 if b = 1 then print "Stumped!"
460 if b = 2 then print "Bowled!"
470 if b = 3 then print "Caught!"
480 if b = 4 then print "L. B. W. !"
490 if b = 5 then print "No Ball. . . 1 run awarded"
500 if b = 6 then print "Not Out!"
510 if b = 5 then let s = s + 1
515 if b = 5 then let l = l - 1
520 if b < 5 then let w = w + 1
530 if w = 10 then 650
540 rem : It ain't Lord's
550 pause 2500
600 goto 110
650 print "End of Inning. Total Runs: ";s
660 if k = 1 then let p = s
670 if k = 2 then let o = s
680 pause 5000
690 next k
700 print : print "Game Over" : print : print "F I N A L R E S U L T :" : print
710 if k = 2 then let o = s
720 print r$; " Total Runs: ";p;" ";m$;" Total Runs: ";o
730 let u = 10 - w : print
740 if o >= p then print m$; " wins by ";u;" wickets."
750 let y = p - o
760 if p > o then print r$; " wins by ";y;" runs."
1000 print : print : print "Automatic Howzat by Tob"


Oh snap. I also programmed a D&D character generator. I used it when I was a summer camp counselor and "taught" a D&D class. I even made a video to Klaatu's Calling Occupants song. Now if that won't nerdy.... Don't know what is... Or er.... Was. Smile


Rolling Eyes wow, the closest I came to making a language was different names of the months for a D&D setting. Funny how it sounds similar to Espanol, even though I knew nothing about it then and probably remember more Esperanto, yet.
So, I guess I'm out of the club. Embarassed


brushmarks said:

So, I guess I'm out of the club.

Nope! You're about to be knighted because...

brushmarks said:

...and probably remember more Esperanto,

...you are my new hero.

Kiu estas la viro?!!


Tob said:

brushmarks said:

So, I guess I'm out of the club.

Nope! You're about to be knighted because...

brushmarks said:

...and probably remember more Esperanto,

...you are my new hero.

Kiu estas la viro?!!

The only person I know whom can speak Esperanto (Badly) is Rimmer Wink

Edit: "Who's the Man!"?




Kiu estas la viro?!![/quote]

Saluton, mi amiko! Smile


brushmarks said:

Saluton, mi amiko!

Bondeziro! Ni parolas bele Esperanto! Ni devas eduko.

Kiu ankau gi parolas?


Funny, how this accolade of knighthood would push me on to pick up my copy of "The Esperanto Teacher."

Currently, I work with Espanolists and had been wishy-washy about committing to studying their language. With the Internet more accessible and the desire to be traveling off this continent, I am determined to jump in and enjoy.

Thanks, Tob! Thumbs Up


Ofta kiel akvosalo!

Edit: Did you join the Most Excellent Order? OBE?




Forums -> Off-Topics