Previous | Top | Index | Next |
The following routines are available after loading the library file ansi.r with the command: CALL import "ansi.r".
In the 32BIT version of rexx, Generoso Martello added most of the following routines as builtin. The advantage is that ANSI.SYS is no more required and they are much faster. Please refer to the README.32bit file for more informations.
Change the text attribute. attribute can take the values NORMAL, BOLD, UNDERLINE, BLINK, REVERSE, UNVISIBLECALL ansiattr("normal")
CALL ansiattr("bold")
Clear screen.CALL ansicls
ANSICOLOR(forecolor[,backcolor])
Set the foreground and background color, colors can the the following values BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE. The forecolor can also take the prefix BOLD. In case of a wrong color ERROR will be returnedCALL ansicolor("boldred")
CALL ansicolor("white","green")
Move cursor n lines down (default=1)CALL ansicursordown
Move cursor n columns left (default=1)CALL ansicursorleft
Move cursor n columns right (default=1)CALL ansicursorright 2
Move cursor n lines up (default=1)CALL ansicursorup 5
Clear from cursor position until end of line.CALL ansieraseeol
Move cursor to position x,yCALL ansigoto 10,5
Load cursor position, which was previously savedCALL ansisavecursor
....
CALL ansiloadcursor
Changes the Video mode to mode. Mode can take the values:
0 40x25 text mode black and white 1 40x25 text mode color 2 80x25 text mode black and white 3 80x25 text mode color 4 320x200 graphics mode color 5 320x200 graphics mode black and white 6 640x200 graphics mode black and white
CALL ansimode 3 /* 80x25 text mode */ CALL ansimode 0 /* 40x25 text mode */
Save cursor position, which can be restored laterCALL ansisavecursor
Previous | Top | Index | Next |