Hi all,

I'm starting to get back in to assembly programming, (I previously did a little bit on linux) so would like some advice.

I'm mostly interested at this point just making applications for windows (and programming it on windows too).  I have Nasm but nothing else - can't even find a simple linker that I can use; plus any references I do find to linkers / IDEs / xyz have broken links or doesn't indicate support for 64bit assembly leaving me wasting a lot of time just searching for applications just to start doing ASM at the moment T__T;; 

The other bit I never really got were includes / using libraries /DLL etc.  Do I download the windows SDK, include the header files and a simple job done?  Does there have to be a C compiler installed to do this or do I need to download ASM based header files etc?

I actually found it easier (when i was doing some assembly in linux) to grab the OS interrupt and pass all the Raw values to set up something like a Socket (which really isnt productive) but I can understand how it works that way, but I can never find a detailed explanation on includes /using DLLs with assembly on how it actually all works and comes together so i actually know what im doing -_-;;

Thanks in advanced.
Posted on 2011-11-02 08:55:05 by lukus001
Get the NASMX package http://www.asmcommunity.net/projects/nasmx/ for Windows.  You will find everything you need to do 32/64 bit assembly programming including linker, resource compiler, help files, and lots of example code.  Start by assembling the samples and grow your own apps from them.
Posted on 2011-11-02 11:01:31 by p1ranha
Hi p1ranha!

Thanks for the reply! didn't think NasmX had a linker as well :3 I actually came across that linker a few times but wasn't sure if i should use it since it was still 'beta'; though I guess it works fine.

Thanks again.
Posted on 2011-11-03 08:47:58 by lukus001
NasmX is a complete development package which brings together all the basic tools which a programmer should need (minus a debugger) for development on a variety of platforms. It includes tools by the Netwide Assembler development team (www.nasm.us), Jeremy Gordon (www.godevtool.com), and Ketil Olsen (www.oby.ro/rad_asm). The header/macro set itself is developed by Rob Neff based on the work of Keith Kanios.

Given that NasmX is made up of so many pieces which come from a wide variety of developers means that there is a high probability that you'll see components used elsewhere.

If you also need a good editor to go along with the package, I suggest trying out Gedit (a cross platform editor) along with the various plugins which give it a lot of really nice features. I've used it for years now and since you said you were familiar with Linux, you might have already made use of it. For NASM support, try this modification of nathanpc's asm-intel.lang file for Gedit.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="Assembler (Intel)" version="1.0" _section="Sources" globs="*.asm" mimetypes="text/x-asm;text/x-assembler">

<escape-char>\</escape-char>

<line-comment _name = "Line Comment" style= "Comment">
<start-regex>#|@|;</start-regex>
</line-comment>

<block-comment _name = "Block Comment" style = "Comment">
<start-regex>\%comment</start-regex>
        <end-regex>\%endcomment</end-regex>
</block-comment>

<string _name = "NASM Identifiers" style = "Keyword" end-at-line-end = "TRUE">
<start-regex>\[</start-regex>
<end-regex>\]</end-regex>
</string>

<pattern-item _name = "Operators" style = "Keyword">
<regex>[-.,:\+\*\/\(\)\{\}\[]|]</regex>
</pattern-item>

<pattern-item _name = "Label" style = "Preprocessor">
<regex>^*\:</regex>
</pattern-item>

<pattern-item _name = "Local Label" style = "Preprocessor">
<regex>.*\:</regex>
</pattern-item>

<string _name = "String" style = "String" end-at-line-end = "TRUE">
<start-regex>&quot;</start-regex>
<end-regex>&quot;</end-regex>
</string>

<keyword-list _name = "Registers" style = "Data Type" case-sensitive="FALSE"
match-empty-string-at-beginning = "TRUE"
match-empty-string-at-end = "TRUE">

<!-- intel x86-64 -->

<keyword>rax</keyword>
<keyword>rbx</keyword>
<keyword>rcx</keyword>
<keyword>rdx</keyword>
<keyword>rsi</keyword>
<keyword>rdi</keyword>
<keyword>rsp</keyword>
<keyword>rbp</keyword>

<keyword>r0</keyword>
<keyword>r1</keyword>
<keyword>r2</keyword>
<keyword>r3</keyword>
<keyword>r4</keyword>
<keyword>r5</keyword>
<keyword>r6</keyword>
<keyword>r7</keyword>
<keyword>r8</keyword>
<keyword>r9</keyword>
<keyword>r10</keyword>
<keyword>r11</keyword>
<keyword>r12</keyword>
<keyword>r13</keyword>
<keyword>r14</keyword>
<keyword>r15</keyword>

<!-- intel 386 -->

<keyword>eax</keyword>
<keyword>ebx</keyword>
<keyword>ecx</keyword>
<keyword>edx</keyword>
<keyword>esi</keyword>
<keyword>edi</keyword>
<keyword>esp</keyword>
<keyword>ebp</keyword>

<keyword>ax</keyword>
<keyword>bx</keyword>
<keyword>cx</keyword>
<keyword>dx</keyword>
<keyword>di</keyword>
<keyword>si</keyword>
<keyword>bp</keyword>
<keyword>sp</keyword>

