Question: Java - Compiler and exe FIRST PASS HINT Second PAss Hint (30 marks) P5: The Compiler Focus: Data structures, exception handling, stepwise refinement, putting-it-all together

 Java - Compiler and exe FIRST PASS HINT Second PAss Hint(30 marks) P5: The Compiler Focus: Data structures, exception handling, stepwise refinement,putting-it-all together The last part of this big project is the creation

of the compiler for our simulated computer Among other aspect, you will

Java - Compiler and exe

FIRST PASS HINT

work on the use of Java Lists. The TestComputer class would nowbe as follows Computer compnew Computer//1 comp.compile ("program.asm") comp.run ("program.ex"); In the

Second PAss Hint

above program, the computer will compile the file provided as parameter (i.e.

program. asm) in statement #2. The result is an executable file that

should be saved in the same folder with the same name and

(30 marks) P5: The Compiler Focus: Data structures, exception handling, stepwise refinement, putting-it-all together The last part of this big project is the creation of the compiler for our simulated computer Among other aspect, you will work on the use of Java Lists. The TestComputer class would now be as follows Computer compnew Computer//1 comp.compile ("program.asm") comp.run ("program.ex"); In the above program, the computer will compile the file provided as parameter (i.e. program. asm) in statement #2. The result is an executable file that should be saved in the same folder with the same name and the extension .ex instead of.asm. That is, the output of statement 2 above is an executable file called program.ex saved in the same folder as program.asm. The above program will then execute the compiled file (ie, program. ex) using the run method as shown in statement #3 OVERVIEW OF OUR ASSEMBLY LANGUAGE: To compile means translating from one language to another language. For us, it will mean translating from assembly language to machine language. Our assembly language is composed of three components: the instructions, two directives, and labels. (1) The instructions: The following table shows the relationship between the assembly language keywords and the Operation Code used in our machine language Assembly language keywords STOP LD STO ADD SUB MPY Operation Code Assembly language Operation 01 02 03 0 4 05 keywords DIV IN OUT Code 06 07 08 09 10 BGTR BZ (30 marks) P5: The Compiler Focus: Data structures, exception handling, stepwise refinement, putting-it-all together The last part of this big project is the creation of the compiler for our simulated computer Among other aspect, you will work on the use of Java Lists. The TestComputer class would now be as follows Computer compnew Computer//1 comp.compile ("program.asm") comp.run ("program.ex"); In the above program, the computer will compile the file provided as parameter (i.e. program. asm) in statement #2. The result is an executable file that should be saved in the same folder with the same name and the extension .ex instead of.asm. That is, the output of statement 2 above is an executable file called program.ex saved in the same folder as program.asm. The above program will then execute the compiled file (ie, program. ex) using the run method as shown in statement #3 OVERVIEW OF OUR ASSEMBLY LANGUAGE: To compile means translating from one language to another language. For us, it will mean translating from assembly language to machine language. Our assembly language is composed of three components: the instructions, two directives, and labels. (1) The instructions: The following table shows the relationship between the assembly language keywords and the Operation Code used in our machine language Assembly language keywords STOP LD STO ADD SUB MPY Operation Code Assembly language Operation 01 02 03 0 4 05 keywords DIV IN OUT Code 06 07 08 09 10 BGTR BZ

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!