Commodore‎ > ‎BASIC‎ > ‎Keywords‎ > ‎


Keyword Abbreviation Token (hex) Version(s) Classification
GO none CB 2.0+ Command and Statement

GO mode
 ~ or ~
GO TO lineNumber [ , lineNumber ] ...
Parameters Type Legal Value(s) Default Value Note(s)
mode Unsigned Byte 64 Only valid in v7.0 (C128)
lineNumber Restricted Unsigned Integer 0 ~ 63999 Only the first lineNumber is used.  Must be a literal number.
Machine state control (form 1); switch machine to C64 mode
Program flow control (form 2).  Transfer program execution to the start of a (typically other) program line.

For details of form 2, see GOTO (without a space)... note this form, with a space between GO and TO is suppose to be indentical / synomyous to the original GOTO (no space).  However, a SYNTAX ERROR will be generated if you to try to use the ON preposition with this GO TO version.  Fail!  Or as I like to say: if it ain't broke, don't fix it.
Form 1 is only supported on the C128 when in "native" (128) mode; i.e., it only works v7.0.  The GO 64 switches the machine into C64 mode.  If this command is used in direct mode, a prompt "ARE YOU SURE?" appears and the user must enter something beginning with Y to actually execute the command.  In a program, the statement switches to 64-mode without question.  Any program in memory is "lost" and the BASIC 2.0 start-up message displays followed by a READY prompt.  Any open files will be forgotten and this can cause file corruption; so be sure to CLOSE any files before using this command/statment.  Technicial note: computer memory is not erased, but the C64 start-up sequence resets all secret variables so that any program from 128 mode would not be seen by BASIC 2.0 (not to mention, many of the BASIC 7.0 commands would cause an error in v2.0 because they are unknown).  By poking magic numbers into RAM where a C64 cartridge would be seen, it is possible to force a program to be run when 64 mode starts.  Note a 1571 disk drive that was accessed in 128 mode before GO 64 will have automatically switched into 1571 mode and thus may not work with programs that rely on the slower 1541 timing.  If the 1571 drive was never accessed in 128 mode (or if the user holds down C= while turning on a C128) the 1571 disk drive will be in 1541-compatibility mode.  You can manually force a 1571 into 1541 "compatibility" mode by sending command U0>M0 to channel 15 of the device (see PRINT#).
If mode is a string expression, TYPE MISMATCH ERROR occurs.  A numeric expression will effectively be converted with INT; if it is not in the range of an unsigned byte 0 ~ 255, an ILLEGAL QUANTITY ERROR occurs.  If it is a number in that range, but not a legal value (not 64) or if mode is omitted, or if mode is not a valid expression, then SYNTAX ERROR occurs.
GO 64
ARE YOU SURE? YEP (user input)

    **** COMMODORE 64 BASIC V2 ****

  Compare With  
  Contrast With  
  See Also  

© H2Obsession, 2014