I'm using the x86masm dialect of Assembler and register names are emphasized even when they occur inside of a label or a hexadecimal number. For example, dh is register, but 0dh is a number, yet the dh part of it is emphasized. I haven't had this problem in listings with any other languages, so I'm assuming it's a problem with the language definition. Is there simple way to redefine the language so that this doesn't happen?

\documentclass[12pt]{article}
\usepackage{courier, listings}
\lstset{
language={[x86masm]Assembler},
basicstyle=\ttfamily\small,
frame=single
}
\begin{document}
\begin{lstlisting}
cmp al, 0dh ; dh = register, 0dh = number
je somewhere
\end{lstlisting}
\end{document}


\begin{lstlisting}[deletekeywords={dh}]– Sep 14 '11 at 15:29dhhighlighted, but does not want it highlighted in the number0dh. Seems that to get a complete general solution, the package would be required to parse the actual language to do that as opposed to just match keywords. – Peter Grill Sep 14 '11 at 16:15