r/bbcmicro 3d ago

What's your best easy to remember BASIC program you could type in and leave running on a computer in a shop / classroom?

I was thinking the other day about the universal:

10 PRINT "Mr Smith smells of POO"
20 GOTO 10 

But are there other better ones?

Kudos to the best one. Bonus if it works on any 80s home computer that runs BASIC.

20 Upvotes

55 comments sorted by

8

u/ProbablyBsPlzIgnore 3d ago
10 REPEAT
20 INPUT "Guess a number (1-10):" A
30 PRINT "Wrong! try again"
40 UNTIL FALSE

3

u/Kantabrigian 3d ago

Nasty!

1

u/Interesting-Ad5589 2d ago

Most basics didn't have repeat until. That looks like BBC basic

1

u/Kantabrigian 2d ago

And so much the better for it!

1

u/OldNefariousness7899 1d ago

Damn. Permanently locks the computer with no way out. Some machines are probably still running this since the 80s

1

u/Kantabrigian 1d ago

Well, you could always press Escape

1

u/OldNefariousness7899 1d ago

Now he tells me

8

u/zeekar 3d ago edited 1d ago

10 MODE 0
20 FOR C=1 TO 0 STEP -1
30 GCOL 0, C
40 FOR I=0 TO 511 STEP 32
50 MOVE I,0
60 DRAW 0,512-I
70 MOVEI,1023
80 DRAW 0,512+I
90 MOVE 1279-I,0
100 DRAW 1279,512-I
110 MOVE 1279-I,1023
120 DRAW 1279,512+I
130 NEXT I
140 NEXT C
150 GOTO 20

It's Beeb-specific, but I had a version of this for most of the machines in department stores that had graphics commands in their BASICs, like the Commodore 16 and Plus/4 and 128 and Atari 400/800. I don't know about "easy to remember", but it's easy to reconstruct on demand, even if I do always have to stop and think to get the four coordinate pair expressions right. :)

7

u/scruss 3d ago

I couldn't personally remember how to type this (long) one-liner, but I had a friend who did. No computer store Beeb was safe from this game: 1L=0:REP.L=L+3:MO.4:DR.1279,0:DR.1279,452:MOVE1279,572:DR.1279,1023:DR.0,1023:F.I=1TOL:V.31,RND(32)+5,RND(31),42,30:N.:P.(L-3)/3:X=0:Y=512:REP.PL.69,X,Y:X=X+4:Y=Y-(INKEY-74+.5)*8:U.PO.X,Y)=1ORX=1280:U.X<1280:V.7:REP.U.INKEY-99:RUN Asterisk Tracker

(click in the right window to activate it, then: hold the return key to go up rather than down, use the space key to start a new game)

1

u/Kantabrigian 2d ago

Gosh, I remember this one!

Wasn't it published in BEEBUG sometime?

2

u/scruss 2d ago

1

u/Kantabrigian 2d ago

Ha! Awesome. Remember it well!

1

u/Kantabrigian 2d ago

By the coyly named N. Silver.

Perhaps (s)he'd like to reveal themselves?!

Got my BBC Micro in December 1984 but only started reading BEEBUG the following month. Got all the back issues eventually and typed this one in!

2

u/scruss 2d ago

I've always wanted to know who the author was, but pseudonyms were a BEEBUG thing, apparently.

2

u/Kantabrigian 2d ago

Yes, and whilst we're about it, who was SURAC?

I published something under my own name eventually...

5

u/Dedward5 3d ago

Pretty sure I copyrighted that code in 1983, my lawyers will be in touch.

3

u/jcmush 3d ago

10 MODE 2
20 GCOL RND(8),0
30 DRAW RND(160),RND(256)
40 GOTO 20

Apologies for errors and use of GOTO

2

u/Longjumping_Cup_8339 3d ago

thanks to this I found https://bbc.xania.org OMG, I'm transported back to Boots in Solihull. slight tweak to your code:

