In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Flashing Background

Users of VIDEO.RW will be aware that the colour attributes for each byte of information on screen are stored in a single character, yet generally colour escape sequences are four characters long. The conversion between these formats is facilitated by the AREV functions ESC.TO.ATTR and ATTR.TO.ESC. Thus to get the screen attribute for Yellow on Blue (Esc C1N) one would simply say ATTR = ESC.TO.ATTR(CHAR(27) : "C1N"). Converting from attribute to escape conversely uses the ATTR.TO.ESC.

The highest bit of the colour attribute determines whether or not the colour has a flashing background. If the highest bit is set the background will flash. If not the background will remain normal. To set the highest bit it is necessary to BITOR the attribute with 128. Try running the following with a (B option


0001            DECLARE FUNCTION ATTR.TO.ESC, ESC.TO.ATTR
0002  
0003            X = ESC.TO.ATTR(@AW<4>)
0004            X = BITOR(SEQ(X),128)
0005            X = ATTR.TO.ESC(CHAR(X))
0006            PRINT @AW<4> : "Hello"
0007            PRINT X : "Hello"
0008            INPUT X,1

(Volume 1, Issue 10, Page 9)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel