home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / exthelp / !StrongHlp / HelpData / Assembly / Helpdata next >
Encoding:
Text File  |  1992-04-16  |  3.2 KB  |  119 lines

  1. Instructions :
  2. <ADC>  Add with Carry
  3. <ADD>  Add
  4. <AND>  And
  5. B    Branch
  6. BIC  Bit Clear
  7. CMN  Compare Negative
  8. CMP  Compare
  9. EOR  Exlusive OR
  10. LDM  Load Multiple
  11. LDR  Load Register
  12. MLA  Multiply with Accumulate
  13. MOV  Move
  14. MUL  Multiply
  15. MVN  Move Negative
  16. ORR  Inclusive OR
  17. RSB  Reverse Subtract
  18. RSC  Reverse Subtract with Carry
  19. SBC  Subtract with Carry
  20. STM  Store Multiple
  21. STR  Store Register
  22. SUB  Subtract
  23. SWI  Software Interrupt
  24. TEQ  Test for Equality
  25. TST  Test MaskedADC
  26. Aritmetic add with carry
  27.  
  28. Syntax:  ADC\<<cond>>\<<S>> <Rd>,<Rn>,<Op2>
  29.  
  30.          NZCV
  31. Flags :  ****ADD
  32. Aritmetic add
  33.  
  34. Syntax:  ADD\<<cond>>\<<S>> <Rd>,<Rn>,<Op2>
  35.  
  36.          NZCV
  37. Flags :  ****Logical AND
  38.               %0011
  39.        AND    %0101
  40.        ------------
  41.       =      %0001
  42.  
  43. Syntax:  AND\<<cond>>\<<S>> <Rd>,<Rn>,<Op2>
  44.  
  45.          NZCV
  46. Flags :  ***-Condition codes
  47. All instructions are conditionally executed. If the condition
  48. in the top four bits of the instruction is not met, then even
  49. illegal instructions will have no effect...
  50.  
  51. Condition field   Execute IF
  52. ---------------   -------------------------------------------
  53.    0000 = EQ    :  Z               (equal)
  54.    0001 = NE    : ~Z               (not equal)
  55.    0010 = CS    :  C               (unsigned higher or same)
  56.    0011 = CC    : ~C               (unsigned lower)
  57.    0100 = MI    :  N               (negative)
  58.    0101 = PL    : ~N               (positive or zero)
  59.    0110 = VS    :  V               (overflow)
  60.    0111 = VC    : ~V               (no overflow)
  61.    1000 = HI    :  C and ~Z        (unsigned higher)
  62.    1001 = LS    : ~C or Z          (unsigned lower or same)
  63.    1010 = GE    :  N = V           (signed higher or same)
  64.    1011 = LT    :  N != V          (signed lower)
  65.    1100 = GT    : ~Z and (N = V)   (signed higher)
  66.    1101 = LE    :  Z or (N != V)   (signed lower or same)
  67.    1110 = AL    :  1               (always)
  68.    1111 = NV    :  0               (never)
  69.  
  70. ( 1 is true, 0 is false, ~ is NOT )R15
  71.   3         2         1
  72.  10987654321098765432109876543210
  73. %NZCOIF....program.counter.....MM
  74.                                00 = User mode
  75.       FIRQ Disable             01 = FIRQ mode
  76.      IRQ Disable               10 = IRQ mode
  77.     Overflow                   11 = Supervisor mode
  78.    Carry / Not borrow / Rotate Extend
  79.   Zero
  80.  Negative / Signed less thanS
  81. Flags will only be updated if this
  82. is present. The S flag is implicit
  83. in CMP, CMN, TEQ and TST
  84.  
  85.   SUBS R1,R1,R2  ; --|
  86.   ADD  R1,R1,R3  ;   |
  87.   Beq  xxx       ; jump if R1-R2 = 0Rd
  88. Rd can be any of the registers
  89. from R0 to R15. If Rd = R15 then
  90. only the PC bits will be set,
  91. not the flags.Rn
  92. Rn can be any of the registers
  93. from R0 to R15. If Rn = R15 then
  94. only the PC bits are used. The 
  95. flag bits will appear cleared.Op2
  96. This can take several forms :
  97.    - Reg
  98.    - Reg <shift> #constant
  99.    - Reg <shift> Reg
  100.      (Note: This takes an
  101.       extra clock cycle)
  102.    - #constant
  103.      (this constant is limited
  104.       to numbers of the form
  105.       byte ROR n*2, where n
  106.       goes from 0 to 15 )Shift
  107. The shift types are :
  108.   LSL  Logical Shift Left
  109.   LSR  Logical Shift Right
  110.   ASR  Arithmetic Shift Right
  111.   ROR  ROtate Right
  112.   RRX  Rotate Right eXtendex
  113.  
  114. RRX is special. It is a rotate
  115. by one, where bit 31 = old carry
  116. and new carry = old bit 0.
  117.  
  118. For all shifts the carry flag is
  119. set to the last bit shifted out.