@ (SCREENCODE)

Use @(SCREENCODE) to output control sequences according to the capabilities of the terminal

COMMAND SYNTAX

    @ (ScreenCode)

SYNTAX ELEMENTS

Control sequences for special capabilities of the terminal are achieved by passing a negative number as its argument. ScreenCode is therefore any expression that evaluates to a negative argument.

NOTES

The design of TAFC allows you to import code from many older systems. As these systems have traditionally not co-ordinated the development of this function they expect different functionality in many instances. In the following table, you should note that different settings of the JBCEMULATE environment variable would elicit different functionality from this function.

EmulationCodeFunction
all-1clear the screen and home the cursor
all-2Home the cursor
all-3clear screen from the cursor to the end of the
screen
all-4clear screen from cursor to the end of the
current screen line
ros-5turn on character blinking
ros-6turn off character blinking
ros-7turn on protected field mode
ros-8turn off protected field mode
all-9move the cursor one character to the left
all-10move the cursor one row up the screen
ros-11turn on the cursor (visible)
ros-11enable protect mode
ros-12turn off the cursor (invisible)
ros-12disable protect mode
ros-13status line on
ros-13turn on reverse video mode
ros-14status line off
ros-14turn off reverse video mode
ros-15move cursor forward one character
ros-15turn on underline mode
ros-16move cursor one row down the screen
ros-16turn off underline mode
all-17turn on the slave (printer) port
all-18turn off the slave (printer) port
ros-19dump the screen to the slave port
ros-19move the cursor right one character
ros-20move the cursor down one character
ros-311turn on the cursor (visible)
ros-312turn off the cursor (invisible)
ros-313turn on the status line
ros-314turn off the status line

If a colour terminal is in use, -33 to -64 will control colours.

The codes from -128 to -191 control screen attributes. Where Bit 0 is least significant, you may calculate the desired code by setting Bit 7 and Bits 0-5:

Bit ValuesDescription
Bit 0dimmed mode when set to 1
Bit 1flashing mode when set to 1
Bit 2reverse mode when set to 1
Bit 3blanked mode when set to 1
Bit 4underline mode when set to 1
Bit 5bold mode when set to 1
Bit 7always set to 1

Thus, reverse and flashing mode is -134.

To turn off all effects use -128.

EXAMPLE

       CRT @(-1):@(30):@(52):'jBASE Heading':@(-128):
       CRT @(5,5):@(-4):'Prompt: ': ; INPUT Answer
Last update: Sat, 16 Jul 2022 15:34