subject

You are a Pascal teacher (a very good programmer using assembly language (i. e., machine language) of your local machine). You are given only the following programmes:

(a) A compiler written in P-code: translate a program in Pascal to one in P-code (P-code is very close to your local machine language).

b) A P-code interpreter written in Pascal: able to interpret any program written in P-code.

Questions

a) What will you do (with minimal effort) to run the Pascal programs your students submit on your local machine?

b) If you are given a compiler written in Pascal which translate a program in Pascal to a program in P-code, how can you produce a compiler in machine language that compiles a program in Pascal to a program in machine language?

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:20, Hcalhoun21
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display “enter a value to be cubed.” input value; set cube = value ^ 3 display value, “ cubed is “, cube end while
Answers: 2
image
Computers and Technology, 22.06.2019 09:00, 19elbatawisaly
What is one way in which tablets differ from laptops and notebooks? tablets are designed for touch-based interaction. tablets are designed to be used as desktops. tablets are designed for input via a keyboard and mouse. tablets are designed to be larger than laptops.
Answers: 1
image
Computers and Technology, 23.06.2019 06:40, euniceyi56
How many nibbles can be stored in a 16-bit word?
Answers: 1
image
Computers and Technology, 24.06.2019 14:30, danielweldon1234
When workers demonstrate patience, are able to manage there emotions, and get along with other employees, which skills are being displayed?
Answers: 1
You know the right answer?
You are a Pascal teacher (a very good programmer using assembly language (i. e., machine language) o...

Questions in other subjects:

Konu
Biology, 12.12.2019 12:31