Home
CBM
  ASCII-X
  BASIC
    Disk Commands
    Enter RUN mode
    Program Format
    Secret Variables
    Variable Format
    Expressions
    Keywords
      (divide)
      (equal)
      (less)
      (minus)
      (more)
      (multiply)
      (plus)
      (power)
      Abs
      And
      Append
      Asc
      Atn
      Auto
      Backup
      Bank
      Begin
      Bend
      Bload
      Boot
      Box
      Bsave
      Bump
      Catalog
      Char
      Chr
      Circle
      Close
      Clr
      Cmd
      Collect
      Collision
      Color
      Concat
      Cont
      Copy
      Cos
      Data
      Dclear
      Dclose
      Dec
      Def
      Delete
      Dim
      Directory
      Dispose
      Dload
      Do
      Dopen
      Draw
      Ds
      Ds string
      Dsave
      Dverify
      El
      Else
      End
      Envelope
      Er
      Err
      Exit
      Exp
      Fast
      Fetch
      Filter
      Fn
      For
      Fre
      Get
      Get num
      Getkey
      Go
      Gosub
      Goto
      Graphic
      Gshape
      Header
      Help
      Hex
      If
      Input
      Input num
      Instr
      Int
      Joy
      Key
      Left
      Len
      Let
      List
      Load
      Locate
      Log
      Loop
      Mid
      Monitor
      Movspr
      New
      Next
      Not
      Off
      On
      Open
      Or
      Paint
      Peek
      Pen
      Pi
      Play
      Pointer
      Poke
      Pos
      Pot
      Print
      Print num
      Pudef
      Quit
      Rclr
      Rdot
      Read
      Record
      Rem
      Rename
      Renumber
      Restore
      Resume
      Return
      Rgr
      Right
      Rlum
      Rnd
      Rreg
      Rspcolor
      Rsppos
      Rsprite
      Run
      Rwindow
      Save
      Scale
      Scnclr
      Scratch
      Sgn
      Sin
      Sleep
      Slow
      Sound
      Spc
      Sprcolor
      Sprdef
      Sprite
      Sprsav
      Sqr
      Sshape
      St
      Stash
      Step
      Stop
      Str
      Swap
      Sys
      Tab
      Tan
      Tempo
      Then
      Ti
      Ti string
      To
      Trap
      Troff
      Tron
      Until
      Using
      Usr
      Val
      Verify
      Vol
      Wait
      While
      Width
      Window
      Xor
    Syntax
    Tokens
  C128
  D64plus
  Disk
  Escape Codes
  Hardware
  PCxface
  PETSCII
  Pet2asc
Futurama
IBM PC-AT
Contact
Games
Glossary
Hall of fame
Hall of shame
Miscellaneous
Privacy policy
Programming
Twisty puzzles
KeywordAbbreviationToken (hex)Version(s)Classification
CONTC{Shift+O}9A1.0 to 3.5Command and Statement*
CONTnone9A4.0 to 7.0Command and Statement*

 
Syntax 
CONT
 
 
Purpose 
Program flow control.  Resume executing a STOP'd program.

 
 
Remarks 
This command is intended for debugging.  When a program has been halted with the STOP (or END) statement or the STOP key, this command will generally switch the BASIC interpreter into RUN Mode and resume program execution at the next statement.  If there is no next statement (because the physical end of the program has been reached) the BASIC interpreter will then immediately switch back to direct mode and print READY (i.e., no error).
 
Once a program is stopped, the user is generally free to do anything desired in direct mode before (s)he continues the program.  However, the user should not add, DELETE, RENUMBER, or edit any program lines.  CLR should not be used.  Hopefully it is obvious the user should not load another BASIC program or NEW the current program either!  The user should also not enter commands that generate an error.  Violation of these "rules" will cause CONT to generate a CAN'T CONTINUE ERROR.  Note, however, that BASIC 4.0+ (and some BASIC extensions) permit the user to load a non-BASIC-program file with BLOAD (or similar) without causing a "violation of the rules."
 
Likewise, if the program stopped because of an error, or no program was previously executing, the CONT command will generate CAN'T CONTINUE ERROR.
 
* CONT may be entered as a statement within a program, but the effect varies on different machines.  On the C64, for example, the computer seems to get stuck on line zero (even if the program has no line zero).  On the C128, the statement is simply ignored.
 
In any case, the user may choose to resume the program by using GOTO (basically required if you CAN'T CONTINUE), but GOTO always starts execution on the first statement in a line, so the exact position that would (theoretically) be executed with CONT may not be reachable.  Using GOTO to resume at a relatively far distance from where the program stopped may later cause errors due to skipped LOOP/NEXT/RETURN statements.
 
This statement updates a secret variable.  It is secret because BASIC provides no way to read the value (except for machine-specific PEEK).  It sets the secret value to "in RUN mode" (128).
 
Compare With 
 
Contrast With 
 
See Also 

© H2Obsession, 2014