Category:ARM Assembly: Difference between revisions

no edit summary
No edit summary
Line 17:
<lang ARM Assembly>addeq r0,r0,r1 ;if the last math operation had an answer of zero, add r0 to r1 and store the result in r0.</lang>
[[Category:Assembly]]
 
===Setting Flags===
The flags, or condition codes, are only set by instructions that end in an "s". This lets you "preserve" the processor's state after an important calculation, but do some other things before execution branches depending on the result of that calculation. On any other processor, the calculation that determines whether a branch occurs MUST happen JUST before that branch statement or the branch will be taken based on the wrong data.
1,489

edits