<keyword>al</keyword>
<keyword>ah</keyword>
<keyword>bh</keyword>
<keyword>bl</keyword>
<keyword>ch</keyword>
<keyword>cl</keyword>
<keyword>dh</keyword>
<keyword>dl</keyword>

<keyword>cs</keyword>
<keyword>ds</keyword>
<keyword>ss</keyword>
<keyword>es</keyword>
<keyword>fs</keyword>
<keyword>gs</keyword>

<keyword>cr0</keyword>
<keyword>cr2</keyword>
<keyword>cr3</keyword>

<keyword>db0</keyword>
<keyword>db1</keyword>
<keyword>db2</keyword>
<keyword>db3</keyword>
<keyword>db6</keyword>
<keyword>db7</keyword>

<keyword>tr6</keyword>
<keyword>tr7</keyword>

<keyword>st</keyword>
<keyword>st(0)</keyword>
<keyword>st(1)</keyword>
<keyword>st(2)</keyword>
<keyword>st(3)</keyword>
<keyword>st(4)</keyword>
<keyword>st(5)</keyword>
<keyword>st(6)</keyword>
<keyword>st(7)</keyword>

<keyword>mm0</keyword>
<keyword>mm1</keyword>
<keyword>mm2</keyword>
<keyword>mm3</keyword>
<keyword>mm4</keyword>
<keyword>mm5</keyword>
<keyword>mm6</keyword>
<keyword>mm7</keyword>

<keyword>xmm0</keyword>
<keyword>xmm1</keyword>
<keyword>xmm2</keyword>
<keyword>xmm3</keyword>
<keyword>xmm4</keyword>
<keyword>xmm5</keyword>
<keyword>xmm6</keyword>
<keyword>xmm7</keyword>
</keyword-list>

<keyword-list _name = "Primitive Types" style = "String" case-sensitive="FALSE"
match-empty-string-at-beginning = "TRUE"
match-empty-string-at-end = "TRUE">
<keyword>byte</keyword>
<keyword>word</keyword>
<keyword>dword</keyword>
<keyword>qword</keyword>
<keyword>tword</keyword>
<keyword>oword</keyword>
</keyword-list>

<keyword-list _name = "Directives" style = "Preprocessor" case-sensitive="FALSE"
match-empty-string-at-beginning = "TRUE"
match-empty-string-at-end = "TRUE">
<keyword>bits</keyword>
<keyword>cpu</keyword>
<keyword>absolute</keyword>
<keyword>struc</keyword>
<keyword>endstruct</keyword>
<keyword>section</keyword>
<keyword>segment</keyword>
<keyword>global</keyword>
<keyword>extern</keyword>
<keyword>use16</keyword>
<keyword>use32</keyword>
<keyword>use64</keyword>
<keyword>default</keyword>
<keyword>common</keyword>
<keyword>db</keyword>
<keyword>dd</keyword>
<keyword>dq</keyword>
<keyword>dt</keyword>
<keyword>do</keyword>
<keyword>resb</keyword>
<keyword>resd</keyword>
<keyword>resq</keyword>
<keyword>rest</keyword>
<keyword>reso</keyword>
<keyword>incbin</keyword>
<keyword>equ</keyword>
<keyword>times</keyword>
<keyword>seg</keyword>
<keyword>wrt</keyword>
<keyword>strict</keyword>
<keyword>istruc</keyword>
<keyword>iend</keyword>
<keyword>align</keyword>
<keyword>alignb</keyword>
<keyword>sectalign</keyword>
<keyword>float</keyword>
<keyword>org</keyword>
</keyword-list>

<keyword-list _name = "Assembler Equates" style = "Preprocessor" case-sensitive="TRUE"
match-empty-string-at-beginning = "TRUE"
match-empty-string-at-end = "TRUE">
<keyword>__SECT__</keyword>
<keyword>__BITS__</keyword>
<keyword>__NASM_VERSION_ID__</keyword>
<keyword>__NASM_VER__</keyword>
<keyword>__FILE__</keyword>
<keyword>__LINE__</keyword>
<keyword>__BITS__</keyword>
<keyword>__OUTPUT_FORMAT__</keyword>
<keyword>__PASS__</keyword>
</keyword-list>

<pattern-item _name = "First Pass" style = "Preprocessor">
<regex>\%*</regex>
</pattern-item>

<pattern-item _name = "Character Constant" style = "String">
<regex>&apos;([^\]|\\(.?))</regex>
</pattern-item>

<pattern-item _name = "Decimal" style = "Decimal">
<regex>\b([1-9][0-9]*|0)((|LL|ll)?|(|LL|ll)?)?\b</regex>
</pattern-item>

<pattern-item _name = "Floating Point Number" style = "Floating Point">
<regex>\b([0-9]+[-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([-]?[0-9]+)?)?</regex>
</pattern-item>

<pattern-item _name = "Hex Number" style = "Base-N Integer">
<regex>\b0[0-9a-fA-F]+((|LL|ll)?|(|LL|ll)?)?\b</regex>
</pattern-item>

</language>


Gedit/Windows can be obtained from the Gnome Live website.
Posted on 2011-11-03 22:06:58 by Synfire
Cheers synfire

Gedit certainly looks good - was definitely in need of an editor.

Many tanks.
Posted on 2011-11-04 09:15:00 by lukus001