Download presentation
Presentation is loading. Please wait.
Published byJonas Parsons Modified over 8 years ago
1
Chapter 8 Exercises
2
Question 1 Prototype for the ArraySum procedure, showing its parameter list: ArraySum PROTO, ptrArray:PTR DWORD, szArray:DWORD Describe in words about the parameters and their data types.
3
Question 2 A procedure accepts two parameters: an address of an array and a signed integer. Assume that the data type of the elements of the array is DWORD. Write the prototype of the procedure in an assembly code. Use PROTO.
4
Question 3 What does the following procedure fragment do? CopyString PROC, count:DWORD LOCAL temp[20]:BYTE mov edi,OFFSET count; invalid operand mov esi,OFFSET temp; invalid operand
5
Question 3 What does the following procedure fragment do? CopyString PROC, count:DWORD LOCAL temp[20]:BYTE mov edi,OFFSET count; invalid operand mov esi,OFFSET temp; invalid operand lea edi,count; ok lea esi,temp; ok
6
Question 4 CopyString PROC, count:DWORD LOCAL temp[20]:BYTE Give one example to call the procedure CopyString.
7
Question 5 PromptForIntegers PROTO, ptrPrompt:PTR BYTE, ptrArray:PTR DWORD, arraySize:DWORD Give one example to call the procedure PromptForIntegers. Use INVOKE.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.