MVNandADD.s 441 B

1234567891011121314151617
  1. @
  2. @ Example of the ADD/ADC insttructions.
  3. @
  4. .global _start @ Provide program starting address
  5. @ multiply 2 by -1 by using MVN and then adding 1
  6. _start:
  7. MVN R0, #2
  8. ADD R0, #1
  9. @ Set up the parameters to exit the program
  10. @ and then call Linux to do it.
  11. @ R0 is the return code and will be what
  12. @ we calculated above.
  13. MOV R7, #1 @ Service command code 1
  14. SVC 0 @ Call Linux to terminate