Skip to main content

Add two 16-bits numbers with DAD instruction

Add two 16-bits numbers with DAD instruction

  1. LHLD 2501H  : "Get 1st 16-bit number"  
  2. XCHG        : "Save 1st 16-bit number in DE"  
  3. LHLD 2503H  : "Get 2nd 16-bit number in H-L"  
  4. DAD D       : "Add DE and HL"  
  5. SHLD 2505H  : "Store 16-bit result in memory locations 2505H and 2506H".  
  6. HLT         : "Stop"

Comments