Category:ARM Assembly: Difference between revisions

m
m (Added info about the link register)
Line 55:
 
===Setting Flags===
The flags, or condition codes, are only set by instructions that end in an "s," or by compare commands such as <code>CMP</code>. 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''must happen JUSTimmediately before that branch statement or the branch will be taken/not taken based on the wrong data.''
 
<lang ARM Assembly>cmp r0,r1 ;compare r0 to r1
1,489

edits