1 /* yForth? - Written by Luca Padovani (C) 1996/97
2 * ------------------------------------------------------------------------
3 * This software is FreeWare as long as it comes with this header in each
4 * source file, anyway you can use it or any part of it whatever
5 * you want. It comes without any warranty, so use it at your own risk.
6 * ------------------------------------------------------------------------
8 * Abstract: User Device Input/Output functions. Here are enclosed all
9 * non-portable functions.
18 /* d_clrscr: clear the screen */
25 /* d_clreol: clear to end of line */
32 /* d_setattr: set default attributes */
33 void d_setaddr(Cell attr) {
39 /* d_getattr: get default attributes */
44 return (ti.attribute);
48 /* d_gotoxy: move the cursor to the location (x, y) of the screen */
49 void d_gotoxy(Cell x, Cell y) {
55 /* d_wherex: current column position of the cursor */
62 /* d_wherey: current row position of the cursor */
69 /* d_getch: read a characted from the input device without displaying it and
70 * return as soon as the character is enteres (i.e. no wait for Carriage
79 /* d_kbhit: return True if a character is available */
86 /* d_open: Initialize the Input/Output device */
90 /* d_close: make some work when program finish to restore Input/Output device */