Re: Problem Linking (win32)



Jim Carlock wrote:
:
[snip]
:
<file name="nasm32.inc">

%imacro .CODE 0
[section .text]
%endmacro

</file>
:
[snip]
:
: Not sure why the bracketed notation occurs, or why it ends up
: preferred, so if someone has a comment on that, that would be nice.

"Frank Kotler" wrote...
: Since it isn't in *our* code, the linker must create it... or not.
: I've *only* seen this work using "-f obj" and Alink, but I think
: it's more a question of "which linker" than "which output format".
: Brian appears to be using it with GoLink, but there's some question
: if his code is "really" working right.
:
: (Or did you mean the brackets around "[section .text]"? That's the
: "raw" form, which doesn't set the "__SECT__" standard macro. Possibly
: intentional, in this case - usually you want the "user" form "section
: .text", which does set "__SECT__".)

Thanks for the comments, Frank. "raw" form does not mean much to me at
the moment, maybe because I'm not looking at the NASM source code.

[JC] How does one create a "%imacro .TEXT *" macro?

[FK] %imacro .TEXT 0-*
[FK] [section .text %1]
[FK] %endmacro
:
: The "-*" indicates a "greedy" parameter - everything after the zeroth
: (everything, IOW) is "lumped together" as "%1". I think that's what
: you have in mind. The "-" shouldn't be read as a minus sign, in this
: case - "%macro foo 1-3" means one through three parameters, not -1.
: "foo" with no, or more than 3, parameters won't match.
:

That's what I wanted to know. Thanks for the explanation. Maybe it's in
the documentation somewhere. There might be another word to describe that
character as well.

greedy, catchall, glob, asterisk, star

: Personally, I find listing files almost completely useless. The
: "addresses" aren't runtime addresses but mere file offsets, half
: the "code" is left to be filled in by the linker (might be useful
: for debugging Nasm, but if I cared what the opcode was I'd do it
: "Wolfgang style"), and the "source code"... well, I *knew* that.
: What's to like?

Did you miss the other post where I indicated that I'm not seeing the
%define expansions (in the listing file (.lst)). Is your Internet
connection ok? Your post went through twice. They looked the same and
I deleted the second post. Was that a mistake? I'm surprised Chuck let
it go through twice.

--
JC
Natural Cure For Pink-Eye (Conjunctivitis)
http://www.associatedcontent.com/article/381336/saliva_a_natural_cure_for_conjunctivitis.html

Childhood Obesity Caused By Canola Oil Consumption?
Article Coming

.



Relevant Pages

  • Re: Increment operator
    ... I understand completely about the repeated indices. ... twice, but will do the same thing as if it was there twice, warts and ... including evaluating twice unless you know that ...
    (comp.soft-sys.matlab)
  • Re: Horrid Serial Dacs
    ... >Debugging is twice as hard as writing the code in the first place. ...
    (sci.electronics.design)
  • Re: Dear Odinn...
    ... Odinn posted ... That's pretty good, considering you DID reply to me, TWICE. ... After I had to hunt down your e-mail address in your whois info for ...
    (rec.woodworking)
  • Re: Banned
    ... tussock wrote: ... posted) twice. ... Passed along to my playing group. ...
    (rec.games.frp.dnd)
  • Re: Great SWT Program
    ... Explorer lets you type not only *just* the ... the name twice. ... criteria if they're all ones "find" can, um, find. ...
    (comp.lang.java.programmer)