#include "c:\AsmIDE\hcs12.inc" org $1000 aa dc.w 10 xx dc.w 7 bb dc.w 6 org $1010 result ds.w 2 org $1500 ldx #aa ; set X to point to constant aa ldy #xx ; set Y to point to variable xx movw bb,result+2 ; store b in the result movw #0,result ; " emacs result ; perform the multiplication and accumulation swi end