STARBASE(3G)
NAME
STARBASE − Starbase Graphics Library description
DESCRIPTION
The Starbase Graphics Library consists of procedures used to generate graphical text and pictures. This library is based on the American National Standards Institute’s Computer Graphics Interface standard (ANSI CGI). The Starbase Graphics Library provides a high performance interface to HP graphics hardware and other selected graphics peripherals. These library routines may be used in C, Pascal and Fortran77 programs. In addition to the standard ANSI-CGI functions, Starbase provides asynchronous input functions, 3D transformations and access to many device dependent hardware features.
FILES
The following files make up the Starbase Graphics Library. Each is shown with a description of its function. These files are located in the /usr/lib directory.
libddbyte.aHP9000/Windows memory file
libddhil.aHP-HIL Device Driver
libddhpgl.aHP-GL Device Driver
libddkbd.aThe Keyboard Device Driver
libsb1.aStarbase Main Library
libsb2.aStarbase Stub Entry Point
libwindow.aHP9000/Windows Device Driver
libddhpterm.aGeneric HP Terminal Driver
libdd262x.aGeneric HP Terminal Driver
libdd300h.aHP 300 High Resolution Display Device Driver
libdd300l.aHP 300 Low Resolution Display Device Driver
libdd98700.aHP 98700 Device Driver
libdd98710.aHP 98710 Device Driver
libdd98760.aHP 98760 Device Driver
libdd9836c.aHP 9836C Device Driver
libdd9836a.aHP 9836A, and HP 98204B Device Driver
The following files are found in the /usr/include directory and should be used with the appropriate programming language.
starbase.c.hC program header file
starbase.f1.hFortran77 program header file
starbase.f2.hFortran77 program header file
starbase.p1.hPascal program header file
starbase.p2.hPascal program header file
INPUT PARAMETERS
fildes
MKNOD SPECIAL FILES
HPGL Device Driver
The <sc> parameter is the select code of the HP_IB card or Serial Interface Card. The <AD> parameter is the HP_IB or Serial Interface Card’s address.
Series 500 Syntax
mknod /dev/hpgl c 12 0x<SC><AD>00 ... (for HPIB Card)
mknod /dev/hpgl c 37 0x<SC><AD>00 ... (for internal 550 HPIB)
mknod /dev/hpgl c 31 0x<SC><AD>00 ... (for Serial interfaces 27128/27130)
mknod /dev/hpgl c 29 0x<SC><AD>00 ... (for Modem mux interface 27140)
Series 200/300 Syntax
mknod /dev/hpgl c 21 0x<SC><AD>00
HP_HIL Device Driver
The <GI> parameter is the Graphics Interface Number and the <AD> parameter is the Address on the HIL serial loop.
Series 500 Syntax
mknod /dev/hilxx c 42 0xff<GI><AD>
Series 200/300
mknod /dev/hilx c 42 0x0000<AD>
HPTERM Device Driver
The device file to use is /dev/tty if you want the output to go to the terminal you are logged into. See your System Administrator for details on using other terminals. Usually, the other terminals are designated as /dev/tty01, /dev/tty02, etc.
HP300h/HP300l Device Driver
Series 300 Syntax
mknod /dev/crt c 12 0x000000 ... (when alone)
mknod /dev/crt c 12 0x000100 ... (when also using hp98204b)
HP9836A Device Driver
Series 200/300
mknod /dev/crt c 12 0x000000
HP9836C Device Driver
Series 200
mknod /dev/crt c 12 0x000000
HP9837 Device Driver
mknod /dev/crt c 12 0x000000
HP98700 Device Driver
Series 500 Syntax
The <GI> parameter is the graphics interface number.
mknod /dev/crtxx c 15 0xff<GI>00
OR
mknod /dev/crtxx c 15 0x<GI>0000
Series 300 Syntax
The <SC> parameter is the external select code of the HP98700 device.
mknod /dev/crt c 12 0x000000 ... (for console device)
mknod /dev/crt c 12 0x<SC>0200 ... (for external select code)
HP98710 Device Driver
Series 500 Syntax
The <GI> parameter is the graphics interface number
mknod /dev/crtxx c 15 0x<GI>0000
OR
mknod /dev/crtxx c 15 0xff<GI>00 {Does not work on HP-UX rev. 5.01}
Series 300 Syntax
The <SC> parameter is the external select code of the HP98710 device
mknod /dev/crt c 12 0x000000 ... (for console device)
mknod /dev/crt c 12 0x<SC>0200 ... (for external select code)
HP98760 Device Driver
Series 500 Syntax
mknod /dev/crt c 32 0x010000
HP Keyboard Device Driver
The device file to use is /dev/tty if you want the input to come from the terminal you are logged into. See your System Administrator for details on using other terminals. Usually, the other terminals are designated as /dev/tty01, /dev/tty02, etc.
LOADING STARBASE PROGRAMS
The order of specification of link files is extremely important and must be in the following order: driver(s), libsb1.a, libsb2.a. Some drivers may require that additional libraries are linked with them. For instance, using libddhpgl.a requires that libdvio.a be linked as well. Specific requirements will be described in The Starbase Device Drivers Manual.
For example: to compile and link the C program test.c for running on a terminal, hp98700 or hpgl plotter, use:
cc test.c -lddhpterm -ldd98700 -lhpgl -lsb1 -lsb2 -ldvio -o test -O
LOADING STARBASE WINDOW PROGRAMS
To load a Starbase program, which may be directed to a window, the window library and possibly the byte driver must be included. The byte driver needs to be included for programs which will draw to obscured graphics windows which are retained. Again, the order is important:
driver(s), [byte_driver], window_library, libsb1.a, libsb2.a
For example:
cc test.c -ldd98700 -lddbyte -lwindow -lsb1 -lsb2 -o test -O
INCLUDE FILE USAGE
The following templates show how include files should be used with the various language bindings:
C INCLUDE TEMPLATE
#include <starbase.c.h>
func()
{
/* function body */
}
main()
{
/* program body */
}
FORTRAN INCLUDE TEMPLATE
include ’/usr/include/starbase.f1.h’
program main
CPARAMETER statements
character NULL
parameter(NULL = char(0))
include ’/usr/include/starbase.f2.h’
CVARIABLE declarations
Cprogram body and/or subroutines and functions
end
PASCAL INCLUDE TEMPLATE
program main(input,output);
$include ’/usr/include/starbase.p1.h’$
{ CONSTANTS }
{ TYPES }
{ VARIABLES }
$include ’/usr/include/starbase.p2.h’$
{ PROCEDURES AND FUNCTIONS }
begin
{program body}
end.
HARDWARE DEPENDENCIES
SB_DISPLAY_ADDR
The frame buffer displays and the shared memory communication mechanisms use a range of addresses on the Series 200/300 machines. These addresses may conflict with extremely large code, heap, or stack space. The environment variable, SB_DISPLAY_ADDR may be set to shift this range of addresses up or down to avoid conflicts.
If the Starbase Display Address environment variable (SB_DISPLAY_ADDR) is not set, or null, the default of 0xb00000 is used. This environment variable must be the same for all processes, therefore it is suggested that, if it is set, it be set in the Bourne file /etc/profile and the C Shell /etc/csh.login.
SEE ALSO
cc(1),pc(1),fc(1),ld(1),HP-UX Reference, Vol. 4,3G Commands, The Starbase Device Drivers Library,HP-UX Concepts and Tutorials - Graphics Volume.
Hewlett-Packard Company — May 11, 2021