<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.nasm.general">
    <title>gmane.comp.lang.nasm.general</title>
    <link>http://blog.gmane.org/gmane.comp.lang.nasm.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/324"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/323"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/322"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/321"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/320"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/319"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/318"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/317"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/316"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/315"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/314"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/313"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/312"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/311"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/310"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/309"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/308"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/307"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/306"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.nasm.general/305"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/324">
    <title>Re: [Nasm-users] Suggestion: Limit instruction set to specific CPU type</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/324</link>
    <description>&lt;pre&gt;
Note: the "CPU" directive already exists, although it is limited in its
support for recent machines.

-hpa

&lt;/pre&gt;</description>
    <dc:creator>H. Peter Anvin</dc:creator>
    <dc:date>2011-12-02T02:08:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/323">
    <title>Re: [Nasm-users] Suggestion: Limit instruction set to specific CPU type</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/323</link>
    <description>&lt;pre&gt;
Yes, it would be great to have.  Looking forward to your patch.

-hpa

&lt;/pre&gt;</description>
    <dc:creator>H. Peter Anvin</dc:creator>
    <dc:date>2011-11-21T18:36:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/322">
    <title>Re: [Nasm-users] libraries</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/322</link>
    <description>&lt;pre&gt;I don't know, maybe others on the list do
I don't know either, maybe others can respnd to that
When assembling for Linux Elf, Nasm can generate STABS and DWARD debug 
information, which I think is what GDB wants.
Yes, It is simple BSD, source is available from the main download page 
http://nasm.us/


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
&lt;/pre&gt;</description>
    <dc:creator>Jakob Bohm</dc:creator>
    <dc:date>2011-11-16T13:11:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/321">
    <title>[Nasm-users] libraries</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/321</link>
    <description>&lt;pre&gt;Hello. I'm starting a project that will be written in assembly language. I had intended to use HLA, but I can't get on their mailing list, and I'm hesitant to commit to using HLA without live support --- that is why I'm considering NASM now.

What had impressed me about HLA was that it comes with a large library, and that programs can assemble for either Windows or Linux so long as the programs restrict themselves to using this library. Is there anything like that for NASM? Specifically, for console interface, file access and serial communication? It may be too complicated to support both Windows and Linux, in which case I will support Linux --- but it would be nice to support both.

Also, other than the Windows/Linux issue, I was impressed with HLA's library in general. Are there any libraries of NASM code available? I would be interested in basic data-structure support (lists, arrays, associative arrays, etc.), such as I provided in my Forth novice package:
http://www.forth.org/novice.html

Is there a repository of NASM code somewhere?

Does NASM work with any debugger, such as GDB?

Is NASM source-code available, and if so, is it BSD or GPL license? What language is it written in?

Thanks for your help --- Hugh
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________
Nasm-users mailing list
Nasm-users&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-users
&lt;/pre&gt;</description>
    <dc:creator>Hugh Aguilar</dc:creator>
    <dc:date>2011-11-03T06:12:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/320">
    <title>[Nasm-users] Suggestion: Limit instruction set to specific CPU type</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/320</link>
    <description>&lt;pre&gt;Hi,

I would like to suggest to add a –cpu option to the command line flags of nasm (somewhat similar to GCCs –march option) where the user can specify the CPU type he is programming for. If the user uses an instruction that is not supported by the CPU, the assembler can warn about this. This can help to keep code running on old machines.

What do you think about this?


Philipp------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________
Nasm-users mailing list
Nasm-users&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-users
&lt;/pre&gt;</description>
    <dc:creator>Philipp Kloke</dc:creator>
    <dc:date>2011-11-11T17:02:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/319">
    <title>Re: [Nasm-users] linking nasm programs to windows libraries</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/319</link>
    <description>&lt;pre&gt;
Hi Tyler,

Just a WAG, but try _MessageBoxA&amp;lt; at &amp;gt;16


