I have to use the Easy 68k software for this assignment. Also, it needs to show every step for Q1 and Q2.

I have to use the Easy 68k software for this assignment. Also, it needs to show every step for Q1 and Q2.


Homework Problem Set #3 Please don't zip your files, just submit them one by one. No Zip! Q1. Convert the following 68K assembly language instructions to the machine codes. (2 points) You have to show your work, otherwise you will get zero.   1) MOVE.W        D1,  $0000A000 2) MOVE.B        $42A7, (A1)+ 3) ADD.L            D7, D0 4) MOVEA.L       D3, A0   Q2. For each of the operations below, evaluate the value in D0 and the state of the CCR after completing the operation. XNZVC=00000 and D0=$C1A8E392 at the beginning of each operation. (4 points) 1. ASL.B #2, D0 2. ASL.L #5, D0 3. LSR.B #4, D0 4. ROR.W #2, D0    Q3. Pattern Finding and Cumulative program. (5 points) Write a program in 68K assembly code that satisfies the following specifications: 1. Your program should start at the memory location $1000 (hint: use the ORG directive). 2. Take a one byte hexadecimal value from user input and save the value at address $A000 (hint: you can consider this input a target value). You should not hardcode the inputs. You may ignore sanity check on corner cases, but assume user inputs are always in an expected format. 3. Read each byte data stored in memory between the addresses $6000 and $8000 and compare it to the (byte) data at address $A000 (hint: you can consider the memory between $6000 and $8000 an array). 4. Please define a LONGWORD variable called address Addr1. In the specified memory range, if the data at address $A000 is found, the longword address of the data in memory is saved into variable Addr1. If it fails to find the data within the specified memory range ($6000 and $8000), then put Addr1 = $6000, which is similar to the idea of "error code" or "invalid index" in your C++ code. 5. Please define a WORD variable called address Addsum. Add a series of bytes stored in the 512 consecutive memory locations beginning at address Addr1, no matter you find the target data or not. Save the sum value into Addsum. 6. There is a chance that the sum might exceed $FFFF, (exceeding the range of word value), so you will also need to store the carry bit if an overflow occurs. Store the carry bit as a BYTE variable called CarryBit. 7. Print the Addr1, Addsum and CarryBit in the output window. 8. Submit the followings: · Copy and paste your source code in your submission file! · Additionally, please submit the source file (.X68) (If no source file, then you got zero point for this question)! · Test your program and report the result with your user input. Capture the images of output window and memory view to support your results, copy and paste the images into your submission file.   Q4. Decode a floating-point number. (5 points) Write a program in 68K assembly code to decipher IEEE 32-bit floating point hexadecimal representation to sign bit, exponent bits, and mantissa bits. Write the program that satisfies the following specifications: 1. Your program should start at the memory location $4000. 2. The program should print the instruction in the output window to get a user input: "Please enter IEEE 32-bit floating point number in hexadecimal": 3. User Input should be in IEEE 32-bit floating point number Hexadecimal format. You should not hardcode the inputs. You may ignore sanity check on corner cases, but assume user inputs are always in an expected format. 4. After getting the user input, save the input number into a variable that you define, but not into a register. 5. Print out the following information to the output window: Sign bit: ("+" or "-"), Exponent: (in decimal) and Mantissa: (in decimal). For example, if the user input is C0680000, then the output window shows: Sign bit: -  Exponent:128 Mantissa: 13   6. Submit the followings · Copy and paste your source code in your submission file! · Additionally, please submit the source file (.X68) (If no source file, then you got zero point for this question)! · Test your program and report the result with your user input. Capture the images of output window and memory view to support your results, copy and paste the images into your submission file.
May 23, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here