Starting from:

$30

CS4380-Project 1 Virtual Machine Solved

Implement a Virtual Machine, which can execute the Test Program outlined below. 

 

Use the following outline for submitting all projects. 

Submit your project via canvas. 

 

Your project MUST be packaged in a zip file the name of this .zip is: 

                YourName_p1.zip 

                

Where YourName is your name p1 is the name of the project 

Note: Canvas will allow you to resubmit your project as many times as you want. Only the most current version will be kept my Canvas and graded by me. I highly encourage you to submit early and often. If you wait to the last moment and Canvas, the internet or your computer doesn't work then THIS IS A MISTAKE on your part. 

 

Your project must include: 

 

1.      Source Code for your project. 

 

2.      Notes put directly in Canvas that tells me how to execute your program and other facts you want me to know. Only needed if your project doesn't work as I would expect ( vm,exe proj1.asm ).  If you know you have a bug tell me.  I think it is better to know you have a bug than it is to look like I found a bug you have no knowledge of. 

 

3.      proj1.asm this is your assembly file. This is what I grade. This file must be accepted as a command line argument. I may rename the file just to check that your  code really works. Don't misname your project 

 

4.      vm.exe this is your compiled executable. You must send an executable if your language doesn’t support this then YOU Must build me a script to execute your program (vm.bat). Read if you don't understand what this means.  

 

               o    Your executable must accept a command-line argument of the assembly file that it uses. 

§  vm.exe proj1.asm                       Don't misname your project 

§  vm.bat proj1.asm                       Don't misname your project 

 As long as you leave me explicit instruction on how to run your scripting language in Canvas I will accept it but you really should learn to use the vm.bat file 

 

o   Be very careful using Visual Studio to make your program every year students send me executes that will not execute on Windows because they are compiled incorrectly. Always execute your program outside of the development environment before sending it to me (or anyone else). 

o   Your program must not hang after running. I will execute it at command-line and will expect it to finish when the program is done. 

 

 

 

Test Program 
Write the following assembly program using your assembly language. 

Place the following list of integers in memory  

A  = (1, 2, 3, 4, 5, 6) 

B  = (300, 150, 50, 20, 10, 5) C = (500, 2, 5, 10) 

Place your full name “Last Name, First Name” in contiguous memory. 

 

Program Output (follow the output formatting exactly. I’m very picky on this assignment not so much on the others.) 
1)      Print your name “Last Name, First Name” on the screen. You don’t need the quotes but you do need the comma.   

2)      Print a blank line. 

3)      Add all the elements of list B together; print each result (intermediate and final) on screen.  Put 2 spaces between each result. ß pay attention to this (e.g., 450) ß pay attention to this 

4)      Print a blank line. ß pay attention to this 

5)      Multiply all the elements of list A together; print each result (intermediate and final) on screen. Put 

2 spaces between each result. (e.g., 2) ß pay attention to this 6) Print a blank line. 

7) Divide the final result from part 3, by each element in list B (the results are not cumulative). Put 

2 spaces between each result. (e.g., 1) 8) Print a blank line. 

9) Subtract from the final result of part 5 each element of list C (the results are not cumulative). Put 

2 spaces between each result. (e.g., 220) 

 

Create a directive for each element of the list and letter of your name.  

Example. 

A1          .INT       1 

A2          .INT       2 

A3          .INT       3 

C .BYT     'C' u .BYT 'u' r .BYT 'r' 

 

More products