User Tools

Site Tools


Command disabled: register
displaying_20inverse_20video

Displaying inverse video

Inverse video is a display mode where text and graphics on a display are presented as a negative of their original appearance.

Inverse Video Text

by Jon Ripley, May 2006

To read the current foreground and background text colours use the following code:

        fgcol% = @vdu%?70
        bgcol% = @vdu%?71

Here fgcol% and bgcol% are normalised values in the range 0 to 15 representing the logical colour used.

To invert the colours of the text display use the following code:

        COLOUR bgcol%
        COLOUR 128+fgcol%

Now any text you PRINT will be in inverse video.

To restore the original foreground and background text colours use the following code:

        COLOUR fgcol%
        COLOUR 128+bgcol%

Inverting the whole window

by Richard Russell, May 2006

You can invert all the existing colours in the output window (or in the graphics viewport, if one is defined) as follows:

        GCOL 4,128
        CLG

This will affect both text and graphics. Executing this code twice will restore the original colours.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
displaying_20inverse_20video.txt · Last modified: 2018/04/13 15:34 by richardrussell