SecondBASIC Documentation v3

Home / Command Reference / HBlank

HBlank

Description: Used for setting the <ScanLine> for which the horizontal blank occurs.

Syntax:

HBlank <ScanLine>

Part Description
<ScanLine> Required. Sets the scanline count in which the horizontal blank will occur. Valid range is 0 to 222 will be counted before execution + 1. If is set to 0, the horizontal interrupt will execute on each line. This value isn't recommended as the vertical interrupt will never occur.

Example:

    On InterruptVBlank GoSub vb
    Enable InterruptVBlank
 
    hBlank 111
 
    On InterruptHBlank GoSub hb
    Enable InterruptHBlank
 
    End
 
vb:
    Palette 0,0,0
    Return
 
hb:
    Palette 3822,0,0
    Return