(1) Read through the assignment questions before listening to the lectures.
(3) Simply writing down a solution to a particular problem is not enough to obtain full points. You must show how you arrived at the solution by showing the step-by step procedure that you performed. This procedure can be handwritten or typed – the choice is yours. However, make sure to answer each question in the provided spaces.
(4) Review your answers a few days after completing the assignment. Taking a few minutes to do this can dramatically improve your understanding of key concepts and increase your retention.
Submission: Submission of this assessment is a two-step process that involves (1) uploading your written work as a single PDF to the Dropbox on CourseLink, and (2) entering only the final answers to the assignment questions under the Quiz Section on CourseLink. Only assignments that complete both steps will be marked. The overall submission procedure is outline below.
(2) While in CourseLink, now click on the Quizzes tab on the navigation bar. On the Quiz List page, you will see a quiz called Assignment 3. Click Start Quiz. Then, answer each question using the final answers that you have already determined. As you complete each question, the answer will be automatically saved. You can see which questions have saved answers in the Questions section of the quiz’s left panel. You can also click the question number in the quiz’s left panel to go back to the question. Click Go to Submit Quiz after you answer all quiz questions.
Best of success!
1. Name the computer programming language that (symbolically) represents the binary instructions of the processor. Write your answer below. [1 point]
2. In an assembler, instruction addresses are counted by the [1 point]
a. Program counter
b. Location counter
c. Line number
d. None of the above
3. The assembler directive DS.W $10 [1 point]
a. Reserves 10 words in memory
b. Defines a constant to be $10
c. Reserves 16 words in memory
d. one of the above
4. In the space below, write a single 68000 assembler directive to initialize five consecutive longwords in memory. The longword values are 1,2,3,4, and 5, and should be specified (i.e., written) in binary. Label the first longword start. [2 points]
5. Write a single 68000 assembler directive to reserve memory for 100 words. [1 point]
Use the following information for questions 6-8:
Assume that EQU directives have been used to assign the label start the value $0C04 and the label last $1000. Determine the value 16-bit hexadecimal value computed by the assembler for the following expressions:
6. start-6 [1 point]
7. last – start [1 point]
8. (last – start)/2 [1 point]
9. Consider the two lines of code below. The last line seeks to use an assemble-time expression to compute the number of words in the buffer. The expression is wrong. Show the correct assemble-time expression in the space below. [1 point]
BUFFER DS.L 30
LENGTH DC.B (*-BUFFER)
10. Write a single 68000 instruction to load the number of long words between the location given by label start (first location) and the label last (first location past the data) into the least-significant byte in data register D0. Hint: use an assemble-time expression for the source operand. [2 points]
11. Are the two following fragments of code equivalent? Explain. [2 points]
ORG HERE ORG HERE
MOVE.B #100,D0 MOVE.B D0,Data Data DC.B 100
13. Draw a memory map to illustrate the following code. Make sure to show all addresses and the contents of memory locations in hexadecimal, as well as the location of the labels. [3 points]
ORG $1000
BUF DS.B 3
VAR1 DC.W 12
VAR2 DC.L *
DC.B ‘AB’
Use the following information for questions 14-16:
Hand compile the following C global variable declarations using 68000 assembler directives. Assume that INTs are 32-bits, SHORTs are 16-bits, and CHARS are 8-bits.
14. char a[] = “Zoom”; [1 point]
15. short b; [1 point]
16. int c = 0x123456; [1 point]