Not a whole lot of progress lately on Alink, AFAIK. There's an IDE and 
linker (based on Alink, I think) here:

http://www.nasmide.co.nr/

This is a "work in progress", under active development (and looking for 
developers), so it may not be what you want, but I thought I'd mention 
it. If you try it (anyone), let us know what you think.

Best,
Frank


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2011-08-11T17:57:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/318">
    <title>[Nasm-users] linking nasm programs to windows libraries</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/318</link>
    <description>&lt;pre&gt;Hello all:
I am writing a couple nasm functions to test this out with, and have 
been experiencing a problem. I want to link my nasm program to 
user32.lib, which I have done, but when I use the microsoft visual 
studio link command with user32.lib, I still get told that MessageBoxA 
is undefined. How do I do this?

I am aware of alink, but it seems to be a work in progress and I'd 
rather just link to the normal libraries if I possibly can; help is 
appreciated.
Thanks in advance,

&lt;/pre&gt;</description>
    <dc:creator>Littlefield, Tyler</dc:creator>
    <dc:date>2011-08-11T14:12:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/317">
    <title>Re: [Nasm-users] macro variables in labels? strange problem!</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/317</link>
    <description>&lt;pre&gt;
Hi Frank

yes I can cancelled it - I worked out the answer myself.


Ah, thanks - my solition was to use

label_%[n]

which also worked. I like %+n better though.


Yep, the '*' was a typo ('*' is used as location counter in S390 assembler, iirc).


I'm too lazy to use forums - I sometimes post a question, but then I forget
where I posted it ....


/Per

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>Per Jessen</dc:creator>
    <dc:date>2011-06-19T14:35:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/316">
    <title>[Nasm-users] macro variables in labels? strange problem!</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/316</link>
    <description>&lt;pre&gt;Hi Per,
Hi List,

As "owner" of this list, I got the following...


blah, blah, blah...

But when I logged in to approve it, I was informed that there were "no 
pending requests". Did you "cancel" it somehow, Per? (how?) Or is SF 
just messin' with me (us)? Well, I'll attempt to "answer" it anyhow! :)


It's a better question than it might seem at first! At one time, in some 
cases, Nasm would have done what you want. But it's been "tightened up" 
in recent versions, and you really need to use the "%+" operator!

label_%+n:

This generates "label_1:", "label_2:", etc. Nasm complains about 
"somecode" being redefined... so I replaced that with... well... "some 
code"... just "ret" to begin with. Same code in each "label" doesn't 
seem useful, but it worked... as long as we only do it once. But:

blop 3

blop 4

Now Nasm complains about "label_1" (etc.) being redfined! The solution 
to this is "macro-local" labels...

%%label_%+n:

Now Nasm generates (use the "-E" switch on the command line to see this):

..&amp;lt; at &amp;gt;0.label_1:
ret
..&amp;lt; at &amp;gt;0.label_2:
ret
..&amp;lt; at &amp;gt;0.label_3:
ret
..&amp;lt; at &amp;gt;1.label_1:
ret
...etc.

In order to get different code, I added "cmp eax, n" to the macro. I'm a 
little surprised that Nasm doesn't complain about "n" being redefined, 
but it still worked...


I suspect you want '$', not '*'. The '$' is evaluated where it occurs, 
so this length calculation needs to be done right after the "label" 
code. This means that the "db" gets executed, which we surely don't 
want! I changed it to "equ", which may or may not suit your purposes. 
There may be a better workaround to this(?). I've come up with this, so far:


;-----------------------
    %macro blop 1
    %assign n 0

    %rep %1
    %assign n n+1

global %%label_%+n:func

%%label_%+n:
     cmp eax, n
     ret
%%label_%+n%+_len equ $ - %%label_%+n
    %endrep

    %endmacro

blop 3

blop 4

mov cl, ..&amp;lt; at &amp;gt;4.label_1_len
;---------------------------

