Collection of libraries of ForthCMP compiler for programming on HP100/200LX computers.
Pavel Zampach (zampach@volny.cz), 2002
Graphic library for HP100/200LX. This is port to FortCMP of original LXGRAPH by Curtis Cameron. Added some routines from J. A. Wrotniak's graphic library.
( x1 y1 x2 y2 adr cl -- )
| x1 | x-coord of left upper corner |
| y1 | y-coord of left upper corner |
| x2 | x-coord of right bottom corner |
| y2 | y-coord of right bottom corner |
| adr | address of title text string |
| cl | says whether to clear first (boolean) |
draws shadow box with title.
( x1 y1 x2 y2 cl -- )
| x1 | x-coord of left upper corner |
| y1 | y-coord of left upper corner |
| x2 | x-coord of right bottom corner |
| y2 | y-coord of right bottom corner |
| cl | says whether to clear first (boolean) |
draws shadow box.
( x1 y1 x2 -- )
| x1 | x-coord of origin |
| y1 | y-coord of origin |
| x2 | x-coord of end |
draws horizontal line, using pen and line types previously set.
( x1 y1 y2 -- )
| x1 | x-coord of origin |
| y1 | y-coord of origin |
| y2 | y-coord of end |
draws verical line, using pen and line types previously set.
( x1 y1 x2 y2 -- )
| x1 | x-coord of origin |
| y1 | y-coord of origin |
| x2 | x-coord of end |
| y2 | y-coord of end |
draws line, using pen and line types previously set.
( x1 y1 x2 y2 fill -- )
| x1 | x-coord of left upper corner |
| y1 | y-coord of left upper corner |
| x2 | x-coord of right bottom corner |
| y2 | y-coord of right bottom corner |
| fill | 0=outline, 1=pen fill, 2=pattern fill |
draws filled rectangle.
( n -- )
| n | G_FORCE, G_AND, G_NOT, G_OR, G_XOR, G_FORCETEXT |
sets rule for next drawing.
( x1 y1 x2 y2 addr -- )
| x1 | x-coord of left upper corner |
| y1 | y-coord of left upper corner |
| x2 | x-coord of right bottom corner |
| y2 | y-coord of right bottom corner |
| addr | have to be set to point to memory area large enough to hold the image |
stores screen area into memory (in data segment).
( x y addr repl -- )
| x | x-coord of left upper corner |
| y | y-coord of left upper corner |
| addr | point to memory |
| repl | G_FORCE, G_AND, G_NOT, G_OR, G_XOR, G_FORCETEXT |
places area from memory to screen. This routine has one more parameter then original Cameron's one (repl)!
( x1 y1 x2 y2 -- )
| x1 | x-coord of left upper corner |
| y1 | y-coord of left upper corner |
| x2 | x-coord of right bottom corner |
| y2 | y-coord of right bottom corner |
sets clip area.
( x y -- c )
| x | x-coord |
| y | y-coord |
| c | color of pixel - WHITE (0) or BLACK (1) |
reads the pixel color.
Library for generating pseudo-random numbers. This file should be included before the application.
Pavel Zampach (zampach@volny.cz), 2002