1 Code Generation Code generator phase ... - VTU e-Learning
1 Code Generation Code generator phase ... - VTU e-Learning
1 Code Generation Code generator phase ... - VTU e-Learning
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
* code for b */<br />
action 3<br />
return<br />
/* code for c */<br />
action 4<br />
call b<br />
action 5<br />
call c<br />
action 6<br />
call c<br />
return<br />
The final code generated will be as follows:<br />
/* code for a * /<br />
100: MOV # 600, SP // initialize stack<br />
110: action 1<br />
120: ADD # a.size, SP<br />
130: MOV # 150, * SP<br />
140: GOTO 300<br />
150: SUB # a_size, SP<br />
160: action 2<br />
170: end<br />
/* code for b */<br />
200: action 3<br />
210: GOTO * 0(SP)<br />
/* code for c */<br />
300: action 4<br />
310: ADD # c_size, SP<br />
7