HW2_S10 Solutions

HW2_S10 Solutions - CmpE 102 HW#2 SOLUTIONS Chapter 3...

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

View Full Document Right Arrow Icon
CmpE 102 – HW#2 SOLUTIONS Chapter 3 Problems 1. Suppose the character string ‘Data value for Port 10h is:’ is part of the firmware that gets stored in code memory, beginning at 08950h. Show the data storage in memory for this string. 08950 08951 08952 08953 08954 08955 08956 08957 44 61 74 61 20 76 61 6C 08958 08959 0895A 0895B 0895C 0895D 0895E 0895F 75 65 20 66 6F 72 20 50 08960 08961 08962 08963 08964 08965 08966 08967 6F 72 74 20 31 30 68 20 08968 08969 0896A 69 73 3A 2. Write comments next to each line of code of the following firmware call and subroutine that is used to clear the zero bit in the flag register (16-bits): .code o o o call ClearZeroFlag ;call routine to zero flag bit o o o ClearZeroFlag PROC pushf ; save flag bits pop ax ; get flag bits from stack and ax, 0FFF7h ; clear zero flag push ax ; put flag bits back on stack popf ; return modified flag bits to status register ret ; return to calling routine ClearZeroFlag ENDP 3. For the previous problem, determine the maximum number of bytes of stack
Background image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

HW2_S10 Solutions - CmpE 102 HW#2 SOLUTIONS Chapter 3...

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