Breaking News
Loading...
Thursday 27 November 2014

Addition and Subtraction Instructions in Assembly language

11:13:00 pm

Addition and Subtraction Instructions in Assembly language


Addition and Subtraction Instructions in Assembly language
Addition and Subtraction Instructions in Assembly language
Here are some instructions of assembly language which are written to demonstrate
ate the working of addition and subtraction in assembly language using Nasam Compiler.

Note: V = valid, I = invalid

 Assume that all operations are unsigned.


  1. Add ax , bx        V
  2. Add dx , bl         I (Operand  size mismatch)
  3. Add ecx , dx      I
  4. Sub si , di           V
  5. Ad bx , 9000     I (Source to large)  
  6. Sub ds , 1           I (Segment register)
  7. dec ip                 I can not modify IP
  8. dec edx              V
  9. Add edx,100h  V
  10. Sub ah, 126h    I (Source to large)
  11. Sub al, 256       I (Source to large)
  12. inc ax,1             I extraneous operands

0 comments:

Post a Comment

 
Toggle Footer