Module #2 Study Deck Flashcards

1
Q

How many bytes long is a DWORD (doubleword) on x86 systems?

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Operands may be any of the following: (select all that apply)
* non-register reserved word
* variable name (memory)
* constant or constant expression
* register name

A
  • variable name (memory)
  • constant or constant expression
  • register name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

MASM is case-sensitive
True / False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A procedure is declared using the _____ and ____ directives.
* START and END
* BEGIN and END
* PROCEDURE and END
* PROC and ENDP

A
  • PROC and ENDP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following BYTE declarations are allowed in MASM? (Check all that apply)

  • myByte4 BYTE “nested ‘quotes’ “
  • myByte3 BYTE ‘simple ‘quotes’ ‘
  • myByte5 BYTE ‘W’,’o’,’r’,’s’,’t’,’!’,0
  • myByte1 BYTE “Hot “, ‘Dog’, 33, 0
  • myByte2 BYTE ‘Fancy’
A
  • myByte4 BYTE “nested ‘quotes’ “
  • myByte5 BYTE ‘W’,’o’,’r’,’s’,’t’,’!’,0
  • myByte1 BYTE “Hot “, ‘Dog’, 33, 0
  • myByte2 BYTE ‘Fancy’
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Code labels may only appear on lines with no instructions.
True / False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

By default, code labels are visible only within the procedure in which they are assigned (created).
True / False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following are valid uses of the XCHG instruction? (check any/all that apply)

  • XCHG reg,reg
  • XCHG imm,reg
  • XCHG reg,imm
  • XCHG reg,mem
  • XCHG mem,mem
  • XCHG mem,reg
  • XCHG imm,imm
  • XCHG imm,reg
A
  • XCHG reg, reg
  • XCHG reg, mem
  • XCHG mem,reg
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

After the following MASM code is executed:

MOV EAX, 93
MOV EBX, 13
MOV EDX, 0
DIV EBX

What is the value in the EAX register (in decimal)?

What is the value in the EBX register (in decimal)?

What is the value in the EDX register (in decimal)?

A

What is the value in the EAX register (in decimal)? 7
What is the value in the EBX register (in decimal)? 13
What is the value in the EDX register (in decimal)? 12

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which directive is used when defining 64-bit IEEE long reals?
REAL64
REAL
REAL8
REAL4

A

REAL8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The following is a valid data definition statement:

str1 \
BYTE “This string is quite long!”, 0

True / False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

MASM will throw an error when assembling the following data segment:

.data
myChecker BYTE 12h
BYTE 34h
BYTE 56h
BYTE 78h
BYTE 90h

True / False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The following data segment starts at memory address 1000h (hexadecimal)

.data
printString   BYTE    "Assembly is fun",0
moreBytes     BYTE    10 DUP(0)
dateIssued    DWORD   ?
dueDate       DWORD   ?
elapsedTime   WORD    ?

What is the hexadecimal address of dueDate?

1010h
101Eh
101Ah
1030h

A

101Eh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The following data segment starts at memory address 2200h (hexadecimal)
~~~
.data
printString BYTE “MASM is fun”,0
moreBytes BYTE 25 DUP(0)
dateIssued DWORD ?
dueDate DWORD ?
elapsedTime WORD ?
~~~
What is the hexadecimal address of dueDate?
2225h
2241h
2229h
220Ch

A

2229h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which library procedure sets the Zero flag if the AL register contains the ASCII code for a decimal digit (0–9)?

A

IsDigit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which library procedure generates a 32-bit pseudorandom integer in a caller-specified range?

A

RandomRange

17
Q

Which register contains the starting address of data when calling DumpMem?
ECX
EDX
EBX
EAX
ESI
EDI

A

ESI

18
Q

Which library procedure returns the number of milliseconds elapsed since midnight?

A

GetMseconds