Enable
Previous  Next

Description: Enables <DeviceType>

     Syntax:
     
Enable <DeviceType> [, <DeviceId>]

Part
Description
<DeviceType>
Required.The target device to disable.
<DeviceId>
Required. This sets the Data Type of the variable

<DevideType>
Description
InterruptExternal
Interrupt External
ExtInt
InterruptExtInt
Enables the external interrupt from the controller/expansion ports. The HV counter is latched and can't be read outside of the interrupt like you would do for rasters. When the counter is latched, that means it will stay a constant value and will not update with the TV trace. To read the HV counter in real-time, Disable this interrupt.

You will need to specify the <DeviceId> in order for it to function properly.
InterruptHBlank
Interrupt HBlank
HBlank
Enables the horizontal interrupt. This command has to be executed in order for horizontal blanking events to be triggered.It's recommended that this command to be placed anywhere after an On <Event> command.
InterruptVBlank
Interrupt VBlank
VBlank
Enables the vertical interrupt. This command has to be executed in order for vertical blanking events to be triggered.It's recommended that this command to be placed anywhere after an On <Event> command.
Screen
Disables the screen. Blanking signals are still sent to the TV and the only component drawn is the backdrop color. Horizontal and vertical interrupts are disabled, as are the status signals, so any status dependent routines will freeze, such as Sleep.
Sram
Enables Sram access.

Notes:<DeviceId> is only for the external interrupts. Valid values are:

Example:

        On VBlank Gosub MyVblank
        Enable VBlank
        End

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