Enable

Last Modified: 1/2/2021

Enables a device.

Arguments

NameTypeRequiredDescription
DeviceName System Identifier Yes The name of the device you want to enable.
DeviceId Integer Yes This is required only when enabling ExtInt

Device List

DeviceName Description
ExtInt Enables the External Interrupt.
InterruptHBlank, hint , hBlank Enables the Horizontal Interrupt.
InterruptVBlank, vint , vBlank Enables the Vertical Interrupt.
Screen Enables the display.
SRAM Enables access to SRAM.

Example

Syntax: Enable <DeviceName> [, <DeviceId>]
    On vInt GoSub VintProc
    Enable vInt
    
    vb_on = True
    
    While 1
    j = JoyPad()
    Locate 1,1: Print a
    If j.7 Then
        If vb_on = True Then
            vb_on = False
            Disable vInt
        Else
            vb_on = True
            Enable vInt
        End If
        WaitPadUp 0
    End If
    Sleep 1
    Wend

VintProc:
    a++
    Return

Remarks

The ExtInt requires a DeviceId:

Device ID

ID Description
0 Player 1.
1 Player 2.
2 Expansion port (Model 1).

See Also

Disable, On