Assembly Programming

NASM/YASM macro for declaring C functions that link regardless of underscores

Some compilers want an underscore, others don’t. Here is how I fixed it, better looking suggestions welcome…

%macro public_c_symbol 1
GLOBAL %1,_%1

public_c_symbol my_external_proc:
	; ...

Assembly.lang file for Gedit + NASM/YASM

I extracted this from a gnome bugzilla entry. I extended the file a little to include some 64-bit registers and instructions. Install e.g. by copying to /usr/share/gtksourceview-2.0/language-specs/ (there might also be a way to use your gedit config in your home directory).


I don’t maintain this for newer versions of Gedit since I use Sublime Text now.