Experimenting with In-line Assembler

  1. Write and test a program that will input a small integer from the user then use assembler code using Intel syntax to:
    1. add 24 to it;
    2. add binary 10010 to it;
    3. add hexadecimal A2 to it;
    4. multiply it by 53
    5. divide it by 3 (integer division);
    6. multiply it by 64 using a shift operation;
    7. carry out the integer division DIV 8 using a shift operation;
    8. add 10 to it if it is less than 10
  2. Repeat 1 using AT&T syntax.
  3. Modify programs ASMLoop2 and ASMLoop2A so that they use an incrementing counter.
Programming - a skill for life!

Getting started with in-line assembler