Available on: c64 c128 c64reu vic20

FLASH

The FLASH command is designed to create a flashing effect by automatically alternating color values ​​at a specific memory address, which can be a hardware register or a video memory cell. This command is useful for creating dynamic visual effects that run in parallel with program execution.

The main command syntax specifies the effect number (up to 4 can be configured, from 0 to 3), and a sequence of pairs: number of frames and color tone, separated by a comma. An extended syntax allows you to specify the address to which the timed values ​​are to be written. If this address is omitted, the standard address associated with the effect number will be used, which in turn depends on the chipset the program is running on:

* atari, atarixl: 0 = &H02C4, 1 = &H02C5, 2 = &H02C6, 3 = &H02C7

* c64, c128, c64reu: 0 = &HD021, 1 = &HD022, 2 = &HD023, 3 = &HD024

* vic20: 0..3 = &H900F

* c128z: 0..3 = &H900F

* cpc: 0..3 = palette 0..3

Note that on the VIC20, the first two effects are bound to the high and low nibbles of the address specified, respectively.

SYNTAX

 FLASH index, color, timer, color, timer[, color[, ...]] [ON address]


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 FLASH 0, 20, RED, 10, BLUE
 FLASH 0, 20, RED, 10, BLUE ON $d021


ABBREVIATION: FLa

Join BASIC 10Liner Contest with ugBASIC!

An interesting competition is held at the beginning of each year: the BASIC 10Liner Contest. It is possible to use ugBASIC to participate in the next "BASIC10Liner" competition, in the following categories:

  • PUR-120 - A game in 10 lines of max 120 characters (w/abbrev.)
  • EXTREME-256 - A game in 10 lines of max 256 characters (w/abbrev.)
  • SCHAU - Any program in 10 lines of max 256 characters (w/abbrev.)
In order to reduce space you can use this abbreviation for this instruction:

FLASH ↔ FLa

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS