I'm currently trying to figure out how to add the first byte in memory pointed to by the pointer register SI to the current contents of the AX register.
So if SI holds some address, and the values in memory at that address are: 00 and 01, I'm looking to add just 00 to the AX register.
The first instruction my assembly-noobish self tried was add ax, byte ptr [SI] but of course, no dice, as I'm trying to add operands of different sizes.
My current workaround is
mov dx,0000h ;empty the contents of dx
mov dl,byte ptr [si] ;get the value of the first byte in a register
add ax,dx ;perform the originally desired addition
But this is incredibly wasteful and really hurts my executed instructions count (this is part of a subroutine that runs many times).
I'm limited to the 8086 instruction set so this question/answer by Peter Cordes which suggests movzx to condense my first two lines is unfortunately not viable.