6.24.5 Terminal output

If you are outputting to a terminal, you may want to control the positioning of the cursor:

at-xy ( x y –  ) facility “at-x-y”

Put the curser at position x y. The top left-hand corner of the display is at 0 0.

at-deltaxy ( dx dy –  ) gforth-0.7

With the current position at x y, put the cursor at x+dx y+dy.

In order to know where to position the cursor, it is often helpful to know the size of the screen:

form ( – nlines ncols  ) gforth-0.2

And sometimes you want to use:

page ( ) facility

Clear the screen

Note that on non-terminals you should use #ff emit, not page, to get a form feed.