APPENDIX A
Sample Configuration Files
PEN*KEY
R
6100 Computer Programmer’s Reference Guide A-17
BGI Support
N6100.BGI is in the 6100 Tool Kit, and it is a custom Borland Graphics InterĆ
face. It develops Borland graphics based applications on the 6100 Computer.
There are two ways to use this in a DOS application. The first is to keep the apĆ
plication and the BGI driver separate. This requires loading the driver from
your application. The calls to do this are documented in Borland C++ DOS RefĆ
erence. Start with installuserdriver. This is the method used by Calib, described
in this section.
For details on how you may include this into your DOS application see the
UTILS.TXT file that describes how to use the BGIOBJ converting utility. Also,
see the registerbgidriver routine in the DOS Reference to apply this method. You
will need the following files:
"
N6100.BGI Real mode PENKEY.BGI driver
"
N6100.H
Interface file for use with the BGI driver
Using the N6100.BGI Driver
The driver plugs in" to the Borland BGI graphics library via the installuserdrivĆ
er() function. Mode selection is done via a series of #define symbols in the
N6100.H header file - note that the BGI DETECT autodetect logic does not work
with this driver. The following modes are available from this driver:
Resolution
Symbol
230x240x4
BGI_LANDSCAPE
240x320x4
BGI_PORTRAIT
EXAMPLE:
Init the driver in 320x240x4 mode:
#include <graphics.h>
#include “n6100.h”
int driver, mode;
driver = installuserdriver(“N6100”,NULL);
/* do this only once */
mode = BGI_LANDSCAPE;
initgraph($drvr,$mode,“”);
EXAMPLE:
Init the driver in 240x320x4 mode:
#include <graphics.h>
#include “n6100.h”
int driver, mode;
driver = installuserdriver(“N6100”,NULL);
/* do this only once */
mode = BGI_PORTRAIT;
initgraph($drvr,$mode,“”);
See the demo program TEXT.C, included in the Tool Kit, for an example of how
to initialize and use the N6100.BGI driver.
"
NOTE:
Init and close the driver as many times as desired during a program run, but only call
installuserdriver() once and save the value returned for use in subsequent initializations.
A. Sample
Configuration Files
Summary of Contents for PEN*KEY 6100
Page 1: ...PEN KEYR 6100 Computer PROGRAMMER S REFERENCE GUIDE P N 977 054 001 Revision B December 2000 ...
Page 14: ...CONTENTS xii PEN KEYR 6100 Computer Programmer s Reference Guide ...
Page 22: ...Preface 8 PEN KEYR 6100 Computer Programmer s Reference Guide PREFACE ...
Page 318: ...GENERAL INDEX Index 6 PEN KEYR 6100 Computer Programmer s Reference Guide ...