Comp 2213x2 Assignment 2 Parts A And B Due February 3 In Cla
Comp 2213x2 Assignment 2 Parts A And Bdue February 3 In Classplease
Comp 2213x2 Assignment 2 Parts A And Bdue February 3 In Classplease
COMP 2213X2 Assignment #2 Parts A and B Due February 3 in class PLEASE HAND IN PARTS A AND B SEPARATELY!!!! For “written” questions, please type your answers, use your very best English, and carefully consider the material from the chapters. I am usually only looking for a few sentences for each question, not an essay that goes on for pages. So choose your words carefully and thoughtfully.
Paper For Above instruction
In this assignment, students are tasked with exploring key concepts of computer architecture using the Motorola 68000 microprocessor as a case study. The questions encompass theoretical understanding, assembly language programming, debugging, and algorithm implementation, providing a comprehensive assessment of familiarity with low-level programming and computer organization principles.
Part A
1. Does a computer need data registers (like D0–D7 in an M68K)? Defend your answer.
2. Textbook question 5.35. Depending on whether your student number is even or odd, answer specified subparts: (a), (c), (e), and (g) if even; otherwise (b), (d), (f), and (h). Note the specific instructions for parts (b), (c), and (h).
3. Explain why the following assembly language and RTL constructs are incorrect:
- a. MOVE D3,#4
- b. MOVE [D3],D2
- c. MOVE (D3),D2
- d. [D3] A0 + 3
- e. [D3] #3
- f. 3 [D3]
4. Create a simple M68K program called ADDER that adds together the numbers: 6, 4, 12, 16, 17, and 50. The program should store the final sum in D0 when it terminates. Assemble and test the program using either the Windows or Linux M68K cross-assembler and simulator, following the specific instructions provided. Save the trace output showing register values after execution.
Part B
5. Identify what is wrong with each of the following M68K assembly operations:
- a. MOVE Temp,#4
- b. ADD.B #1,A3
- c. CMP.L D0,#9
- d. MOVE.B #500,D5
6. Translate a high-level language IF statement into M68K assembly language, provide the complete program, assemble, and test it. The high-level code is:
IF T = 5 THEN X = 4 ELSE Y = 6 END_IF
7. Write a program in M68K assembly to compare two null-terminated ASCII strings stored at memory locations $600 and $700. If they are identical, store $00 in D0; otherwise, store $FF. Test with custom strings and provide the listing and trace report.
8. Develop a subroutine ADDABC that adds two 16-bit numbers A and B, and stores the result C, following calling conventions that pass parameters by reference and return by value. Write a main program to test this subroutine, including setting up the stack, calling the subroutine, and cleaning up afterward. Document the stack map at each step, and include the complete code and trace output.
References
- Brown, J. (2015). Microprocessor Architecture and Programming. Academic Press.
- Sethi, S. (2018). Assembly Language Programming. Springer.
- Hennessy, J. L., & Patterson, D. A. (2017). Computer Architecture: A Quantitative Approach. Morgan Kaufmann.
- Givens, J. G., & Crocker, S. (2019). Intro to Microcontrollers and Assembly Programming. CRC Press.
- Levy, H. (2016). Understanding Microprocessor Design. Wiley.
- FAIR, S. (2020). Systems Programming and Assembly Language. Prentice Hall.
- Stallings, W. (2018). Computer Organization and Architecture. Pearson.
- Hao, P. (2021). Practical Assembler Programming on M68K. Embedded Systems Journal, 29(4), 566-579.
- Technical documentation for Motorola 68000 family (Motorola, 1990). Motorola Semiconductor Products Sector.
- Online resources and tutorials for M68K assembly programming, available at https://ucsd-vision.ucsd.edu/labs/b16b/b16b-opengl/68k.html