Date : Thu, 25 Jul 1991 06:31:11 GMT
From : iWarp.intel.com!pdxgate!qiclab!nosun!techbook!fzsitvay@uunet.uu.net (Frank Zsitvay)
Subject: Re: Stand-Alone file with BASCOM?
In article <0094C0C1.E3F236E0@lne.kth.se> thor@lne.kth.se writes:
>
> Is there anyone who knows if it is possible to create
> a stand-alone .COM-file from a basic program with
> BASCOM and L80 (ver 3.44), that is in some way link
> the BRUN.COM into the .COM-file. I have a CP/M 2.2-
> system.
>
> Please, let me know if it is possible.
Yes, it is possible.
on the command line for the compiler add a /O (letter 'O' not a zero)
to tell the compiler to stick RQUEST OBSLIB.REL into the object file,
instead of RQUEST BASLIB.REL.
the linker will instead pull routines out of the OBSLIB.REL library.
These routines do not require the presence of BRUN.COM, and oftentimes will
allow larger programs to execute in less memory.
To do this, you need to have a copy of OBSLIB.REL around somewhere. It
is a part of the distribution package.
But the downside of this is that there are some commands that are
implemented in BASLIB.REL that are not implemented in OBSLIB.REL. Depending
on whether your existing programs use these commands, you might have some
problems getting them to compile to standalone executables.
For instance, COMMON is not supported, and CHAIN is semantically equivalent
to a RUN statement.
RUN <linenumber> is not supported. RUN can only call another *.COM
file.
The CLEAR command is not supported in any way.
For large applications, these may cause additional problems. Implementing
a system of programs that call one another is not easy, since sharing
information is restricted. What you may end up doing is passing parameters
from one module to another by writing them into a file, and having the target
module check for the presence of that file
Programs that use CLEAR to allow arrays to be resized will also have
problems. Arrays cannot be dynamically allocated, as they could with the
interpreter, and array definitions must be integer constants. Once you
define an array for a program, you cannot delete it or change it.
Hope that helps you...
--
fzsitvay@techbook.COM - but don't quote me on that....
No wonder I can't hold a regular sleeping schedule. My subconcious mind
knows we are only one well-placed bullet from having Quayle as president.