Week 6 Flashcards
What is goto statement equivalent to in assembly language?
Jump
It unconditionally transfers control to a statement other than the next one.
Why has goto been discouraged in modern HLL programming?
it can be replaced by control structures which support structured programming.
What is an address?
It’s a number giving the location of some info in memory
What is a label?
It’s used in assembly language as a symbolic name of an address
What are conditional jumps?
JUMPF and JUMPT
What are some common control constructs in HLLs?
for loops, while loops, if then else structures
How do you translate the if-statement in a HLL to assembly language:
x=2;
if(y>x){a=5;}
b=6;
See lecture 6.3
How do you translate the if-then-else HLL statement to assembly language?
x=2;
if(y>x){a=5}
else{c=7}
b=6;
See lecture 6.3
Are while and for loops bounded or unbounded iterations?
In modern HLLs, while statements are unbounded. For loops are bounded.
How can we turn while and for loops into assembly language?
By using goto statements.