Assembly Language for x86 Processors --- 3.4 课后习题答案

3.4 Defining Data

1 Create an uninitialized data declaration for an 8-bit signed integer.

答 :value SBYTE ?

2 Declare an uninitialized array of 50 unsigned doublewords named dArray.

答 :dArray DWORD 50 DUP(?)

3 Show the order of individual bytes in memory (lowest to highest) for the following doubleword variable:
val1 DWORD 87654321h

答 :21h, 43h, 65h, 87h

4 Declare a string variable containing the word “TEST” repeated 500 times.

答 :value BYTE 500 DUP(“TEST”)

5 Create an uninitialized data declaration for a 64-bit integer.

答 :value QWORD ?

6 Create an uninitialized data declaration for an 8-bit unsigned integer.

答 :value BYTE ?

7 Create an uninitialized data declaration for a 16-bit signed integer.

答 :value SWORD ?

8 Which data type can hold a 32-bit signed integer?

答 :SDWORD.

9 Declare a string variable containing the name of your favorite color. Initialize it as a nullterminated string.

答 :myColor BYTE “black”, 0

10 Declare an array of 20 unsigned bytes named bArray and initialize all elements to zero.

答 :bArray BYTE 20 DUP(0)

11 Declare an unsigned 16-bit integer variable named wArray that uses three initializers.

答 :wArray WORD 1,2,3

猜你喜欢

转载自blog.csdn.net/weixin_43574277/article/details/106132885