home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
developmen
/
oplcomp
/
OPLCOMP.DOC
next >
Wrap
Text File
|
1992-11-05
|
12KB
|
370 lines
OPLCOMP (c) & the associated software & documentation are copyright
CALsoft, S.Coughlan & C.A.Lowde 01/June/1989 and may not be reproduced
in any form without prior written permision of the author S.Coughlan.
You are allowed to evaluate OPLCOMP. Should you decide to use
OPLCOMP you must register its use at the address supplied in the
registration form.
We can accept no responsability, or liability in any respect, for
any aspect of the information, programs or data supplied.
Registration will enable you to recevie a copy of the source code,
an improved version of OPLCOMP and VARCOMP (when tidy) a variable
compression program on 3.5" disk. Registration will also enable me
to continue to afford to pay my Compuserve bill, which is
expensive from the U.K and hence post updates and further utilities.
I can be reached on COMPUSERVE at 100112,750
REV 1.00 Shareware release version 10/11/1992
OPLCOMP
A program to compress OPL programs for the PSION Organiser series
of computers. OPLCOMP can reduce object space by up to 35% (depending
on how well you write your code). You will also find speed increases
of up to 10% again depending on code structure.
Most of the references here refer to the organiser CM, XP, LZ, LZ64,
but are relavant to any OPL supported system.
The program runs on an IBM P.C and the original version is written
in QUICK BASIC but has been re-written in TURBO-PASCAL.
Trade marks are copyright their respective owners.
HISTORY
OPLCOMP was written in June of 1989 to allow a very large
program to be fitted onto a 64K data pack. At the time we were having
severe difficulty fitting our very large program onto a pack.
(We were re-programing SPELL-CHECK eproms at that time,
later we simply re-placed the OTP rom with an EPROM
as PSION were ripping all & sundry off at †60.00 a time)
We had designed a number of hardware interfaces for the
Organiser, including a graphics display module, and multi-port
top slot interface, amongst others.
We had the idea of reducing our code by reducing module
names in length, but as there were over 150 module names with
inumerable references, the process had to be automated. Enter
OPLCOMP to automate the whole process.
Development of our software has finished, but OPLCOMP
evolved slowly re written in Turbo Pascal. About a week ago,
NOV 1992, I was asked for a copy. The gentleman in question
suggested I post it on Compuseve to see what kind of repsonse
it would generate, so here it is.
SERIOUS DEVELOPMENT
If you really want to know about the PSION organiser
computers you will need the PSION Organiser Technical Manual. It
was supplied on floppy disks originally and contains nearly all the
information you could possibly require. Note though, that it is
technical in nature and not for the light hearted. You would
also need a copy of the 6303 micro processor data sheet. I used
the 'Hitachi 8-Bit MULTI-CHIP MICROPROCESSOR AND PERIPHERAL DATA
BOOK' published by Hitachi 1985 ref DB8MC8504 as well. The Technical
manual originally required a non-disclosure agreement signing, and I
don't currently know the status of PSION's attitude to the manual.
You will also need a copy of the relavant debugger, this
allows you to write your code on an IBM P.C and emulates the
organisers screen, enabling you to debug OPL without committing
your self to a program pack (EPROM). You can single step, trace
and watch variables. With a RAM pack the development cycle is
considerably easier.
Machine code programing on the organiser requires
considerable skill, errors will readily crash the machine trashing,
all data held by the machine. Serious development requires a RAM
pack (watch out for mains power supply connection spikes, wiping
the contents of a ram pack when being connected) and a COMMS link
NOT an RS232 interface. The RS232 interface does not support the
PSION data transfer protocol, required for building a data pack.
The RS232 link only has an 8K rom on board, whilst the COMMS link
has a 32K ROM.
USING OPLCOMP
To use OPLCOMP you don't need to modify your code in any way
but you should be familiar with the OPLTRAN utility supplied with the
OPL developer software for the series 2.
Your copy of the '.BLD' file used to construct a data pack will
need a few small modifications. The file is an ASCII text file,
the following is an example of the required format for a build file.
spcorg 64 nocopy write
boot bin
upperc ob3
yes ob3
VCOMP$ ob3
VDCOMP ob3
BLEEP ob3
BOOT ob3 !*SAVE
BOOTCL ob3
DATE$ ob3
SPC ob3 !*SAVE
The first line specifys the following
the pack name
the pack size in K bytes
the pack may not be copied
the pack may be written to
Subsequent lines specify the files to be included in the
build process. The additions are the !*SAVE text. The ! character
allows you to add a comment, the *SAVE informs OPLCOMP not
to compress the module name.
This is necessary as the BOOT.ob3 file must not be renamed,
if the pack is to be made bootable. Our pack was named SPC and was
started by running a module called SPC, hence we excluded it from
the compression process. BOOT.ob3 is searched for by the machine,
when the ON/CLEAR key is pressed, on every pack. If found the code
contained in the BOOT.ob3 file is executed. In our case we installed
our program name into the top level menu. To enable all this to take
place the BOOT.BIN file had to be included. This module (supplied
with the Developer) can contain any module name but defaults to BOOT.
We allowed the pack to be written to as it enabled us to provide
update procedures, without having to re-program the whole pack.
As pack programming took about 35-45 minutes and erasing about the
same length of time in the PSION EPROM eraser (Formatter). While we
had space on the packs this proved extremely usefull and saved hours.
On a newer P.C these times might be decreased slighlty.
Our BOOT.OPL file looked like this :-
boot:
addtop:("SPC",0)
deltop:("RESET")
The first line ran a module to install a title SPC in the top level
menu. If you don't have this routine I have included it in the
Appendix. The second line ran a module removing tht RESET option.
Again I have included this routine in the appendix.
Type in at the dos command line
OPLCOMP
to run OPLCOMP. OPLCOMP prompts you for :-
The source path
The destination path
The build file name
The source path is where your original OPL files are located.
eg c:\source\
The destination path is where OPLCOMP will place the compressed
OPL files.
eg c:\dest\
The build file name might be
spcorg.bld
When you are asked if it is ok to start press the 'y' key.
OPLCOMP then proceeds to hash through all the files in the build
file and compresses them, producing new modules in the destination
directory
OPLCOMP
:
:---<---- c:\source\source.bld
: *.OPL in build file
:
:--->---- c:\dest\newspec.bld
: crossref.doc
: *.TMP
:
OPLCOMP produces modules with the extension *.TMP, this
ensures you don't overwrite existing modules accidently but you
must rename them if you wish to translate them. Don't forget you
can rename them all with 'ren *.TMP *.OPL' in one go from the DOS
prompt.
In the destination directory a cross reference file is generated
call CROSSREF.DOC. This file migh look like this :-
OPL compacted Procedure names from OPLCOMP Rev 1.00
(c) CALsoft 1989
Date 01-01-1980 Time 02:35:06
SPCINPF .OPL B
READINST .OPL C
READINTF .OPL D
UPPERC .OPL E
YES .OPL F
VCOMP$ .OPL G$
VDCOMP .OPL H
BLEEP .OPL I
BOOT .OPL BOOT
BOOTCL .OPL K
Notice that BOOT.OPL was excluded as explained previously,
the cross reference file allows you to