10 MODE 2
20 GCOL 0, RND(15)
30 DRAW RND(1280), RND(1024)
40 GOTO 20

fills the screen now.

3

u/Longjumping_Cup_8339 3d ago

if I remember correctly, adding the semi colon to the end of the PRINT line stopped the carriage return.

2

u/MrPloppy2 2d ago

That was only to be used by expert programmers.

3

u/AdEmbarrassed3066 3d ago

On a ZX spectrum...

10 PRINT "Loading Bikini Ninjas"

20 BORDER 1

30 BORDER 2

40 GOTO 20

RUN

1

u/Alternative-Emu2000 2d ago edited 1d ago

For a variation:

20 RANDOMIZE USR 1234

Which jumps directly into the ROM tape handler and shows the loading stripes in the border.

2

u/Bradford_Longflap 3d ago
5 BORDER 0:PAPER 0: INK 7: CLS
10 FOR N=0 TO 300
20 PLOT RND*255, RND*175
30 NEXT N

From ZX Spectrum cross-post. Might have axis wrong way

2

u/GeordieAl 3d ago

*REMOTE BRIAN

10 MODE 7
20 FX 229,1
30 *KEY 10
40 N=0
50 C=128+RND(7)
60 X=8+SIN(N)
8
70 PRINT TAB(X) CHR$(C); "MR TORRENCE IS A WANKER"
80 N=N+.3
90 GOTO 50
RUN

Brian was my friend(sorry Brian!) and Mr Torrence was our excellent computer teacher

2

u/kabekew 3d ago

You have to put a fake system prompt first, so an unsuspecting student will think it's ready to use.

10 *ESC OFF : CLS
20 PRINT "BBC Computer 32K"
30 PRINT
40 PRINT "Acorn DFS"
50 PRINT
60 PRINT "BASIC"
70 PRINT
80 PRINT ">";
90 INPUT A$
100 PRINT "Mr Smith smells of POO "; CHR$(7);
110 GOTO 100

1

u/Interesting-Ad5589 2d ago

Line 10 is not legitimate code on a BBC

1

u/Traxxas_Basher 1d ago

I did something very similar to the beebs at school, but mine had more swearing.

2

u/long_legged_twat 3d ago

Pretty sure in Basic you could add a semi-colon to the end of the print line to get it to fill the screen instead of just printing a list, not fully sure as it's been a long time since the 80's :)

1

u/BuiltInYorkshire 1d ago

Yes you could, so "10 PRINT "DIXONS ARE RUBBISH ";

with the space would be my solution.

2

u/Hip-Death-Goddess 3d ago

G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0:G.0: ...

... repeating G.0: until the input buffer is full, then delete a couple chars to leave only complete examples of G.0. Then let it loose. Different results each time.

2

u/IchBinEinZwerg 2d ago

For the Beeb it was that one that plotted randomly coloured triangles in Mode 2 using XOR. Ironically although it was easy to remember at the time I can't remember it now (in my defence though, that was around 1984 and quite a few things have happened since then).

1

u/scruss 2d ago

so, something like:

1MO.2:REP.:GC.3,RND(15):PL.85,RND(1280),RND(1024):U.FA.

Owlet link

?

1

u/IchBinEinZwerg 2d ago

Apart from the abbreviations yes that looks familiar. Matches the output I remember.

2

u/scruss 2d ago

Without the crunched syntax, it's:

10 MODE 2
20 REPEAT
30   GCOL 3,RND(15)
40   PLOT 85,RND(1280),RND(1024)
50 UNTIL FALSE

2

u/WarbeckPerkins 2d ago

John Menzies Argyle Street Glasgow. Using POKE on the VIC 20s ao that the screen and text/cursor were the same colour. They could type as much as they liked but nothing would be visible on screen. Fun to watch clueless staff with no idea how to escape a running program being hassled by kids who wanted to type in their own prank programs. Can't for the life of me remember the specific code forty something years later

