On <Event>
Previous  Next

Description: During the interrupt, the program will jump to the specified routine. The routine should be ended with a Return.

     Syntax:
     
On <Event> GoSub <LineLabel>

Part
Description
<Event>
Required. Valid Event Types are:
  • InterruptExternal
  • Interrupt External
  • ExtInt
  • InterruptExtInt
  • InterruptHBlank
  • Interrupt HBlank
  • HBlank
  • InterruptVBlank
  • Interrupt VBlank
  • VBlank
<LineLabel>
Required. The line label where the event will jump to when enabled.

Example:

        On VBlank GoSuB MyVblank
        Enable VBLANK
        End

MyVblank:
        a++
        Locate 1,1: Print a
        Return