Giter Club home page Giter Club logo

nasm-mode's Introduction

nasm-mode

nasm-mode is a major mode for editing NASM x86 assembly programs. It includes syntax highlighting, automatic indentation, and imenu integration. Unlike Emacs' generic asm-mode, it understands NASM-specific syntax. Requires Emacs 24.3 or higher.

The instruction and keyword lists are from NASM 2.12.01.

Known Issues

  • Due to limitations of Emacs' syntax tables, like many other major modes, double and single quoted strings don't properly handle backslashes, which, unlike backquoted strings, aren't escapes in NASM syntax.

nasm-mode's People

Contributors

charliegreen avatar lassik avatar nverno avatar sebastiencs avatar skeeto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nasm-mode's Issues

labels with percent sign are not formatted correctly

The default for nasm-mode seems to be to format labels fully left-aligned (starting in the first column), like so:

foo:
    xor eax, eax

So far, so good. If a label contains a % character, however, the indentation changes - the labels are now aligned one tab in, same as assembly instructions, like so:

    foo%1:
    xor eax, eax

Probably this happens because nasm-mode doesn't detect it as a valid label - but such labels are common, for example, in macro definitions.

Adding comments in middle of a line

I'm not sure if this is a nasm-mode issue, or just a quirk of emacs comment handling, but when using the nasm mode, I can no longer add a ; character in the middle of a line.

For example, I often have something like:

xor eax, dword [ebx + ecx + 123]

and I want to comment out everything after and including dword, like:

xor eax, ebx ; dword [ebx + ecx + 123]

When I enter the ; in that location there, the cursor instead jumps to the end of the line and adds the ; there. In some cases this is helpful, but in this case not. I have to delete everything I want to comment out, and then write the comment.

nasm-mode issue or emacs quirk?

Automatically generated token lists available

Hi,

As you might know, I'm the NASM maintainer. I'm also a pretty avid Emacs user. I thought I might help by making it possible for the token lists to be automatically generated, so I added a Perl script to do so (misc/emacstbl.pl) and put it in the "emacs" branch of the main NASM repository, https://github.com/netwide-assembler/nasm.

It probably takes a bit of hacking to accept the output of this file, and I would certainly accept changes to the script as needed, but I would suggest using (require) to load this file separately from the actual code, to decouple it from maintaining your code.

I have attached a sample output.
nasmtbl.el.txt

nasm-mode prevents completion-at-point in sh-mode

After installing nasm-mode and load it, completion-at-point in sh-mode no longer give code completion, but giving this error instead:

user-error: No items suitable for an index found in this buffer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.