This seems to "work"... Note that instead of "..&amp;lt; at &amp;gt;1", "..&amp;lt; at &amp;gt;2" as I would 
have expected, Nasm has jumped to "..&amp;lt; at &amp;gt;4" for the "macro-local labels" in 
the second invocation of the macro (dunno why). This makes it rather a 
PITA to use the length outside of the macro! I don't know if it's 
"useful" or not...

FWIW, I created this list at the request of another developer, to keep 
this kind of question off the "developer's list". It gets very little 
traffic. There's the "Nasm Forum" here:

http://forum.nasm.us

which is also suitable for this kind of question. You might get better 
results there.

Reminder to all subscribers: hit "reply all" to reply to this list - 
just "reply" goes only to the poster (me, in this case).

My apologies if you intended to "withdraw" the question. I thought it 
was worth trying to answer, even if SF denies that it exists. :)

Best,
Frank




------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2011-06-19T14:13:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/315">
    <title>Re: [Nasm-users] What debugger front end for Linux?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/315</link>
    <description>&lt;pre&gt;Note that recent versions of gas have started to support Intel syntax 
too.  That pseudo-Motorola syntax was
indeed an abomination.


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
&lt;/pre&gt;</description>
    <dc:creator>Jakob Bohm</dc:creator>
    <dc:date>2011-05-17T08:38:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/314">
    <title>Re: [Nasm-users] What debugger front end for Linux?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/314</link>
    <description>&lt;pre&gt;

I'll have a look, thanks.


Sorry about that! New as I am to Linux development I ASSumed there was only
gdb!


I've been using stabs but as you and the previous poster said dwarf, I'll
start using that instead.


Right :-)


Good to know.


Thank you.


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
&lt;/pre&gt;</description>
    <dc:creator>Fritz Wuehler</dc:creator>
    <dc:date>2011-05-16T20:04:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/313">
    <title>Re: [Nasm-users] What debugger front end for Linux?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/313</link>
    <description>&lt;pre&gt;

Thank you. I finally found a problem was reported on the insight front end
to gdb back in 2009 causing a segfault, looks like it was never fixed. So I
am using ddd for now, it's not as pretty as insight but it doesn't crash
LOL. I finally found where to say Intel format instead of ATT so now I am
doing better. I'm so happy about NASM, how can anybody stand to use ATT
format or gas? It's a crime against humanity!


I will try and remember this. At the moment I'm writing just a few
instructions to try and learn and go through the book.


I was reading a book that said to use stabs debug info but I will try and
see if I can use dwarf and get better results. I am using elf64 format at
the moment.


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
&lt;/pre&gt;</description>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-05-16T15:34:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/312">
    <title>Re: [Nasm-users] What debugger front end for Linux?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/312</link>
    <description>&lt;pre&gt;
There was recently some discussion of debuggers for Linux on the Nasm Forum:

http://forum.nasm.us/index.php?topic=1056.0

You don't say what debugger front end you tried, but ASSuming it's for 
gdb...

1)It seems to help to start with a "nop" right after the "_start:" 
label. If you're starting with "main", so that the "_start:" label is 
elsewhere, this may not help.

2)Give Nasm "-F dwarf" on the command line. The default is "stabs" if 
you just use the "-g" switch. I honestly don't see any difference, but 
"dwarf" is the "native" format, and is supposed to be "better".

3) Don't give ld the "-s" switch, of course, or it'll strip the debug 
info back out. :)

4) Nasm's "local label" syntax doesn't play nicely with gdb. You can use 
local labels, but don't expect to tell gdb about 'em - it thinks you're 
trying to reference  a member of a structure!

If none of that helps, tell us more about exactly what you're doing, and 
what's happening.

Best,
Frank


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2011-05-16T13:59:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/311">
    <title>Re: [Nasm-users] What debugger front end for Linux?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/311</link>
    <description>&lt;pre&gt;I have not debugged nasm code on Linux, so I have no specific advice for 
you, but here are some general
info to help you along:

