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
FASTF{Shift+A}FE 257.0Command and Statement

 Syntax 
FAST
 
 Purpose 
Machine state managment.  Directs the CPU to operate at maximum speed.

 
 Remarks 
FAST sets the computer to operate at its fastest speed.  On the C128, this is about 2MHz and, except for I/O routines, the BASIC program will run about twice as fast as normal.  In this mode, the VIC-II (40-Column display) is disabled, so it is only recommended for programs running in 80-column mode, or perhaps for brief periods in 40-Column mode where user interaction is not needed. 
 
Note that any SPRITEs that are enabled will continue to slow down the CPU a bit (generally two CPU cycles for every raster of each active sprite).  Because the SPRITEs can not be seen, they should be disabled as well for maximum speed. 
 
The system "Jiffy Clock" still updates at the normal rate of 60 units ("jiffies") per second (see TI/TI$), regardless of FAST or SLOW mode.  The SLEEP statement uses the Jiffy Clock so it is not affected, but timing delays using FOR/NEXT will execute twice as quickly (as compared to SLOW mode).
 
Technical note (this is really outside of BASIC): During I/O routines (except to the keyboard/screen) the KERNAL will momentarily change the CPU speed to "slow" 1MHz mode, but then restore the previous speed setting when done.
 
Attempting to supply a parameter to FAST will generate SYNTAX ERROR.
 
On the C64, some programs were written that would blank the VIC-II screen to increase speed.  That improves speed by about 10%, but FAST improves speed by about 100% -- a big difference.  FAST is not possible on a real C64, but using POKE 53296,1 will enable 2MHz speed on a C128 that is in 64-mode (you should also blank the scren); do not attempt any external I/O in this state!  (The C128 is designed to deal with this, but not the C64 or 64-mode.)
 
Example:
SLOW : FOR T = 1 TO 1000 : NEXT(delay about 1.4 seconds)

READY.
FAST : FOR T = 1 TO 1000 : NEXT(delay about 0.7 seconds)

READY.
 
 Compare With 
 
 Contrast With 
 
 See Also 
FOR, PLAYSLEEPSOUNDTI, TI$ 

© H2Obsession, 2014