home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_100
/
108_01
/
ccrl.doc
< prev
next >
Wrap
Text File
|
1985-11-14
|
3KB
|
74 lines
CCRL.DOC
========
**********************************************************
* This file contains information on how to use the "CCRL"*
* program to convert COM files (generated by ASM or MAC) *
* into CRL format for use with the BDS C package. *
* The original program was called "CRLADD", and it was *
* written by: Earl T. Cohen *
* Cyclotomics, Inc. *
* 2140 Shattuck Ave. *
* Berkeley, Ca. 94704 *
* Modifications and this documentation are the works of: *
* Jack M. Wierda *
* 33 W. Naperville Rd. apt 9 *
* Westmont, Illinois 60559 *
* Questions concerning the CCRL program should be aimed *
* at one of the above persons, since I (Leor) do not *
* know how the thing works. *
**********************************************************
This program is a simplified version of the CRLADD program written by
Earl T. Cohen.
The purpose of the program is to create a filename.CRL file from existing
filename.COM and filename.EXT files. The filename.CRL file can then be
manipulated using CLIB, putting it into the desired library.
The command line is as follows,
CCRL filename
Where filename is the name of .COM file (that was created using ASM or
MAC and LOAD) and .EXT file (created with an editor in the format outlined
below).
The format for a .EXT file is as follows:
line 1: name of function
line 2: size of bare function (from ASM or LOAD)
line 3: total size of .CRL entry after jump table and all
other stuff has been added to the function. This is needed
since it is written onto the output file before it can be
computed.
If no other functions are listed at line 4, then
Total size = [5 + bare function size from line 2 + (# of relocations
from line y) * 2]
If other functions are listed at line 4, then
Total size = [10 + bare function size from line 2 + (# of relocations
from line x + # of relocations from line y) * 2
+ (# of functions at line 4) * 3 + # of characters
in the functions at line 4]
line 4: list of needed functions starts here -- one function
name per line, a blank line terminates the list.
line x: after the above, if there were any needed functions,
the relocation paramaters for their calls in the assembly code
come here. They are in hex (and can be from 1 - 4 hex chars)
and are separated by blanks, tabs or newlines. The list is
terminated by any non-blank, non-hex char; i use a '.'
line y: a list as above for the other relocation paramters.
The relocation paramters are not hard to compute since they
are 0-based and can be read right from the .prn listing of asm
just by adding 1 to the location of a jump or call (and
throwing away 0x100 (the origin)) for example.