Quiz2_s10 Solutions

Quiz2_s10 Solutions - o sp = 0600h push eax sp = 05FCh eax...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CmpE 102 Quiz #2 – Spring 2010 (Closed Book) - SOLUTIONS 1. List two ways that data parameters are passed between software modules. - Registers - Memory - Stack - 2. .data dArray DWORD 100, 200, 300, 400, 500, 600 .code Write the instructions to access dArray element 3 and place its value in the EAX register. mov ebx, OFFSET dArray mov eax, [ebx+8] - or – mov eax, [dArray+8] - or – mov esi, 0 mov eax, dArray[esi+8] 3. Show the contents of the stack and the location of the stack pointer after the following code is executed: o o SP STACK DATA
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o sp = 0600h ? push eax sp = 05FCh eax data push ebx sp = 05F8h ebx data push cx sp = 05F6h cx data push dx sp = 05F4h dx data nop sp = 05F4h-----------call 10ms_delay ; 5-byte instruction starting at C00F80FAh sp = 05F0h C00F80FFh (Starting register values: ss = 0000h, sp = 0600h) 4. Write the instructions to input the data from Port 0FFFCh, a 32-bit port in the I/O map. mov dx, 0FFFCh in eax, dx 5. What is the minimum port resolution required for the port in Problem 4? 4 bytes...
View Full Document

This note was uploaded on 09/08/2010 for the course CMPE 46 at San Jose State.

Page1 / 2

Quiz2_s10 Solutions - o sp = 0600h push eax sp = 05FCh eax...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online