Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: NASM %defin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 4640 of 4729
Post > Topic >>

Re: NASM %define %ifdef %include - Converting C to NASM

by Frank Kotler <spamtrap@[EMAIL PROTECTED] > May 3, 2008 at 07:01 PM

Jim Carlock wrote:

....
> In the end, I seek to include ONLY ONE file, by using
> the %include directive more than once.

???

....
> I don't see a %exit directive nor a %jump directive.


I don't know, Jim. Seems to me you're trying to treat included material 
as a "program", when it's essentially an "automated cut and paste". 
Define "WHAT_I_WANT", %ifdef WHAT_I_WANT, %endif... and the rest of it 
won't be included - nothing to %jump over, nothing to %exit. Even easier 
is to *not* combine everything into one file, and %include the ones you 
need... perhaps "collecting" them:

%include "thisprogram.inc"
....
; the program
;----------

; thisprogram.inc:
%include "stdio.inc"
%include "sockets.inc"
....

But you should be able to do it like:

%include "everything.inc"
%define NEED_STDIO
%define NEED_SOCKETS
....

I've seen Windows include files that work like that. I didn't understand 
what the point was then, either :) (actually, the point was to speed up 
Nasm!)

You can specify "-d", "-p" and "-I" options on the command line, or as 
an environment variable, to control what gets included, if that helps.

I don't see the need for "execution"-type directives... but maybe I 
don't understand what you're trying to do...

Best,
Frank
 




 4 Posts in Topic:
NASM %define %ifdef %include - Converting C to NASM
"Jim Carlock"   2008-05-01 10:26:53 
Re: NASM %define %ifdef %include - Converting C to NASM
Henry <spamtrap@[EMAI  2008-05-01 18:13:06 
Re: NASM %define %ifdef %include - Converting C to NASM
Frank Kotler <spamtra  2008-05-03 19:01:36 
Re: NASM %define %ifdef %include - Converting C to NASM
s_dubrovich <spamtrap@  2008-05-03 20:50:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:18:07 CDT 2008.