How do you say CONT in BBC BASIC?

discussion of beeb/electron applications, languages, utils and educational s/w
Post Reply
Posts: 1135
Joined: Wed Jan 27, 2016 12:50 am

How do you say CONT in BBC BASIC?

Post by Commie_User » Thu Oct 11, 2018 4:20 pm

On the CBM, you hit RUN STOP to break into a program and then type CONT to restart where you broke off.
Last edited by Commie_User on Thu Oct 11, 2018 4:21 pm, edited 1 time in total.

Posts: 662
Joined: Sat Jul 30, 2016 7:11 pm
Location: Oxford

Re: How do you say CONT in BBC BASIC?

Post by cmorley » Thu Oct 11, 2018 5:36 pm

I don't think that is possible in BBC BASIC. I think it whacks the state (FOR stack etc) if you STOP or END. I'd be fascinated to know if there is a work around (or my memory is false!). Variables remain intact.
Last edited by cmorley on Thu Oct 11, 2018 5:40 pm, edited 1 time in total.

User avatar
Posts: 1083
Joined: Sat Feb 23, 2008 10:16 pm
Location: Derby

Re: How do you say CONT in BBC BASIC?

Post by AndyF » Thu Oct 11, 2018 5:38 pm

ESCAPE key if its not been otherwise disabled is about the equivalent for Basic. At least as far as my very vague understanding of the CBM workings.

Hopefully the output "Escape at line xyz" assuming its shown will be helpful in restarting it via a GOTO, although I do see what you mean as other dialects have a CONTINUE command to (usually but not always!) carry on, ZX Basic etc. The only issue is that I see if said 'Escape line' contains multiple commands separated via a colon, there's no easy way to tell whereabouts it was in said line.

If it does not say anything try REPORT , if this shows 'Escape' then type P.ERL to get the line number it was stopped at.

Will be interested to read others replies on this as I'd never really thought about it that much until you mentioned it.
Last edited by AndyF on Thu Oct 11, 2018 5:39 pm, edited 1 time in total.

* NEW * The Jetset Willy and Manic Miner community :)

Adventure games ported across to the BBC (in progress) as soon as I can find some time!

User avatar
Posts: 3212
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: How do you say CONT in BBC BASIC?

Post by jgharston » Thu Oct 11, 2018 6:08 pm

If you have carefully written your program so that every line is solely a single statement, and every line increments by 10, then then GOTO ERL+10, bearing in mind that all structures (FOR/NEXT, REPEAT/UNTIL, GOSUB/RETURN, PROC/ENDPROC, FN/=) will have been abandoned.

If you are finding youself trying to write your error handler to jump back into the erroring code, than you are at the point where you need to back up and re-examine your requirements and assumptions and rewrite the code.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015

User avatar
Posts: 1765
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara

Re: How do you say CONT in BBC BASIC?

Post by lurkio » Thu Oct 11, 2018 7:02 pm

Warning! Extreme GOTO-usage ahead:
lurkio wrote:
Sat Oct 08, 2016 5:21 pm
... If you load the game as usual and wait for the data values to be read in, you can then save off all the memory between PAGE (&E00) and VARTOP (&7A36 in this case): this area of RAM stores all the values of the variables that the running program has assigned so far. You also have to save off the variable-pointers in Page 4 (&400 - &4FF).

Then, for the next time you want to play the game, you create a loader that reloads all the saved RAM, relocates the main-prog-plus-variable-storage down to &E00, sets up the BASIC pseudo-variables so as to "fool" BASIC into thinking it's already part-way through running the main program, and then does a GOTO to the jumping-in point in the program, bypassing the file-input routine. (It was actually much trickier to engineer all this than I'm making it sound. Believe me, this is the TL;DR version of the story.) ...

Post Reply