
Input
This
M - a month between 1 and 12 (in register 1)
D - a day between 1 and 31 (in register 2)
Y - a four-digit year value between 1980 and 2127 inclusive (in register 3)
Processing:
You must start by validating that these values are all within the appropriate ranges (1-12, 1-31, 1980-2127). If not, place a value of minus one in register 0 and end the program.
Then use shift and bitwise instructions to create a Microsoft DOS FAT file system date. This has the format:
Year in bits 15..09
Month in bits 08..05
Day in bits 04..00
This is a 16-bit number. The upper bits (31..16) should be set to zero.
Output:
Output shall be placed in register zero. If any of the parameters are invalid, place a value of minus one in register 0.
Grading:
Correct output values for selected test data: 20 points
Clean assembly, no error messages: 5 points
Validation of input and rejection of incorrect values: 10 points
Correct program heading, naming, et cetera: 5 points
Sample Output:
For input of R1 = 12, R2 = 4, R3 = 2023, the output in register zero should be hexadecimal 0x568C.
Here is how that answer was developed:
Year: 2023 - 1980 = 43 43 - seven bits: 0101011 Month: 4 - four bits: 0100 Day: 12 - five bits: 01100 Putting it all together: 0101011 0100 01100 0101011010001100 0101 0110 1000 1100 5 6 8 C
For input of R1 = 1, R2 = 1, R3 = 1980, the output in register zero should be hexadecimal 0x0021.
For input of R1 = 13, R2 = 13, R3 = 2013, the output in register zero should be minus one.
2023 - 1980 = 43 = 29 = 0b0101001; 4 = 0b0100; 12 = 0b01100; 0b0101001010001100; 0101 0010 1000 1100 = 0x528C
1980 - 1980 = 0 = 0b0000000; 1 = 0b0001; 1 = 0b00001; 0000000000100001 = 0000 0000 0010 0001 = 0x0021

Trending nowThis is a popular solution!
Step by stepSolved in 3 steps

- Please the code must be in c program Complete the two functions rotate_right and sudoku_checker according to the specifications given in the associated comments. NOTES: the given starter code includes a display function and a function which reads a board from a file. As given, the main program attempts to read a 9x9 board from an input file given on the command line"arrow_forwardCustomized step counter Learning Objectives In this lab, you will Create a function to match the specifications Use floating-point value division Instructions A pedometer treats walking 2,000 steps as walking 1 mile. It assumes that one step is a bit over 18 inches (1 mile = 36630 inches, so the pedometers assume that one step should be 18.315 inches). Let's customize this calculation to account for the size of our stride. Write a program whose input is the number of steps and the length of the step in inches, and whose output is the miles walked. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print(f'{your_value:.2f}') Ex: If the input is: 5345 18.315 the output is: You walked 5345 steps which are about 2.67 miles. Your program must define and call the following function. The function should return the number of miles walked.def steps_to_miles(user_steps, step_length) # Define your function here if __name__…arrow_forwardPrograminf language is Carrow_forward
- Need a different function in python that reads the data file and round the code below (see attached image) def calculateTotal(Name, Item, Price, Quantity): total = round(Price * Quantity,2) return totalarrow_forwardSelect the statements that describe a multimodule program. each ASM file (module) is assembled into a separate OBJ file is a program whose source code has been divided up into separate ASM files are dynamically linked at runtimearrow_forwardengineering matlab, please solve the questionarrow_forward
- write a program that operates like a cashier terminal in a grocery store it begins by prompting for the number of different items being purchased and then starts a loop in the loop the program should prompt for the item description price and quantity of each item being purchased these three values should be passed as arguments to a custom function that is to find in a separate module file the imported function should print the subtotal for the item and return it to main the total should be printed in Main after the loop endsarrow_forwardrecording or a file upload Using an Arduino UNO or Arduino Nano, a breadboard, a 7-Segment Display, and the 4x4 keypad write a C program in Microchip Studio that will do the following: . When a number is pressed on the keypad, display the corresponding number in the 7-Segment Display. Blink the Decimal Point (DP) a specific number of times when each button of the letters are pressed. For "A" blink 10 times, for "B" blink 11 times, for "C" blink 12 times, for "D" blink 13 times, for "*" blink once long (1000ms), for "#" blink twice long (1000ms) Use 4 10 pins on a single port for the column control • Use 4 10 pins on a single port for the row control . Do not use PORTDO or PORTD1 What to submit: • A short video showing the functionality. • Your C code as a "c" or "txt" file.arrow_forward#include <iostream> using namespace std; int main() { // Write your main here return 0; }arrow_forward
- Python 3 NO IMPORT PICKLE Please check the picture and add one more function(def) to display menu and fix the error in the code. Write a program that keeps names and email addresses in a dictionary as key-value pairs. You Must create and use at least 5 meaningful functions. A function to display a menu A function to look up a person’s email address A function to add a new name and email address A function to change an email address A function to delete a name and email address. This is the Required Output example: Menu ---------------------------------------- 1. Look up an email address 2. Add a new name and email address 3. Change an existing email address 4. Delete a name and email address 5. Quit the program Enter your choice: 2 Enter name: John Enter email address: John@yahoo.com That name already exists Menu ---------------------------------------- 1. Look up an email address 2. Add a new name and email address 3. Change an existing email address 4. Delete a name and…arrow_forwardPLEASE I WANT SOLUTION TO THIS IN C LANGUAGEarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





