Dato che non so come modificare le parole chiave già presenti in linguaggi già caricati, in questo caso [x86masm]Assembler, ti riporto un esempio su come creare un linguaggio assembler di tuo gradimento:
`
\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}
\lstdefinelanguage{ASM}
{ morekeywords={al,ah,ax,eax,bx,ebx,cx,ecx,dl,dx,edx,%
si,esi,di,edi,bp,ebp,sp,esp,cs,ds,es,ss,fs,gs,cr0,cr1,cr2,cr3,%
db0,db1,db2,db3,db4,db5,db6,db7,tr0,tr1,tr2,tr3,tr4,tr5,tr6,tr7,%
st,aaa,aad,aam,aas,adc,and,arpl,bound,bsf,bsr,bswap,bt,btc,%
btr,bts,call,cbw,cdq,clc,cld,cli,clts,cmc,cmp,cmps,cmpsb,cmpsw,%
cmpsd,cmpxchg,cwd,cwde,daa,das,dec,div,enter,hlt,idiv,imul,in,%
inc,ins,int,into,invd,invlpg,iret,ja,jae,jb,jbe,jc,jcxz,jecxz,%
je,jg,jge,jl,jle,jna,jnae,jnb,jnbe,jnc,jne,jng,jnge,jnl,jnle,%
jno,jnp,jns,jnz,jo,jp,jpe,jpo,js,jz,jmp,lahf,lar,lea,leave,lgdt,%
lidt,lldt,lmsw,lock,lods,lodsb,lodsw,lodsd,loop,loopz,loopnz,%
loope,loopne,lds,les,lfs,lgs,lss,lsl,ltr,mov,movs,movsb,movsw,%
movsd,movsx,movzx,mul,neg,nop,not,or,out,outs,pop,popa,popad,%
popf,popfd,push,pusha,pushad,pushf,pushfd,rcl,rcr,rep,repe,%
repne,repz,repnz,ret,retf,rol,ror,sahf,sal,sar,sbb,scas,seta,%
setae,setb,setbe,setc,sete,setg,setge,setl,setle,setna,setnae,%
setnb,setnbe,setnc,setne,setng,setnge,setnl,setnle,setno,setnp,%
setns,setnz,seto,setp,setpe,setpo,sets,setz,sgdt,shl,shld,shr,%
shrd,sidt,sldt,smsw,stc,std,sti,stos,stosb,stosw,stosd,str,sub,%
test,verr,verw,wait,wbinvd,xadd,xchg,xlatb,xor,fabs,fadd,fbld,%
fbstp,fchs,fclex,fcom,fcos,fdecstp,fdiv,fdivr,ffree,fiadd,ficom,%
fidiv,fidivr,fild,fimul,fincstp,finit,fist,fisub,fisubr,fld,fld1,%
fldl2e,fldl2t,fldlg2,fldln2,fldpi,fldz,fldcw,fldenv,fmul,fnop,%
fpatan,fprem,fprem1,fptan,frndint,frstor,fsave,fscale,fsetpm,%
fsin,fsincos,fsqrt,fst,fstcw,fstenv,fstsw,fsub,fsubr,ftst,fucom,%
fwait,fxam,fxch,fxtract,fyl2x,fyl2xp1,f2xm1},%
morekeywords=[2]{.align,.alpha,assume,byte,code,comm,comment,.const,%
.cref,.data,.data?,db,dd,df,dosseg,dq,dt,dw,dword,else,end,endif,%
endm,endp,ends,eq,equ,.err,.err1,.err2,.errb,.errdef,.errdif,%
.erre,.erridn,.errnb,.errndef,.errnz,event,exitm,extrn,far,%
.fardata,.fardata?,fword,ge,group,gt,high,if,if1,if2,ifb,ifdef,%
ifdif,ife,ifidn,ifnb,ifndef,include,includelib,irp,irpc,label,%
.lall,le,length,.lfcond,.list,local,low,lt,macro,mask,mod,.model,%
name,ne,near,offset,org,out,page,proc,ptr,public,purge,qword,.%
radix,record,rept,.sall,seg,segment,.seq,.sfcond,short,size,%
.stack,struc,subttl,tbyte,.tfcond,this,title,type,.type,width,%
word,.xall,.xcref,.xlist},%
morekeywords=[3]{add,bl,bh},
morekeywords=[4]{dh,ch,cl},
alsoletter=.,alsodigit=?,%
sensitive=f,%
morestring=“,%
morestring=',%
morecomment=[l],%
keywordstyle=[3]{\bfseries\color{red}},
keywordstyle=[4]{\bfseries\color{gray}},
}
\lstset{%
language=ASM,
numbers=left,stepnumber=1,numberstyle=\tiny,
}%
\begin{document}
\begin{lstlisting}
SUB AH,BL
DIV AH,02H
ADD BH,AL
MUL DH,CL
\end{lstlisting}
\end{document}`
ho tolto add,ch,cl,dh,bl e bh dal primo morekeywords e li ho messi in altri 2 tipi separati.
In tutto sono 4 come puoi leggere dai numeri tra parentesi quadre.
E’ un esempio demenziale ma dovrebbe parti capire come si può creare un nuovo tipo di linguaggio.
Ciao
Andrea