Announcement

Collapse
No announcement yet.

Anyone know ARM Assemby language?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone know ARM Assemby language?

    I just wanna know how an 'ANDS' is different to an 'AND'.

    E.g:

    AND R3,R2,R1 Does a logical bitwise AND on R2 and R1 and puts the answer into R3

    but what would

    ANDS R3,R2,R1 do?

    ------------------
    Cheers,
    Steve

    "Life is what we make of it, yet most of us just fake"

  • #2
    I just became your resident expert on ARM assembly programming! Never seen it before till you asked.

    S is a suffix which causes the execution of the instruction to update the status register, an update that does not happen automatically unless S is used as a suffix.


    <font face="Verdana, Arial, Helvetica" size="2">
    There is a final conditional code which works in the reverse way. S, when applied to an instruction, causes the status flags to be updated. This does not happen automatically - except for those instructions whose purpose is to set the status. For example:
    ADD R0, R0, R1

    ADDS R0, R0, R1

    ADDEQS R0, R0, R1

    The first example shows us a basic addition (adding the value of R1 to R0) which does not affect the status registers.
    The second example shows us the same addition, only this time it will cause the status registers to be updated.

    The last example shows us the addition again, updating the status registers. The difference here is that it is a conditional instruction. It will only be executed if the result of a previous operation was EQual (if the Z flag is set).
    </font>
    Info from: http://www.heyrick.co.uk/assembler/

    b
    Why do today what you can put off until tomorrow? But why put off until tomorrow what you can put off altogether?

    Comment


    • #3
      Excellent! That makes perfect sense! Thanks spoogenet!

      ------------------
      Cheers,
      Steve

      "Life is what we make of it, yet most of us just fake"

      Comment


      • #4
        No prob, glad I could be of assistance.

        b
        Why do today what you can put off until tomorrow? But why put off until tomorrow what you can put off altogether?

        Comment

        Working...
        X