Posted: February 18th, 2023
CS 590: Topics in Computer Science Assignment 03: Basics of Assembly Programming
This assignment is about programming a microprocessor. For this we will use the SMS32V50 simulator. http://www.softwareforeducation.com/sms32v50/ You can run this natively in MS Windows. In the case of a Mac or Linux machine you can use the WinE (Windows Emulator) program. https://wiki.winehq.org/Download Other alternatives are running Windows or a light clone of Windows like ReactOS that is equivalent to Windows XP (Furthermore you can get a disk image for Windows XP SP3 here. The product key is now freely available: M6TF9-8XQ2M-YQK9F-7TBB2-XGG88 or this other key MRX3F-47B9T-2487J-KWKMF-RPWBY.) in a virtual machine like VirtualBox or VMWare, or using one of the Windows machines at one of our labs and running the SMS32V50 directly on any of them.
Exercises: a. Write a program that will make the traffic lights work properly, like in a real situation
where one of the traffic lights is in green while the other is in red and vice versa, passing through the yellow light in the process.
b. Write a program to make the stepper motor rotate two turns in one direction and half the turn in the other direction, continuously.
c. Write a program that will make the seven segment displays show a countdown from 9 to 0 alternating between the left and the right display.
d. Fix the program 99Heater.asm so that the temperature will stay at 21 ºC e. Also fix the program lift.asm to avoid crashes.
Name your programs using the following format: a. Lastname_Firstname_tlights.asm b. Lastname_Firstname_stepperMotor.asm c. Lastname_Firstname_7segmDisplays.asm d. Lastname_Firstname_99Heater.asm e. Lastname_Firstname_lift.asm
Use the online manual as a reference as well as the manual included in the download. http://www.softwareforeducation.com/sms32v50/sms32v50_manual/index.htm
Questions 1. Explain what an ISA (Instruction Set Architecture) is. 2. Why is assembly language not portable? 3. Why is assembly language so important?
SUBMISSION Write your report including screenshots of every one of your programs running and explaining how they work. Include comments in your code too and upload your source code files to
1/2
Western Online along with your report as a DOCX or PDF document through Western Online. Include in the report the answers to the questions writing the corresponding numbers and questions (or at least the numbers) in bold and in the proper order before every answer. At the end include a conclusion (properly labeled as that) explaining the importance of all this.
Use the following format to name your document file:
YourLastName-YourFirstName_CS590_Assignment_03.pdf (or docx extension)
After submission verify that the upload was successful and with the correct file(s).
Do not submit compressed files.
Write your report including screenshots of every one of your programs running and explaining how they work. Include comments in your code too and submit your source code file (.asm). Submit your report as a DOCX or PDF document through Western Online. Include in the report the answers to the questions writing the corresponding numbers and questions (or at least the numbers) in bold using a different text color and in the proper order before every answer (answers in black and not in bold); these same rules apply for the five exercises. Points will be deducted if you do not follow these guidelines. At the end include a conclusion (properly labeled as that) explaining the importance of all this. Use the following format to name your document file: CS590_HW_03_YourLastName-YourFirstName_.pdf (or docx extension)
After submission verify that the upload was successful and with the correct file(s).
Do not submit compressed files.
—–///
2/2
SOLUTION
However, I can give you an overview of how to approach the two exercises in assembly language:
a. To make traffic lights work properly, you can use a combination of looping and conditional branching statements. Here is a general outline of the program:
b. To rotate a stepper motor continuously, you will need to send specific signals to the motor’s control pins. The exact sequence of signals will depend on the type of motor you are using. Here is a general outline of the program:
Keep in mind that the specifics of the program will depend on the specific microprocessor and motor you are using. It is important to consult the documentation for both to ensure that you are using the correct commands and signals.
Place an order in 3 easy steps. Takes less than 5 mins.