Hmm, maybe it is not the nasm format, but the debug information format 
that is the problem.  As on all
platforms, there are different file formats that compilers, assemblers 
etc. can use to tell debuggers which
code bytes in the output file correspond to which lines in your source 
code file and what the name of
that file is.

In the case of Linux/Unix/GNU tools it may also be mandatory to include 
NASM directives to mark the
beginning and end of each named function, as gdb seems to be overly 
focused on checking that
information before looking at anything real.

Anyway, most current Linux tools use the GNU DWARF debug information 
format, I don't know if NASM
includes DWARF information in its elf32 output files.


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
&lt;/pre&gt;</description>
    <dc:creator>Jakob Bohm</dc:creator>
    <dc:date>2011-05-16T12:06:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/310">
    <title>[Nasm-users] What debugger front end for Linux?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/310</link>
    <description>&lt;pre&gt;Hi guys, I am trying to learn x86 assembly with NASM since it uses the less
hideous Intel syntax! However the debugger front end I tried doesn't seem to
recognize this format and I can't set breakpoints. Whoever is using NASM on
Linux can you explain your environment a bit, what tools should I be using
etc. for best results. Thanks guys.


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
&lt;/pre&gt;</description>
    <dc:creator>Fritz Wuehler</dc:creator>
    <dc:date>2011-05-16T10:57:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/309">
    <title>Re: [Nasm-users] please help</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/309</link>
    <description>&lt;pre&gt;
You might find some of the information on this site useful:

http://wiki.osdev.org/Main_Page

Good luck!

Best,
Frank



------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2011-03-09T11:22:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/308">
    <title>Re: [Nasm-users] please help</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/308</link>
    <description>&lt;pre&gt;
Mmmm, no chance of altering files legitimately either, then?


Dunno. It "should", if the emulation is correct, I guess. Try it. Seems 
like it might be the hard way... Try it... no harm done(?) if it doesn't 
work normally...

Best,
Frank






------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2011-03-08T22:06:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/307">
    <title>Re: [Nasm-users] please help</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/307</link>
    <description>&lt;pre&gt;
Jeez, I did it myself...

----------------------

kevin becker wrote:
 &amp;gt; uhm
 &amp;gt;
 &amp;gt; when i click on the NASM.exe, it pops upon, and then closes before 
anything can be even SEEN
 &amp;gt;
 &amp;gt; it doesn't do anything....

Ah, okay. Nasm is a "command line" utility. That is, at a "command 
prompt", you'd type "nasm -f win32 -i c:\my\includes\ -o myfile.obj 
myfile.asm", or so. You can get a command prompt by doing 
start-&amp;gt;run-&amp;gt;"cmd" - I think that still works. Alternatively, there's a 
way to make a "shortcut" to Nasm that will pop up a dialog-box when you 
click on it that will allow you to enter a command line. I'm afraid I 
don't remember how that one goes - "properties-&amp;gt;advanced" somewhere, no 
doubt...

Or, you might prefer an "IDE" - an "Integrated Development Environment" 
which will allow you to clickie-clickie to edit, assemble, run, debug, 
etc. NaGoA was one created for Nasm. It appears to be "abandoned", but 
still works, AFAIK.

http://www.visual-assembler.pt.vu/

