{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Day7 - 9-22 Control Flow Assembly Control Flow o Jump...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
9-22 Control Flow Assembly Control Flow o Jump Conditional Control Flow o Compare Cmpl b,a (b = {r,m,i}*; a = {r,m}*; Performs a-b) Conditional Jumps o J[conditional] [label] o Eg. jge j_loop Three classes of conditionals General Signed Unsigned Loop Instruction o Loop [label] E.g. movl $15, %ecx /*#of iterations*/ . //Code goes here . Loop .L1 o Historical – wraps up a bunch of things together, you shouldn’t do it anymore o Only works with register %ecx If…then Assembly o Cmpl [cond exp opers] J[!cond] main_body [true body] o Main_body: [main_body] For Loop Assembly o Look up While loop assemply o Look up Notes for Java Programmers o Declare index variable before for loop
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}