Page 1 of 1

Freezing Basic

Posted: Mon May 14, 2018 7:56 pm
by MrPixel
i decided to screw around with basic and decided to make a inescapable loop

(i was bored)

10 REM gosub loop
11 plot 12,2
12 draw 14,2
13 if Inkey$="a" then goto 20
20 goto 10


any other ways to do so?

Re: Freezing Basic

Posted: Mon May 14, 2018 8:16 pm
by R-Tape
any other ways to do so?
I give you Spectropolis, a city that slowly comes to life at night. Watch and wonder as the lights from buildings, cars and stars flicker while the inhabitants go about their business.

Code: Select all

5 BORDER 0: PAPER 0: CLS
10 INK 1+(RND*7)
20 PLOT RND*255, RND*175
40 GOTO 10

Re: Freezing Basic

Posted: Mon May 14, 2018 8:33 pm
by RMartins

Code: Select all

10 FOR i= 1 TO 2 STEP 0
20 PRINT i
30 NEXT i
Dumb loop will keep BASIC ocuppied.

Re: Freezing Basic

Posted: Wed May 16, 2018 5:52 pm
by 1024MAK

Code: Select all

10 LET HELL=20 : LET bottles=1E8
20 POKE 23692,255
30 PRINT bottles;" green bottles sitting"',"on the wall..."
40 LET bottles=bottles-1
50 GO TO HELL
Mark

Re: Freezing Basic

Posted: Wed May 16, 2018 6:36 pm
by MrPixel
1024MAK wrote: Wed May 16, 2018 5:52 pm

Code: Select all

10 LET HELL=20 : LET bottles=1E8
20 POKE 23692,255
30 PRINT bottles;" green bottles sitting"',"on the wall..."
40 LET bottles=bottles-1
50 GO TO HELL
Mark
LOL :lol:

Re: Freezing Basic

Posted: Wed May 16, 2018 6:39 pm
by MrPixel
you magnificent Bas**rd!

Re: Freezing Basic

Posted: Wed May 16, 2018 6:41 pm
by Ast A. Moore
When I was modding my Toast Rack to improved the video output quality, I needed to create a gray screen in BASIC, which would also access contended memory with with a varying frequency. So just did this and pressed buttons while it ran:

Code: Select all

1 RUN

Re: Freezing Basic

Posted: Wed May 16, 2018 8:03 pm
by R-Tape
Is it possible to properly freeze BASIC (disable BREAK) without using POKE or any USR?

Re: Freezing Basic

Posted: Wed May 16, 2018 8:15 pm
by Ast A. Moore
R-Tape wrote: Wed May 16, 2018 8:03 pm Is it possible to properly freeze BASIC (disable BREAK) without using POKE or any USR?
I don’t think so. Since you can’t disable interrupts (from BASIC), and the ISR at $38 is what checks for keypresses, I don’t see an obvious way of doing that. Well, BEEP (and a few other BASIC commands) do disable interrupts, but making a long BEEP is more of a cheat.

EDIT: Oh, you can’t fool BASIC that easily, either. BEEP doesn’t allow to play super long notes. :D

Re: Freezing Basic

Posted: Wed May 16, 2018 8:30 pm
by AndyC

Code: Select all

10 POKE 23620,0
;)

Re: Freezing Basic

Posted: Wed May 16, 2018 9:25 pm
by PeteProdge
R-Tape wrote: Wed May 16, 2018 8:03 pm Is it possible to properly freeze BASIC (disable BREAK) without using POKE or any USR?
There was a small machine code routine printed in Your Sinclair's Program Pitstop - I'm sure it was under the confusing name of 'Break-Out'. It made BASIC unbreakable. The BREAK key was just treated as if you pressed the SPACE bar on its own.

Re: Freezing Basic

Posted: Wed May 16, 2018 9:40 pm
by Seven.FFF
R-Tape wrote: Wed May 16, 2018 8:03 pm without using POKE or any USR?
Custom ROM'd do it! ;P