title: Assembly Language - Directives & Instructions; Moving bytes around
body: <p>I'm working on an Assembly Language homework assignment and do not understand how to proceed for these questions. For the first one, I understand at some point I will need to give a directive of Align 2 to force myBytes into an even numbered address, but am unsure how to specifically write that instruction. For the others, I am unsure of how to move certain bytes of an identifier without moving all of them. Any help would be greatly appreciated.</p>
  <pre>.data
  myBytes BYTE 10h,20h,30h,40h
  myWords WORD 3 DUP(?),2000h
  myString BYTE "ABCDE"</pre>
  <blockquote>
  <ol>
  <li><p>Write a directive in the given data that aligns myBytes to an even-numbered address.</p>
  </li>
  <li><p>Write a single instruction that moves the first two bytes in myBytes to the DX register. The resulting value will be 2010h.</p>
  </li>
  <li><p>Write an instruction that moves the second byte in myWords to the AL register.</p>
  </li>
  <li><p>Write an instruction that moves all four bytes in myBytes to the EAX register.</p>
  </li>
  </ol>
  </blockquote>
  <p>Here's what I've come up with so far:</p>
  <pre><code>1. ALIGN myBytes 2 ???   
  2. mov dx, ?????   
  3. mov al, [myWords+1]   
  4. mov eax, [myBytes]
  </code></pre>