{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW2_S10 - shown in Problem 4 6 List all the initial data...

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

View Full Document Right Arrow Icon
CmpE 102 – HW#2 (due March 1) 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. 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 o o o ClearZeroFlag PROC pushf pop ax and ax, 0FFF7h push ax popf ret ClearZeroFlag ENDP 3. For the previous problem, determine the maximum number of bytes of stack space that are used after executing the procedure listed. Remember to include the CALL instruction as part of your determination, assuming the procedure is located outside the current code segment range. 4. Show how the following data array would get stored in data memory, beginning at 400h: array1 QWORD 1122334455667788h QWORD 99AABBCCDDEEFF00h 5. Write a statement that causes the assembler to calculate the array size for the array
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
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: shown in Problem 4. 6. List all the initial data values that are resident in data memory for the following data segment: .data val1 BYTE 5 DUP (5 * 10) val2 BYTE 3 DUP (?) val3 BYTE 2 DUP (‘ABC’) val4 WORD 3 DUP (0) 7. Declare a 32-bit signed integer data variable and initialize it with the largest possible positive value. 8. Use a TEXTEQU expression to redefine “PROC” as “PROCEDURE”. 9. Write a single instruction that moves data value obtained from evaluating an expression into the AX register. The expression operand shall conform to the following guidelines: a. Multiples 5 * 20 b. Divides result obtained in a. by 20 c. Adds 20 to result obtained in step b. d. Subtracts 3 from result obtained in step c. 10. Using the AddSub.asm routine listed in Section 3.2 of the text as reference, write a similar routine for 16-bit integers instead of 32-bit....
View Full Document

{[ snackBarMessage ]}