(wow! that's *really* looking abandoned!)

Probably the most popular IDE is RadAsm...

http://radasm.cherrytree.at/radasm/

You can use Nasm with Visual Studio, too, I understand, though it may 
take more "setup" than with RadAsm(?). I prefer working from a command 
prompt, myself, and I'm not running Windows, so I can't help you much. 
Maybe someone who is can give you more specific advice... What you're 
seeing is "normal behavior" from Nasm. The error message, which goes by 
too fast to see, says "error: no input file specified".

Best,
Frank




------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2011-03-08T18:52:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/306">
    <title>Re: [Nasm-users] please help</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/306</link>
    <description>&lt;pre&gt;
FUNEM?
SIFM.
FUNEX?
SIFX.
OKMNX.
(since you've eaten all the waffles...) :)

Hi Kevin,

I'm not quite clear what "it" is. (like Bill Clinton :) )

Is Nasm quitting on you before it assembles your file? Or is your 
program exiting before you can see the result? The mention of 
"system("pause"); sounds like the latter(?). We can call system() from 
assembly, too, of course. Probably you want to wait for a keystroke(?). 
How you do that depends on your OS, or if you're linking against a C 
library, getc()...

I think we need more information about exactly what you did, and what 
happened (as opposed to what you wanted to happen).

Best,
Frank

(Incidentally, click "reply all" to reply to the list - otherwise it 
goes just to me. I've cleared your "moderation flag", so your message 
ought to appear right away, this time. Sorry for the delay.)


------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2011-03-08T13:46:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/305">
    <title>[Nasm-users] please help</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/305</link>
    <description>&lt;pre&gt;i have ap orblem whenever i try to run it it shuts down instantly. It does
the same thing when i run a program in Dev C++, but that i can just type
system("PAUSE);
please help me
thanx
&lt;/pre&gt;</description>
    <dc:creator>kevin becker</dc:creator>
    <dc:date>2011-03-08T00:00:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.nasm.general/304">
    <title>Re: [Nasm-users] Working with pointers</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.nasm.general/304</link>
    <description>&lt;pre&gt;
Hi Tyler,

You're welcome. I'm going to undo your consideration and fill up 
everybody's mailbox, though, 'cause I think your questions are 
interesting, and might lead to some discussion. If anyone thinks this 
list is generating too much traffic, they can complain... or just 
unsubscribe. :)


ASSuming you want to do this via the int 80h interface, there's really 
only one sys_socketcall (102). This is usually "wrapped" to socket 
(create), connect, bind, listen, etc. Even Konstantin's "asmutils" 
provides macros for sys_socket, etc. But the "real" interface is just 
sys_socketcall, with the subfunctions or "commands" in ebx - ecx points 
to remaining parameters. In order to not "hide" anything, I like to do 
it that way, although we're "supposed" to use the C library interface 
(they make me say that). There are "send" and "recv" commands, but 
sys_write/sys_read seem to work - sys_close seems to work - just like 
any other file descriptor.


Well, "just call malloc". There are a couple of system calls that will 
get us a chunk of memory - sys_mmap (or mmap2?) and sys_brk. These get 
us a minimum of 4096 bytes. To "malloc" smaller pieces, we're on our 
own. I think Jonathan Bartlett's "PGU" has an example. I think sys_mmap 
gets us memory starting about 40000000h, sys_brk gives us memory 
contiguous with the end of our existing memory, which may be an 
advantage(?). As I recall, "man 2 brk" isn't too helpful (unusually).

xor ebx, ebx
mov eax, 45
int 80h
; check for error - shouldn't be any(?)
mov [orig_break], eax
mov ebx, eax
add ebx, 4096 ; or some multiple
mov eax, 45
int 80h
; check for error - might be out of memory

Now eax should have our new "break" (where memory ends for our process). 
We can use memory between "orig_break" and "new_break". To "free" it:

mov ebx, [orig_break]
mov eax, 45
int 80h

Now we should be back where we were. I think that works...

Getting back to sockets, here's my adaptation of Scott Lanning's 
"daytime_cli.s" (available at Konstantin's linuxassembly.org, or 
http://asm.sf.net somewhere):

;-----------------------------
; daytime client in Linux asm, syscalls only
; loosely based on daytime_cli.s from Scott Lanning
;
; nasm -f elf32 daytime.asm
; ld -o daytime daytime.o

global _start

struc sockaddr_in
     .sin_family resw 1
     .sin_port resw 1
     .sin_addr resd 1
     .sin_zero resb 8
endstruc

_ip equ 0x7F000001; loopback - 127.0.0.1
_port equ 13

; Convert numbers to network byte order

IP equ ((_ip &amp;amp; 0xFF000000) &amp;gt;&amp;gt; 24) | ((_ip &amp;amp; 0x00FF0000) &amp;gt;&amp;gt;  8) | ((_ip &amp;amp; 
0x0000FF00) &amp;lt;&amp;lt;  8) | ((_ip &amp;amp; 0x000000FF) &amp;lt;&amp;lt; 24)
PORT equ ((_port &amp;gt;&amp;gt; 8) &amp;amp; 0xFF) | ((_port &amp;amp; 0xFF) &amp;lt;&amp;lt; 8)

AF_INET        equ 2
SOCK_STREAM    equ 1

BUFLEN         equ  0x80


STDIN          equ 0
STDOUT         equ 1

__NR_exitequ 1
__NR_read       equ 3
__NR_write      equ 4
__NR_socketcall equ 102

SYS_SOCKET     equ 1
SYS_CONNECT    equ 3

section .data

my_sa istruc sockaddr_in
     at sockaddr_in.sin_family, dw AF_INET
     at sockaddr_in.sin_port, dw PORT
     at sockaddr_in.sin_addr, dd IP
     at sockaddr_in.sin_zero, dd 0, 0
iend

socket_args dd AF_INET, SOCK_STREAM, 0

; first of these wants to be socket descriptor
; we fill it in later...
connect_args dd 0, my_sa, sockaddr_in_size


section .bss
     my_buf resb BUFLEN
     sock_desc resd 1


section .text
  _start:

     ; socket(AF_INET, SOCK_STREAM, 0)

     mov     ecx, socket_args; address of args structure
     mov     ebx, SYS_SOCKET     ; subfunction or "command"
     mov     eax, __NR_socketcall     ;c.f. /usr/src/linux/net/socket.c
     int     80h

     cmp     eax, -4096
     ja      exit

     mov     [sock_desc], eax
     ; and fill in connect_args
     mov    [connect_args], eax

      ; connect(sock, (struct sockaddr *)&amp;amp;sa, sizeof(struct sockaddr))

     mov     ecx, connect_args
     mov     ebx, SYS_CONNECT; subfunction or "command"
     mov     eax, __NR_socketcall
     int     80h

     cmp     eax, -4096
     ja      exit

     ; read(sock, buf, len)
     mov     edx, BUFLEN; arg 3: max count
     mov     ecx, my_buf; arg 2: buffer
     mov     ebx, [sock_desc]; arg 1: fd
     mov     eax, __NR_read; sys_read
     int     80h

     cmp     eax, -4096
     ja      exit

     ; write(stdout, buf, len)
     mov     edx, eax; length read is length to write
     mov     ecx, my_buf
     mov     ebx, STDOUT
     mov     eax, __NR_write
     int     80h

     xor eax, eax; success
  exit:
     mov     ebx, eax; exitcode
     mov     eax, __NR_exit
     int     80h
;----------------------

That probably won't do anything, unless you've already got a "daytime" 
server running. Edit (as root) /etc/inetd.conf and uncomment the 
"daytime" line. Do "ps x" to get the ID for inetd, and "kill -HUP xxxx". 
Works for me. If your system is different, enlighten me!

I have a couple other examples... an "echo" (or echo-like) client and 
server (not a very good "server"). I also have a couple examples Nathan 
Baker sent me - Windows programs using the NASMX package. I've written a 
"fakeapi.asm" containing functions with the same names and parameters as 
the Windows APIs, that do "approximately" the same thing. Linking 
(statically) against this allows the same programs to run in Linux. This 
is just a novelty, and will *not* work in the "general case", but I 
thought it was amusing...

If anyone wants to see any of these, give a yell.

Best,
Frank


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
&lt;/pre&gt;</description>
    <dc:creator>Frank Kotler</dc:creator>
    <dc:date>2010-12-20T20:36:36</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.nasm.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.nasm.general</link>
  </textinput>
</rdf:RDF>

