Share

The Netwide Assembler

Code

Programming Languages: C, Perl, Assembly

License: GNU Library or Lesser General Public License (LGPL)

Repositories

browse code, statistics git://nasm.git.sourceforge.net/gitroot/nasm/nasm (read-only)

Show:

What's happening?

  • Followup: RE: Bug

    Hi Klod, This is subtle! "section .bss" is a macro, which expands to "[section .bss]" - and sets the "__SECT__" macro to .bss. The "struc" macro depends on "__SECT__" to get back from the "absolute" section to whatever section we were in. Supposed to be ".bss", but because "[section...]" didn't set "__SECT__", we switch back to ".text", where "__SECT__" was initialized. It *does* tell you...

    2010-01-07 05:11:42 UTC by fbkotler

  • Followup: RE: Bug

    Sorr, forgot to mention that I use NASM 2.08rc1 Windows XP pro \Nasm\bin\nasm -fwin32 StructureBug.asm -l StructureBug%.lst Regards Klod.

    2010-01-07 02:58:51 UTC by nobody

  • Bug

    Bug when declaring struc as first element after [Section .bss] Check the code sample below: [code][Section .bss] ;hInstance resd 1 ;Instance struc test .first resb 1 .second resb 2 endstruc hInstance resd 1 ;Instance [section .text] [GLOBAL] start start: push 0 extern GetModuleHandleA call GetModuleHandleA push eax push hInstance extern HexPrint pop eax.

    2010-01-07 02:51:01 UTC by nobody

  • Followup: RE: Ilegal intructions

    If your code ran under XP, but doesn't run under Vista, that ought to give you a clue! MS has "improved" their OS by removing 16-bit support. They've been threatening for years to do it - apparently they have. (I thought it was only 64-bit Vista that dropped dos support - you running 64-bit Vista?) An emulator called "dosbox" may help. Best, Frank.

    2010-01-05 17:28:07 UTC by fbkotler

  • Followup: RE: Enter and leaving protected mode

    What you've got there appears to be Masm code (possibly Tasm). Perhaps Jwasm would assemble it. Or, it wouldn't be hard to translate to something Nasm would assemble. But it won't run in Vista - this is for real mode dos! (that is, no "dosbox" or emm386.sys loaded - those are VM86 mode). If you can boot a system that will run it, I'll see if I can dig up some Nasm code that will do the...

    2010-01-05 17:08:49 UTC by fbkotler

  • Ilegal intructions

    I have problem when using intructions like this: mov ds, ax ;set ds with the address of a segment data like .data or .bss out dx, al ;output byte in AL to I/O port address in DX also i can't use the interuptions intructions like int 21h This intructions can be assemble but when i run the program and one of this instruction will be executed the program can't continue and...

    2010-01-05 01:31:38 UTC by nobody

  • Enter and leaving protected mode

    I have some code, but no one can be assemble in masm or nasm. Maybe there are in some syntax that is not recognized in nasm nor masm. i am working in window vista So, if someone can give codes that work fine in nasm or masm32 of protected mode, will be really appreciated. Also some links or tutorial will be of big help for me and others. The following code is an example of protected mode...

    2010-01-05 00:02:39 UTC by nobody

  • Comment: documentation out of date or assembler broken

    I thought that code looked especially like borland tasm. Well, I guess I look stupid now. I suppose it is possible the code got somehow reverted (argh), but the build file I have is still for nasm. I suppose it is possible I never got the EXE code to work with nasm so I must have put the TASM code back in since it was working. the documentation doesn't seem to work. supposedly you can load...

    2010-01-04 03:52:28 UTC by jmichae3

  • Followup: RE: MMX Fsave / Frstor Memory Error

    Ok, problem solved. section .text align=64 // section .data align=64 (or 16) Somehow my alignment wishes in the previous code were ignored, no error produced. Only the above alignment code works. Thx anyway.

    2010-01-03 18:46:06 UTC by nobody

  • MMX Fsave / Frstor Memory Error

    Hi, I am struggling with a little piece of code. Maybe someone can help me. The challenge: A piece of assembly code is included in C and uses the xmm and mmx registers. Their state needs to be restored and saved. I get a memory exception, although I am aligning by 16. Always on fxsave instruction; other fxrstor not used yet. Also I do not know how to get nasm to use the memory adr.

    2010-01-03 18:02:27 UTC by nobody

Our Numbers