home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
- FDStub
-
- The C to ASM interface generator
- Written by Bruce Mackey
- (c) 1991
- All rights reserved.
-
-
- Version 0.6a
-
-
-
-
- DISCLAMER
- Anyone my FREELY distribute this progam and program
- documentation, providing that the program, documention, and LZH
- file remain in there original state. You as the user or distributor
- may not charge any money apart from postage or material (eg. Disks).
- If you want to bundle this program (oh sure) with some work of
- your own you MUST get permission from the author in writing (of course
- if it is for a commercial product the author would like some green
- backs...er CASH!).
-
-
- OVERVIEW
- I started writing this program when I still used Lattice 3.03
- and had a greater need for it.
-
- I came across it and brushed off the dust, polished it up a
- little, and here you go.
-
- I use it when I'm writing individual assembler subroutines.
- I'll use 'C' to write a quick and easy test routine and FDStub
- to create the stubs from the .FD file I keep as documentation.
-
- FDStub is of course useful for creating stub (link-time)
- libraries (like amiga.lib).
-
- USAGE
-
- FDStub is used from the CLI:
-
- FDStub infile { outfile | outpath } [OPTIONS] [MULTI] [NOLVOS] [NOA6]
-
-
- infile is the .FD filename and can include a path.
-
- outfile is the name of the file to receive the stubs.
- outpath is used with the MUTLI keyword (see KEYWORDS below).
- outpath can be . or "" for current dir.
-
- OPTIONS
-
- There are only TWO options:
-
- -Q won't diplay line numbers AND does not
- print the name header of the function
- in the outfile.
-
- -B use Bias insted of function name.
- for example:
-
- w/o -B: JSR _LVOOpen(a6)
-
- with -B: JSR -30(a6)
-
- if the Bias is 30 FDStub converts it to
- -30 and subtracts 6 for each function.
- (see FD1.3 files for examples of bias)
-
- options can appear any place on the command line AFTER
- infile, outfile | outpath. -QB and -Q -B both are ok.
-
-
- KEYWORDS
-
- MULTI causes FDStub to create an INDIVIDUAL FILE FOR EACH
- STUB THAT IT CREATES. This is the way I intended
- FDStub to act but decided to make it a switch so
- the user (me) will think about what he (me) is about
- to do.
-
- This option takes longer when output is to a floppy.
-
- I suggest using this option with RAM: or a HD.
-
- NOLVOS use this option when you are creating stubs for
- routines that DO NOT START with _LVO and no
- underscore. This is what FDStub does:
-
-
- source: SomeFunction()()
-
- STUB with _LVO:
-
- _SomeFunction:
- ......
- MOVE.L librarybase,A6
- JSR _LVOSomeFunction(A6)
- ......
-
- STUB with NOLVOS
-
- _SomeFunction:
- ......
- JSR SomeFunction(A6)
- ......
-
- to remove the '(A6)' remove the ##base command
- in the source file (see COMMANDS below) OR use
- the NOA6 command line switch.
-
- KEYWORDS can appear any place on the command line AFTER
- infile, outfile | outpath.
-
-
-
- NOA6 this keyword overriddes the ##base command (see COMMANDS)
- ignoring all references to A6. FDStub acts as if ##base
- was not in the sourcefile.
-
-
- COMMANDS
- The following commands are not being defined by me but
- this is a just a description of how I implemented them
- for FDStub.
-
- to see examples of these commands see the FD1.3 files that
- are for use with the Basic on the Extras disk.(pre 2.0 ??)
-
- FDStub expects ## in front of each command.
-
- FDStub expects a double set of '()' one for the parameter names
- and the second for the register list.(one or both sets can be empty)
-
- ##base librarybase
-
- for making stubs for a resident library.
-
- if ##base is not in the file then FDStub
- WILL NOT use A6 as an offset with JSR.
- w/o ##base: JSR [_LVO]SomeFunction
-
- with ##base: MOVE.L librarybase,a6
- JSR [_LVO]SomeFunction(A6)
-
- (see KEYWORD NOA6)
-
-
- ##bias offset
-
- for making stubs for a resident library.
-
- offset is a POSITIVE ascii string. FDStub makes
- offset a negative and will subtract 6 from offset
- each time it creates a stub or until another ##bias
- comes along.
-
-
- ##private
- turns off stub production until a matching ##public
- or the end of the file is reached.
-
-
- ##public
- turns on stub production.
-
-
- ##end
- denotes the end of the source file, and shuts down FDStub.
-
-
-
- DRAWBACKS
-
- 1. code geeneration could be better, BUT since I have written
- MANY stubs by hand, FDStub does (IMHO) a great job.
-
- SEMI-IMPORTANT NOTE:
- IT MIGHT BE A GOOD IDEA TO TAKE A LOOK AT THE FILE
- CODE.GEN
-
-
-
-
-
-
- If you like this program and want something added.. (well what the hell)
- let me know.
-
- support for SAS/C's -rr option ?
-
- -----------------------------------------------------------------------
-
- see FDConvert by CBM's Carolyn Scheppner
- see FD-BMap by Bruce Mackey (assembly version of FDConvert)
-
- Bruce Mackey
- 4040 Avoca Ave.
- Bethpage NY. 11714
- 516-935-2075
-
- BIX: bmackey
- CI$: 72567,2601
-
- SAS/C is a trademark of SAS inc.
- LATTICE is a tradmark of Lattice inc.
-