{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

FA04-exam1

# FA04-exam1 - UNIVERSITY OF CALIFORNIA-DAVIS DEPARTMENT OF...

This preview shows pages 1–4. Sign up to view the full content.

UC Davis 1 Hussain Al-Asaad U NIVERSITY OF C ALIFORNIA —D AVIS D EPARTMENT OF E LECTRICAL & C OMPUTER E NGINEERING EEC70—C OMPUTER S TRUCTURE & A SSEMBLY L ANGUAGE —F ALL 2004 E XAM I Student Information Instructions The exam is open book and notes. Print your name and your ID number. There are four problems in the exam. Solve all of them and show your work. If you need more space for your solutions, use the back of the sheets. Exam Grade Name ID Number Problem Maximum Points Student Score 1 25 2 30 3 40 4 5 Total 100

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
UC Davis 2 Hussain Al-Asaad 1. S IMPLE P ROGRAM (25 POINTS ) By using less than 10 instructions, complete the simple assembly language program below to compute the sum: . The resulting sum S should be placed in the eax register. TITLE Sum of integers (sum.asm) ; This program adds 1+2+3+...+98+99 ; and puts the sum in eax INCLUDE Irvine32.inc .code main PROC main ENDP END main S 1 2 3 98 99 + + + + + =
UC Davis 3 Hussain Al-Asaad 2. P ROGRAM A NALYSIS (30 POINTS ) Analyze the program below and describe its overall operation in few english statements.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

FA04-exam1 - UNIVERSITY OF CALIFORNIA-DAVIS DEPARTMENT OF...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online