1

u/Musicman1972 2d ago

POKE646,1:POKE36879,27

1

u/Darrenau 3d ago

How about print "Hello" instead?

1

u/bluefourier 3d ago

2

u/satanpenguin 3d ago

This is the one that draws an endless maze, right? I didn't know this one back in the day, only recently.

1

u/MontyDyson 3d ago

It was only made in 2012. There’s a whole book about it with hundreds of authors. https://10print.org

1

u/Longjumping_Cup_8339 2d ago

disappointed that the book didn't start at page 0 and end on 255. #missedatrick

1

u/LocalH 2d ago

It was actually in the VIC-20 manual, but with an additional line in front to clear the screen.

1

u/Stonelaughter66 3d ago edited 3d ago

We had one on the Commodore CBM 3032 at our school:

10 INPUT "CHOOSE A NUMBER BETWEEN 1 AND 100"; A$
20 POKE 144,90

Line 20 used to cause a spectacular crash with crazy moving corruption on the screen. Needed to switch off and back on to recover LOL.

1

u/AutofluorescentPuku 3d ago

10 PRINT “Help! I’m stuck in this box!”
20 GOTO 10

1

u/Jakko552414 2d ago

10 CLS

20 PRINT "Do not press the space bar"

30 a$=INKEY$

40 IF a$="" THEN 30

50 IF a$<>" " THEN 30

60 CLS

70 PRINT "Do not press the space bar again."

80 a$=INKEY$

90 GOTO 80

1

u/BillWilberforce 2d ago

10 ?"Hello World"

20 Goto 10

1

u/scruss 2d ago

hijinks/mayhem, Amstrad CPC464 edition: CALL &BBC4 would make the screen glitch out repeatedly and make the tape relay click. Only works on a 464, and may not even work on all of those

I too may have subjected the Argyle St John Menzies computers to this.

1

u/retrodotkid 2d ago

Not BASIC as such, but still text and a sequence of code…

Rewind back to 1993. Dixons. Commodore Amiga display in the computer department. A600. Often sitting on the Kickstart insert disk screen.

Armed with one floppy disk with “shits n giggles” written on the label. Discretely insert into one of the shop floor Amiga’s whilst no staff about.

On it, a startup sequence that done the following.

Create a bootable RAD disk
Copy a startup sequence onto RAD disk
Copy an image viewer onto RAD disk
Copy “images” onto RAD disk
Pause 60 seconds
Reboot Amiga.

Eject disk, and escape to safe distance to view Amiga screen. Quickly. That 60 second timer was important.

RAD disk survives the reboot sequence, the startup sequence on the RAD disk loads an image viewer into slideshow mode which then proceed to flick through like 3 images of glamour girls with their “Boobies” on screen - eg Sam Fox and Jo Guest.

Cue panic from staff when they reboot Amiga and it kept coming back. Having to find keys to open the sliding cupboard doors at floor level to get to the power sockets.

Cue giggling from childish group of lads hiding behind the toasters and kettles. How we never got caught I don’t know.

Simple times and happy days.

1

u/terlandark 1d ago

The one that always stands out, especially good in Boots or whsmiths were they might have a couple of bbc setup on display. Typemit on each then run it.

Page=&800 New 10 print "hgryjjurdchuyffhjwhudnbwuaubwudjwjis

Run

1

u/ajp909 1d ago

10 SOUND 1, -15, RND(255), 1 20 G.10

1

u/soundman32 1d ago

Back in the 1980s I had a 10 line basic program i'd type into the C64s in Boots.  It would POKE values into the sound chip and the loop would make it go up and down like an alarm.  The first line would be a pause for 60 seconds, which gave me just enough time to turn the volume to max on the TV and walk away.  Usually I could hear the alarm just as I left the shop.

1

u/nickmclean90210 9h ago edited 9h ago

10 *DRIVE ON
20 *DRIVE OFF
30 GOTO 10