On May 1, 10:26 pm, "Jim Carlock" <spamt...@[EMAIL PROTECTED]
> wrote:
> Hi,
>
> I am looking to combine a bunch of "C standard .h" files
> into one "MyInclude.inc" file.
>
> Is there a suggested manner in which to get this done?
>
> In the end, I seek to include ONLY ONE file, by using
> the %include directive more than once.
>
> An example...
>
> ;
> ; START MyInclude.inc
> ;
>
> ; prevent multiple inclusions
> %ifndef MYINCLUDE_INC
> %define MYINCLUDE_INC
> ;standard inclusions...
> %endif
>
> ;WHICH SECTION do we include?
> ;
> %ifdef SECTION_INC
> ;
> ;SEEKING a way to jump into and process ONLY the
> ;STDUNI_H section. Do NOT want to use an assembly
> ;jmp instruction. There a NASM directive to do
> ;this? Or can anyone suggest another way to get
> ;this accomplished?
> ;
> %endif
>
> ;
> ;NOTE: Do we want an assembler label here? I think
> ;NOT! But is there a way to jump to a different
> ;location inside this one file without creating any
> ;assembly language (using NASM directives)?
> ;
> STD_UNI_H:
> %ifdef INCLUDE_STDUNI_H
> ;
> %ifndef STDUNI_H
> ;STDUNI_H is NOT defined, so define it
> ;
> %define STDUNI_H
> ;... all the stuff to get included ...
> %else
> ;STDUNI_H is defined
> ;
> ;seek a way to exit this file...
> ;HOPING for %exit directive or some sort of other
> ;STOP_PROCESSING_THIS_INCLUDE_FILE directive.
> %endif
> ;
> %ifndef STDIO_H
> ;
> %else
> ;seek a way to exit this file...
> ;HOPING for %exit directive or some sort of other
> ;STOP_PROCESSING_THIS_INCLUDE_FILE directive.
> %endif
> %endif
>
> ;
> ; END MyInclude.inc
> ;
>
> ;
> ; START MyMain.asm
> ;
> %include "MyInclude.inc"
>
> %ifdef HAVE_STDUNI_H
> ;
> ;already defined, so process ONLY the HAVE_STDUNI_H
> ;section.
> ;
> %include "MyInclude.inc"
> %endif
>
> ;
> ; END MyMain.asm
> ;
>
> Am I thinking too far outside the box?
>
> For instance,
>
> %define SECTION_INC STDUNI_H
>
> then a way to %exit that section when finished processing,
> and a way to enter that section so that ONLY that one
> gets processed (perhaps a %jump into it).
>
> I don't see a %exit directive nor a %jump directive.
>
> Is that perhaps something worthwhile to add. Perhaps
> a sample way around it using a macro might be helpful.
>
> Thanks.
>
> --
> Jim Carlock
> North Carolina Swimming Pool Contractors
> Custom Designed Swimming Pools
> Custom Designed Spas
> Custom Designed Water Featureshttp://www.aquaticcreationsnc.com/


|