FA04-exam1-sol

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

This preview shows pages 1–3. 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 — S OLUTION 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 12 5 2 5 23 0 3 0 34 0 4 0 455 Total 100 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 mov ecx, 99 mov eax, 0 loop1: add eax, ecx loop loop1 exit main ENDP END main 2. P ROGRAM A NALYSIS (30 POINTS ) Analyze the program below and describe its overall operation in few english statements.
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/13/2012 for the course EEC 70 taught by Professor Wilken during the Fall '05 term at UC Davis.

### Page1 / 4

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

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

View Full Document
Ask a homework question - tutors are online