Jump to content

Talk:Netwide Assembler

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
[edit]

"It was originally copyrighted but it is now available as free software under the terms of the GNU Lesser General Public License" It sure is still copyrighted as otherwise it would have been donated into the public domain and not licensed LGPL. It was probably closed source (or otherwise restricted before). --213.39.162.9 (talk) 19:59, 10 September 2008 (UTC)[reply]

It was under an ad hoc and very awkward license. Most of the developers decided they had no interest in continuing to work on the project under that license, and NASM got kicked off Sourceforge due to the license not being OSI-approved. --Hpa (talk) 23:06, 15 September 2008 (UTC)[reply]

Name

[edit]

How did it come by its name? "Netwide Assembler" seems kind of odd. Is it like Nethack in its derivation? --Gwern (contribs) 18:39, 4 November 2006 (UTC)[reply]

IIRC, the name came about because the project was based on a load of discussions to which anyone on the USENET group comp.lang.asm.x86 was encouraged to contribute, about what their ideal assembler would look like. In a sense, it was built to keep all of those things that were discussed there in mind. OK, so some of them never happened, but in spirit it was an assembler designed for the Internet, or at least that part of it that read clax86. Probably best to ask Simon Tatham. I'm pretty sure the name was his idea, and I don't think he ever comes here. JulesH 14:39, 5 November 2006 (UTC)[reply]
Perhaps the page should mention this, along with some info about what stuff wasn't added?
And, shouldn't this page be at Netwide assembler ?
Zuiram 08:43, 23 November 2006 (UTC)[reply]

Political problems?

[edit]

Could anyone elaborate on the political problems mentioned? If they caused a license change, they may be significant enough to have their own section. Obonicus 15:01, 24 August 2007 (UTC)[reply]

Generally

[edit]

Could somebody reword this:

"NASM principally outputs object files, which are generally not executable in and of themselves. The only exception to this are flat binaries (e.g. .COM) which are inherently limited in modern use."

Why "NASM"? (Isn't the rest of the paragraph equally applicable to all assemblers?) Why "principally"? Why "generally"? Is "in and of themselves" necessary? "Exception" to what, precisely? (Their ability to be executed? I thought object files ended in ".O", and simple, headerless command file executables under 64 kilobytes, if that's the way to describe them, ended in ".COM", so wouldn't they have to be renamed, at least?) What does "flat" mean? Are there many examples besides ".COM"? Why "inherently"? "Limited" how? How "modern"? Do ".COM" binaries work, and if so, why are they less useful today than in the past? (As far as I know, they work fine, and work on my Windows XP computer, as far as I can tell, just as they did on my IBM PC in the early 1980's.)

I hope the statement can be made less verbose and more definitive without loss of accuracy, yet comprehensible to a wider audience. Perhaps this would do (if it's correct):

"Assemblers produce object files, which do not contain legible text, but instructions to central processing units. Those assembled on the TINY model can be executed directly, but otherwise are accompanied by other files, to be linked (compiled?) into an executable program." Unfree (talk) 22:46, 25 December 2007 (UTC)[reply]

Not all assemblers operate in that manner, most... but not all. "principally" because flat binary files are available as opposed to object files. "generally" because some operating systems and setups are designed to work with those object files directly, e.g. RDOFF. "in and of themselves" could easily go, kind of redundant. "Exception" as related to "principally" in the same way you'd use either/or neither/nor. "flat" comes from the fact that there is no structure or specification, only code that could be ideally fed to a processor and executed as-is; major examples being MBRs, kernels and other things related to operating system development. "inherently limited" due to the fact that not many people can make use of a 64KB BIOS/DOS Interrupt driven CLI environment to solve modern day tasks; not in a timely and cost-efficient manner, anyhow. Also, this article is about NASM, why would we try to spread generic information in a specific article? This is why those article interlinks exist, to avoid the mass posting of redundant information. SpooK (talk) 17:55, 30 December 2007 (UTC)[reply]

Extra Code

[edit]

Seeing as even DOS has a sample program can a "Hello World" for OSX assembly be included as well? Perhaps the code on http://peter.michaux.ca/articles/assembly-hello-world-for-os-x if allowed? — Preceding unsigned comment added by Friecode (talkcontribs) 00:00, 15 March 2011 (UTC)[reply]

100% tested NASM "Hello, world!" for eight x86-64 Unix-like operating systems

[edit]

The following NASM source code was verified to work with all the 8 mentioned Unix-like operating systems. The system-dependent part in the beginning can be separated in a header file, which in turn can be expanded to include more system calls than just two. --Лъчезар共产主义万岁 17:12, 18 June 2014 (UTC)[reply]

; MacOS X: /usr/local/bin/nasm -f macho64 *.s && ld -macosx_version_min 10.7 *.o
; Solaris/FreeBSD/DragonFly: nasm -f elf64 -D UNIX *.s && ld *.o
; NetBSD: nasm -f elf64 -D UNIX -D NetBSD *.s && ld *.o
; OpenBSD: nasm -f elf64 -D UNIX -D OpenBSD *.s && ld -static *.o
; OpenIndiana: nasm -f elf64 -D UNIX *.s && ld -m elf_x86_64 *.o
; Linux: nasm -f elf64 *.s && ld *.o

%ifdef  NetBSD
section .note.netbsd.ident
        dd      7,4,1
        db      "NetBSD",0,0
        dd      200000000       ; amd64 supported since 2.0
%endif

%ifdef  OpenBSD
section .note.openbsd.ident
        align   2
        dd      8,4,1
        db      "OpenBSD",0
        dd      0
        align   2
%endif

section .text

%ifidn __OUTPUT_FORMAT__, macho64       ; MacOS X
        %define SYS_exit        0x2000001
        %define SYS_write       0x2000004

        global  start
        start: 
%elifidn __OUTPUT_FORMAT__, elf64
        %ifdef  UNIX            ; Solaris/OI/FreeBSD/NetBSD/OpenBSD/DragonFly
                %define SYS_exit        1
                %define SYS_write       4
        %else                   ; Linux
                %define SYS_exit        60
                %define SYS_write       1
        %endif

        global  _start
        _start:
%else
        %error  "Unsupported platform"
%endif
 
        mov     rax,SYS_write
        mov     rdi,1           ; stdout
        mov     rsi,msg
        mov     rdx,len
        syscall
        mov     rax,SYS_exit
        xor     rdi,rdi         ; exit code 0
        syscall

section .data
 
msg     db      "Hello, world!",10
len     equ     $-msg
[edit]

Hello fellow Wikipedians,

I have just added archive links to one external link on Netwide Assembler. Please take a moment to review my edit. If necessary, add {{cbignore}} after the link to keep me from modifying it. Alternatively, you can add {{nobots|deny=InternetArchiveBot}} to keep me off the page altogether. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true to let others know.

checkY An editor has reviewed this edit and fixed any errors that were found.

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers. —cyberbot IITalk to my owner:Online 16:44, 28 August 2015 (UTC)[reply]

[edit]

Hello fellow Wikipedians,

I have just modified 3 external links on Netwide Assembler. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 11:33, 16 February 2018 (UTC)[reply]