# i need ur help in compiler construction

Q: Given the following 3-address code

1: a = 1
2: b = 2
3: c = a + b
4: d = c - a
5: if( d < 20 ) goto 11
6: d = b * d
7: if( d > 20 ) goto 11
8: d = a + b
9: e = e + 1
10: goto 6
11: b = a + b
12: e = c - a
13: if( e < d ) goto 3
14: a = b * d
15: b = a – d

(a) What are the basic blocks for the code segment?

(b) Draw the control flow graph (CFG) for the code once you have determined the basic block.

1: a = 1
2: b = 2
3: c = a + b
4: d = c - a
5: if( d < 20 ) goto 11
6: d = b * d
7: if( d > 20 ) goto 11
8: d = a + b
9: e = e + 1
10: goto 6
11: b = a + b
12: e = c - a
13: if( e < d ) goto 3
14: a = b * d
15: b = a – d

(a) What are the basic blocks for the code segment?

(b) Draw the control flow graph (CFG) for the code once you have determined the basic block.

1. 👍 0
2. 👎 0
3. 👁 127

## Similar Questions

1. ### statistics

A zip-code is a five-digit number identifying where in the U.S. an address is located. The first four digits in a zip code can be any number 0-9, but the fifth digit cannot be 0. In addition to this, each address has a

asked by Anonymous on May 8, 2016
2. ### compiler construction

Given the following 3-address code 1: a = 1 2: b = 2 3: c = a + b 4: d = c - a 5: if( d < 20 ) goto 11 6: d = b * d 7: if( d > 20 ) goto 11 8: d = a + b 9: e = e + 1 10: goto 6 11: b = a + b 12: e = c - a 13: if( e < d ) goto 3

asked by COOLMAN on January 23, 2007
3. ### Compiler Construction

Given the following 3-address code 1: a = 1 2: b = 2 3: c = a + b 4: d = c - a 5: if( d < 20 ) goto 11 6: d = b * d 7: if( d > 20 ) goto 11 8: d = a + b 9: e = e + 1 10: goto 6 11: b = a + b 12: e = c - a 13: if( e < d ) goto 3

asked by bineesh on January 25, 2007
4. ### Access Database - computers

I have to make a database to track university apartments in access. I am stuck trying to decide what type of tables and field names i should have. would it make sense to have a table for students including first, last names,

asked by DAVE on February 10, 2008
5. ### Ethics and the Administration of Justice

Please Help!!!· In previous weeks, you examined the professional code of ethics for a field in criminal justice and analyzed ethical dilemmas for several fields. How does your code of ethics compare to the professional code of

asked by Everett Douglas on January 13, 2013
6. ### ethics

Write a 1,750- to 2,450-word paper that formulates your personal code of ethics, using one of the major ethical frameworks as a guide. Include answers to the following questions: o In previous weeks, you examined the professional

asked by jessie on May 15, 2010
7. ### Computer Literary

Which of the following is Not an example of debugging A)Looking for errors in programming code B)Fixing misspelled commands in programming code C)Solving faulty logic in programming code D)Upgrading to improve the programming code

asked by Cowanna Agee on January 17, 2015
8. ### History

The Code Talkers were members of which Native American tribe? Apache Hopi Navajo******** Pueblo 2. Why was the Code Talkers' code so hard to break? It was based on a language that lacked an alphabet and was hard to learn. The

asked by Patty on September 10, 2015
9. ### Ed Tech

What does the code of conduct include? A. A secret code for internet users B. The conduct that should be used with a code C. A set of rules for behavior when using the internet D. A rule that tells you the code I think C Thanks!

asked by Dancer on April 7, 2017
10. ### Math,Science,Algebra,geography

The 3 Letter code that summaries your 3 strongest career types is called your? A.)Holland-Code B.)Myers-Briggs Type C.)Teamwork Profile D.)Beblin Code

asked by DJ on September 30, 2015

More Similar Questions