BIOS
Cookie jar
XBRA procedure
The output functions of the GEMDOS or BIOS can emulate a VT52
video terminal. All control sequences are prefaced by the ESC character
of the ASCII code, followed by further characters for the desired
function. That is why one also speaks about Escape sequences.
The ASCII code control sequences are available as well.
The VT52 emulator has the following control sequences available:
The VT52 emulation of TosWin2 adds the following extensions:
Code |
Name |
Meaning |
ESC 3 <c> |
ANSI foreground color |
Set foreground color. |
ESC 4 <c> |
ANSI background color |
Set background color. |
ESC F |
Enter graphics mode |
Start alternate character set. |
ESC G |
Exit graphics mode |
End alternate character set. |
ESC R <cols,rows> CR |
Set window size |
Set window size. |
ESC S <s> CR |
Set title bar |
Set window title. |
ESC Z |
Identify |
Sends response ESC / Z |
ESC a |
Delete character |
Delete character at cursorposition. |
ESC h |
Enter insert mode |
Enter insert mode. |
ESC i |
Exit insert mode |
Exit insert mode. |
ESC u |
Original colors |
Reset colors to original colors. |
ESC y <c> |
Set text effects |
Set text effects. |
ESC z <c> |
Clear text effects |
Clear text effects. |
Note: Programs that use VT52 sequences for drawing the
screen should, of course, use all of the available area. However, as
this area can not be ascertained with GEMDOS, BIOS or XBIOS
functions, the following conventions apply:
If the environment variables LINES (ROWS) and COLUMNS exist,
then they contain the maximum number of lines or columns respectively.
In the following escape sequence entries, C macros are shown as
an example. As the call of the escape sequences results in an output
of the corresponding characters, the C example should be easily ported
to other languages.
See also: ASCII table Scancode table
Name: |
»Blink off« - Switch off cursor blinking.
|
Declaration: |
#define Blink_off() Cursconf ( 3, 0 )
|
Description: |
'Blink_off' is a function macro with which the blinking of the
cursor can be switched off. The XBIOS function Cursconf is used for
this.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Blink on« - Switch on cursor blinking.
|
Declaration: |
#define Blink_on() Cursconf ( 2, 0 )
|
Description: |
'Blink_on' is a function macro with which the blinking of the
cursor can be switched on. The XBIOS function Cursconf is used for
this.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Clear to end of screen« - Clear screen from the cursor
onwards.
|
Declaration: |
#define Clear_down() Cconws("\33J")
|
Description: |
With 'Clear to end of screen' one can clear the screen from the
cursor position onwards.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Clear to end of line« - Clear current line from the cursor
onwards.
|
Declaration: |
#define Clear_eol() Cconws("\33K")
|
Description: |
With 'Clear to end of line' one can clear the current line from
the cursor position onwards.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Clear screen« - Clear the screen.
|
Declaration: |
#define Clear_home() Cconws("\33E")
|
Description: |
With 'Clear screen' the complete screen can be cleared and the
TOS-cursor positioned in the upper left corner of the screen.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Clear line« - Clear the current line.
|
Declaration: |
#define Clear_line() Cconws("\33l")
|
Description: |
With 'Clear line' the current line can be cleared. The
following lines will not be moved up. The cursor will be placed at the
start of the line.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Clear to start of line« - Clear current line up to the
cursor.
|
Declaration: |
#define Clear_sol() Cconws("\33o")
|
Description: |
With 'Clear to start of line' the current line can be cleared
up to the cursor position.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Clear to start of screen« - Clear screen up to the cursor.
|
Declaration: |
#define Clear_up() Cconws("\33d")
|
Description: |
With 'Clear to start of screen' the screen can be cleared up to
the cursor position.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Cursor down« - Move cursor one line downwards.
|
Declaration: |
#define Cur_down() Cconws("\33B")
|
Description: |
With 'Cursor down' the TOS-cursor can be moved one line
downwards. If the cursor is already in the lowest line then nothing
happens.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Cursor home« - Move cursor into the upper left corner.
|
Declaration: |
#define Cur_home() Cconws("\33H")
|
Description: |
With 'Cursor home' one can place the TOS-cursor in the upper
left corner of the screen.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Cursor left« - Move cursor one column to the left.
|
Declaration: |
#define Cur_left() Cconws("\33D")
|
Description: |
With 'Cursor left' the TOS-cursor can be moved one column to
the left. If the cursor is already in the left-most column, then
nothing happens.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Hide cursor« - Switch off cursor.
|
Declaration: |
#define Cur_off() Cursconf ( 0, 0 )
|
Description: |
'Cur_off' is a function macro, with which the cursor can be
switched off. The XBIOS function Cursconf is used for this.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Show cursor« - Switch on cursor.
|
Declaration: |
#define Cur_on() Cursconf ( 1, 0 )
|
Description: |
'Cur_on' is a function macro, with which the cursor can be
switched on. The XBIOS function Cursconf is used for this.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Cursor right« - Move cursor one column to the right.
|
Declaration: |
#define Cur_right() Cconws("\33C")
|
Description: |
With 'Cursor right' one can move the TOS-cursor by one
column to the right. If the cursor is already in the right-most
column, then nothing happens.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Cursor up« - Move cursor one line upwards.
|
Declaration: |
#define Cur_up() Cconws("\33A")
|
Description: |
With 'Cursor up' the TOS-cursor can be moved one line
upwards. If the cursor is already in the top line, then nothing
happens.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Delete line« - Remove line.
|
Declaration: |
#define Del_line() Cconws("\33M")
|
Description: |
With 'Delete line' the current line can be deleted. The
following lines will be moved up, the cursor will be set at the start
of the line.
|
See also: |
Escape sequences VT-52 terminal
|
C-sequence |
Value |
Character |
Effect |
\a |
0x07 |
BEL |
Bell (System bell) |
\b |
0x08 |
BS |
Backspace |
\f |
0x0C |
FF |
Formfeed (Page feed) |
\n |
0x0A |
LF |
Linefeed (Newline) |
\r |
0x0D |
CR |
Carriage return |
\t |
0x09 |
HT |
Tabulator (horizontal) |
\v |
0x0B |
VT |
Tabulator (vertical) |
See also: VT-52 terminal GEMDOS BIOS XBIOS
Name: |
»Get blink rate« - Obtain cursor blink rate.
|
Declaration: |
#define Get_blink() Cursconf ( 5, 0 )
|
Description: |
'Get_blink' is a function macro with which the rate of the
cursor blink can be established. The XBIOS function Cursconf is used
for this.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Set cursor position« - Position the cursor.
|
Declaration: |
#define Goto_pos(x,y) (Cconws("\33Y"),Cconout('
'+y),Cconout(' '+x))
|
Description: |
With 'Set cursor position' one can position the cursor in the
x-th line and y-th column. Please note that the count starts at 32
(the screen has coordinates (32,32) at the upper left of the screen).
That is why 32 (spaces) were added in the above macro, so that the
count can start at 0 when using the macro.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Foreground color« - Set text color.
|
Declaration: |
#define Ink(c) (Cconws("\33b"),Cconout(c))
|
Description: |
With 'Foreground color' one can set the text color. The number
of available colors depends on the current screen resolution.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Insert line« - Insert a line.
|
Declaration: |
#define Ins_line() Cconws("\33L")
|
Description: |
With 'Insert line' one can insert a line at the cursor
position. The cursor will be set at the start of the new line.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Line feed« - Line feed.
|
Declaration: |
#define Line_feed() Cconout('\n')
|
Description: |
'Line feed' sets the cursor in the next line (line feed).
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Restore cursor position« - Restore cursor.
|
Declaration: |
#define Load_pos() Cconws("\33k")
|
Description: |
With 'Restore cursor position' the cursor can be placed again
at the position it occupied earlier when "marked" with 'Save
cursor position'.
|
See also: |
Escape sequences VT-52 terminal Save_pos
|
Name: |
»Background color« - Set background color.
|
Declaration: |
#define Paper(c) (Cconws("\33c"),Cconout(c))
|
Description: |
With 'Background color' one can set the background color. The
number of available colors depends on the current screen resolution.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Carriage Return« - Move cursor to the start of the line.
|
Declaration: |
#define Return() Cconout('\r')
|
Description: |
'Return' sets the cursor to the start of the current line.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Normal video« - Switch off inverse video.
|
Declaration: |
#define Rev_off() Cconws("\33q")
|
Description: |
With 'Normal video', inverse video for the text can can be
switched off again.
|
See also: |
Escape sequences VT-52 terminal Rev_on
|
Name: |
»Reverse video« - Switch on inverse video.
|
Declaration: |
#define Rev_on() Cconws("\33p")
|
Description: |
With 'Reverse video', one can switch on inverse video
(background and text colors swapped over). This mode can be switched
off again with 'Normal video'.
|
See also: |
Escape sequences VT-52 terminal Rev_off
|
Name: |
»Save cursor position« - "Remember" cursor
position.
|
Declaration: |
#define Save_pos() Cconws("\33j")
|
Description: |
With 'Save cursor position' the current cursor position can be
stored in an internal buffer. The stored cursor position can be
restored later with 'Restore cursor position'.
|
See also: |
Escape sequences VT-52 terminal Load_pos
|
Name: |
»Cursor up and insert« - Move cursor one line upwards and
scroll.
|
Declaration: |
#define Scroll_up() Cconws("\33I")
|
Description: |
With 'Cursor up and insert' the TOS-cursor can be positioned
one line upwards. If the cursor is already in the top line, then the
screen contents are scrolled one line downwards and an empty line is
inserted.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Set blink rate« - Set cursor blink rate.
|
Declaration: |
#define Set_blink( rate ) Cursconf ( 4, rate )
|
Description: |
'Set_blink' is a function macro with which the rate of the
cursor blink can be set. The XBIOS function Cursconf is used for
this.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Tabulator« - Move cursor to next tabulator position.
|
Declaration: |
#define Tab() Cconout('\t')
|
Description: |
'Tab' sets the cursor at the next tabulator position.
|
See also: |
Escape sequences VT-52 terminal
|
Name: |
»Wrap on« - Switch on line-wrapping.
|
Declaration: |
#define Wrap_on() Cconws("\33v")
|
Description: |
With 'Wrap on' one can switch on line-wrapping. This has the
effect that when the end of a line is reached, the cursor will jump
automatically to the start of the next line.
|
See also: |
Escape sequences VT-52 terminal Wrap_off
|
BIOS
Cookie jar
XBRA procedure