Quiz3_s10_Solutions

Quiz3_s10_Solutions - push LENGTHOF array push OFFSET array...

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

View Full Document Right Arrow Icon
CmpE 102 Quiz #3 – Spring 2010 (Closed Book) – SOLUTIONS Rev. A 1. In the class to date, registers were used to pass timing information to a delay procedure, as shown in the following code: o o mov cx, Time1 mov dx, Time2 call Delay o o a. Instead of registers, write calling code that uses the stack to pass the timing information. o o push Time1 push Time2 call Delay o o b. Next show the stack contents and Delay procedure code associated with setting up the stack frame. Stack Time 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Time2 Return Address EBP Delay PROC push ebp mov ebp, esp o o 2. Replace the following code with the INVOKE directive: o o push TYPE array
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: push LENGTHOF array push OFFSET array call DumpMem o o (rev A) INVOKE DumpMem, OFFSET array, LENGTHOF array, TYPE array (Note that the arguments are in reverse order.) 3. In code development, (1) what is the use of Port 80h and (2) how is it implemented? (1) Debugging code (2) PCI Port 80h card and use of the following two instructions at entry to every code module: mov al, (number) out 80h, al 4. What is the value of the al register after the following code is executed: mov al, 11110000b ; and CF = 0 rol al, 4 AL = 00001111b ; swaps nibbles...
View Full Document

Page1 / 3

Quiz3_s10_Solutions - push LENGTHOF array push OFFSET array...

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

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