Last Modified: 1/4/2021
Sets the line label of code to run during an Interrupt.
Name | Type | Required | Description |
Interrupt | System Identifier | Yes | The type of Interrupt you are setting up. |
Label | Line Label | Yes | The label where the code you wish to execute during the Interrupt. |
Type | Description |
ExtInt, InterruptExtInt | Sets the routine for the external interrupt. |
HBlank, hInt, InterruptHBlank | Sets the routine for the horizontal interrupt. |
InterruptVBlank, VBlank, vInt | Sets the routine for the vertical interrupt. |
Syntax: On <Interrupt> Gosub <Label> |
On vInt GoSuB MyVblank Enable vInt While 1 Locate 1,1 Print b Sleep 1 Wend MyVblank: a++ If a = 60 Then b++ a = 0 End If Return |
The vertical interrupt executes 60 times per second on NTSC systems, and 50 times on PAL. The horizontal interrupt is significantly shorter in time, and is generally used for raster effects.
Due to the horizontal interrupt wrapper in the BASIC library, very few rasters can actually be done in SecondBASIC Studio.