Category : Forth Source Code
Archive   : FPCHERC.ZIP
Filename : HGTEXT.DOC

Output of file : HGTEXT.DOC contained in archive : FPCHERC.ZIP
\ HGTEXT.DOC -- documentation file for HGTEXT.SEQ

HGTEXT.SEQ provides the capability for Hercules Graphics cards users
to mix text & graphics when using F-PC. The package consists of five
HGTEXT.SEQ Source file containing most of the functionality
of the package.
HGTEXT.DOC This file.
HERCVID.SEQ Low level stuff to plot a pixel, fetch a pixel,
draw lines, etc.
HGDEMO.SEQ Demonstration of how to use some of the words
defined in these files.
8X8.FON A text font defining the character shapes
that will be output to the screen when in graphics
text mode.

Below are some of the more important words in this application along with
their stack diagrams and a brief description of each.

CGS ( --) Clear Graphics Screen. Also places the graphics text
cursor at the upper left corner of the graphics screen,
which may be outside the graphics text window. See also
COLOR ( --addr) This variable stores the value of the color to be
plotted. Since these files are intended to be used with
a Hercules Graphics card on a monochrome system there are
only two colors. These are black (0) and white (1).
DRAW ( x1 y1 x2 y2--) Draws a line between (x1,y1) & (x2,y2). This
recursive algorithm was written by Dr C. H. Ting.
GE ( --) Graphics Emit. Causes future text output to be printed
on the graphics screen as well as the regular text screen.
TE cancels this.
GMODE ( --) Sets the display to Hercules Graphics mode. Does not
affect how text is output. Ref. GE and TE.
GR ( --) This sets the display to the Hercules Graphics mode and
clears the screen. Does not home cursor. See CGS.
LOAD.FONT ( --) Accepts a file name from input stream at run time loads
it into the font buffer. The file provided for this
purpose is 8X8.FON. The font buffer has 4096 bytes
allocated to it, which is big enough for a 16X8 font.
To change the font size you should take care to:
- make sure enough space has been reserved when font.buf
is created
- change csx & csy (Character Size X & Y)
In the current configuration LOAD.FONT is used by typing:
HGDARK ( --) Clears graphics text window.
HGHOME ( --) Places graphics text cursor at upper left corner of
graphics text window. Compare with CGS.
HLIN ( x1 x2 y--) Draws a horizontal line from (x1,y) to (x2,y).
PLOT ( x y--) Plots the point (x,y). Be sure to set COLOR to the
desired value before using PLOT.
PLOT.TO ( x y--) Draw a line from the last plotted point to (x,y).
SCRN ( x y--color) Fetches the value of a pixel. Since this is a
monochrome application the value returned by SCRN is
either 0 or 1.
TE ( --) Text Emit. Causes future text output to be printed on
the text screen only. See GR.
TMODE ( --) Sets display to text mode. Does not affect how text is
output. See TE and GE above.
TWIND ( x1 y1 x2 y2--) Sets boundaries of graphics text window.
(x1,y1) is upper left corner of window.
(x2,y2) is lower right corner of window. All arguments
are in text rows & columns, not pixels.
TXT ( --) Sets display to text mode. Equivalent to TMODE.
VLIN ( y1 y2 x--) Draws a vertical line from (x,y1) to (x,y2).

  3 Responses to “Category : Forth Source Code
Archive   : FPCHERC.ZIP
Filename : HGTEXT.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: