howl-editor / howl

The Howl Editor
http://howl.io
Other
711 stars 68 forks source link

Add support for Assembly syntax (AT&T/GAS, Intel, ARM) #421

Open zesterer opened 6 years ago

zesterer commented 6 years ago

I would add support for this myself through a PR if I wasn't seriously lacking both time or Lua knowledge.

I suspect that the sort of people likely to enjoy keyboard-driven editors are also the sort of people likely to be messing around with assembly, so syntax support would be nice.

nilnor commented 6 years ago

One major item that has to be done when writing a new mode with syntax support is to assemble a good example file containing examples of all constructs and syntax that must be supported. If you (or anyone else) could do that it makes support much more likely (at least if I would write it myself). I'd like to see it though.

zesterer commented 6 years ago

I can do that for AT&T x86 assembly. My knowledge of ARM and Intel assembly isn't good enough for me to be confident about expressing all syntax edge-cases though. I'll place the finished example here when I'm finished.

zesterer commented 6 years ago

For the record, this page is a good reference for AT&T syntax. It's not very long (as is assembly syntax): https://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax

refi64 commented 6 years ago

I wrote a bundle for Intel-style assembly: https://github.com/kirbyfan64/howl-nasm

Part of the difficulty is handling all opcodes; I just depended on an external database for that. I guess it wouldn't be too hard to add AT&T style support...