Board index » delphi » BGI

BGI

BS"D

Hello,

I saw in the Pascal help a way do put a BGI driver inside an EXE file
using BINOBJ but I couldn't quite work it out. Is it possible to put the

driver and the program in 1 EXE so that I only need 1 file ? Thanks.

 

Re:BGI


In article <34EF1460.68929...@mail.sitcom.co.il>,
Yeshivat Bnei Akiva Netanya  <y...@mail.sitcom.co.il> wrote:
:I saw in the Pascal help a way do put a BGI driver inside an EXE file
:using BINOBJ but I couldn't quite work it out. Is it possible to put the
:driver and the program in 1 EXE so that I only need 1 file ? Thanks.

Yes. This is covered in detail in

 132960 Dec 13 1997 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Spam foiling in effect.  My email filter autoresponder will return a
required email password to users not yet in the privileges database.

Re:BGI


Yeshivat Bnei Akiva Netanya wrote:

Quote

> BS"D

> Hello,

> I saw in the Pascal help a way do put a BGI driver inside an EXE file
> using BINOBJ but I couldn't quite work it out. Is it possible to put the

> driver and the program in 1 EXE so that I only need 1 file ? Thanks.

Yes.  Let's take GOTH.BGI as an example:

at the DOS line, type this command:

BINOBJ goth.bgi goth.obj gothic_font

Assuming the exe and bgi file are available, you'll see
something like xxxx bytes converted.  What that did is
created an OBJ file with the public procedure name of
gothic_font.

Now to your pascal program.  At the beginning of the program
somewheres, put this line in:

{$L goth.obj}

Also make sure that file is in the correct directory.  Now
you have linked the OBJ file in, but still need a way to
reference it.  That's where the public name comes in:

procedure gothic_font; external;

Now anytime you need to access goth.bgi, you can substitute
the filename with @gothic_font.

That should do it.

Other Threads