[comp.sys.amiga] Plea for help using Abacus's Assempro package

gt4370b@pyr.gatech.EDU (Mark Lee Shewmaker) (04/13/88)

	(I have already posted this article once, but forgot the .signature.
I hope that it cancelled properly and no one gets two copies.)
	This is a plea for help to anyone who uses Abacus's
Assempro Amiga package.
	For anyone not familiar with the package:  One nice feature it is
the ability to make a library of definitions.  Basically, you write your
definitions in a file foo1, say something like SLABEL "foo2", list all the
constants you want in the library, and say ENDS.  When you assemble the file,
a library of name "foo2" is created.  Whenever you want those constants, doing
an ILABEL "foo2", to include the library, is much faster than INCLUDE "foo1".
	Well, it seemed to me that it would very efficient to make one HUGE
library that includes all the definitions in all the include.i files, to keep
from having to recompile the include.i's every time.
	I have run into 2 problems, one major and the other not-so-major.
	The first problem is the not so major one.  Because I needed a list
of the desired constants to make the library, in addition to the definition
files themselves, I needed to edit the entire bunch of include files to get all
the constants.  Fortunately, the editor in the assembler has all sorts of 
command sequences to do just that sort of thing.  (i.e. Search for all ='s,
then delete to end of line.  Continue until an error condition.)
Unfortunately, these sequences are SLOW.  It can take over 3 hours just to do
the example I gave.  Doing all the editing necessary to get a complete
(I think) list of constants took me 4 days.  So, my first question--is there
a good, small, editor in the public domain that will let you do command
sequences like that?  or, better yet, is there some text-formating/modifying
utility that I could invoke on a text file to do a list of things specified in
another text file?
	Now for the major problem.  After I had the full file ready, with a 
bunch of 

 IFND someinclude@
 INCLUDE someinclude
 ENDIF               ('s)

and of course a list of constants, I ran into an insurmontable problem.
Basically, THE ASSEMBLER WON'T ASSEMBLE THE STANDARD INCLUDE FILES, UNMODIFIED!
I had a ton of errors, ranging from having to change all the :includes/file to
df1:includes/file to things like BITDEF's not working when the bit-shifting is
too complicated.  I'm hoping that I have been doing something very, very simple
very, very wrong, but it does look like the assembler is broken.  (The example
files on the disk don't help.  They use system constants directly, and don't
access the includes at all.)  Anyway, if anyone has gotten the include files
to assemble properly, please tell the secret.
	Now for a minor question.  One of the nice things about programming
in C is the ability to define a structure type, then make another a structure
of that time, inserting it's elements in any order you want, and everything's
ok.  I'd like to do this in assembler.  (C-lovers are probably snickering now.)
Now, I know that the include files define the offsets to each item in a system
structure, but what I'd like to do is this:

MyWindow:
 nw_TopEdge	50
 nw_Height	100
 nw_LeftEdge	30
...

I'd like to basically be able to insert anything in there in any order, and not
mess around with dc.x's, either.  Oh, and also have everything defaulting to
zero.  Is this possible?  Or, more to the point, has anyone set up some macros
that will let you do this sort of thing, using the already-defined constants
from the include.i's?  Please let me know of any method of doing this, short of
inserting the values into the structure during run-time.

I will edit and repost any suggestions mailed to me.
---------------------------------------------------------------------------
Mark Lee Shewmaker
Georgia Insitute of Technology, Atlanta Georgia, 30332
uucp: ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!gt4370b
ARPA: gt4370b@pyr.ocs.gatech.edu