5 ms·
Nasm – A cross-platform x86 assembler with an Intel-like syntax
- Klasiaster 5y agoThere is also yasm https://github.com/yasm/yasm https://github.com/yasm/yasm which has different goals but doesn't seem to be that active anymore.
- GeorgeWBasic 5y agoWould you happen to know the authors of yasm felt the need to completely rewrite nasm? It's always been confusing to me.
- asveikau 5y agoLooking at it not very deeply, seems like yasm is more of a library with a command line frontend, and whereas nasm is built like a program.
- GeorgeWBasic 5y agoThank you, that's a reason at least.
- alaaalawi 5y agoAlsi it has more debugging formats
- asveikau 5y agoIt seems to me like they're saying the library approach makes it easier to add features. So there would be one example of more features.
- Klasiaster 5y agoI think the main reason is for supporting both AT&T and Intel syntax at the same time.
- messe 5y agoIIRC yasm was (is?) also compatible with GNU/AT&T syntax. I remember submitting either a bug report or patch years ago related to that.
- b33j0r 5y agoAs much as I like this, how is Nasm news? Fine. I have not done enough assembly lately, fair enough. More seriously, is anyone still doing this outside of edge computing and embedded applications? Or… a hobby?
- melissalobos 5y agoI had to use a bit of assembly recently and chose nasm for it. A client had an older piece of compiled code and wanted to be able to use it on a modern machine. It was written in a propriety language and compiled for a 32bit system. The argument passing conventions used by the compiler were unusual. So I wrote a bit of assembly in nasm to create a stub function callable from C, it was really just moving things into the right registers and some bits to the stack. So nothing really being done in the asm. The hard part was figuring out the calling convention. Edit: Looking back it turns out that "recently" was 18 months ago.
- jetti 5y agoI'm starting to learn reverse engineering and while doing that I have had to read a bunch of assembly but also write a small amount too. I don't use NASM and am only writing a few instructions at a time, mainly either updating an existing instruction or replacing an instruction with one or more that are the same size
- anta40 5y agoOnly as a part of learning OS kernel development, which is another hobby. We mobile app developers practically have no use of assembly code.
- kevin_thibedeau 5y agoPeople have to develop for computers without an OS. They get paid to do it.
- caned 5y agoAt my job we use nasm to assemble the x86 entry points for our OS kernel. Any assembler would do the job - someone before me just happened to pick nasm.
- mrlonglong 5y agoFantastic tool for compiling x86 assembly code but I've grown to like GNU gas and its at&t syntax. Which do you prefer?
- pjmlp 5y agoIntel, I ported my toy compiler Assembly generation from Intel to AT&T back when it wasn't yet supported on gas, never again.
- guerrilla 5y agoIn case anyone doesn't know, gas supports Intel syntax now.
- xbar 5y agoIntel. AT&T is immoral.
- mrlonglong 5y agoWhy?
- xbar 5y agohttps://outerproduct.net/2021-02-13_att-asm.html https://outerproduct.net/2021-02-13_att-asm.html
- anta40 5y agoAnother thing to consider is FASM (Flat Assembler): https://flatassembler.net/ https://flatassembler.net/ If someone can build FASM 1 for 64-bit MacOS, it would be great.
- messe 5y ago> If someone can build FASM 1 for 64-bit MacOS, it would be great. It's written in 32-bit x86 assembly, so that's unlikely.
- melissalobos 5y ago> FASM 1 If you wanted FASM g for arm(apple silicon) or something that might be much more achievable. FASM g was designed to be much more multiplatform. EDIT: looking it up it looks like someone has done some work for that: http://arm.flatassembler.net/ http://arm.flatassembler.net/
- userbinator 5y agoIt's worth noting that fasm is written in itself, and thus self-assembling.
- eggy 5y agoI switched to FASM when I started playing with MenuetOS [1] years ago. I like FASM, and the community was very helpful then. I started with 6502 assembly back in the 80s, and assembly for 8-bit micros in the 90s. I left assembly until just 4 years ago, and then I started playing with it again for boot sector games because of Oscar Toledo Gutierrez's book, 'Programming Boot Sector Games', for fun. Now there's, 'More Boot Sector Games'. I was a Commodore PET 2001, Vic-20, Amiga 1000, Amiga 500, and Apple PowerPC user back in the day (1978 to 1997), but it looks like DOS/Gates has won; here I am spending my free time trying to create games for DOS! NOTE: Legacy boot mode was taken out of Windows around 2019/2020, so you will need an older computer if you want to boot it off of a USB stick. Or you could just use a DOS emulator. [1] http://menuetos.net/ http://menuetos.net/
- vmchale 5y agoI used it for one of my recent projects - good stuff!
- sylware 5y agonasm SDK is really scary: tons of tough-to-read perl scripts for code generation. I would stay away from it, but nasm is used in ffmpeg. I prefer to use fasm instead, even though its extremely powerful macro language is an invite for abuse.