Module #2 Study Deck Flashcards
How many bytes long is a DWORD (doubleword) on x86 systems?
4
Operands may be any of the following: (select all that apply)
* non-register reserved word
* variable name (memory)
* constant or constant expression
* register name
- variable name (memory)
- constant or constant expression
- register name
MASM is case-sensitive
True / False
False
A procedure is declared using the _____ and ____ directives.
* START and END
* BEGIN and END
* PROCEDURE and END
* PROC and ENDP
- PROC and ENDP
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’
- myByte4 BYTE “nested ‘quotes’ “
- myByte5 BYTE ‘W’,’o’,’r’,’s’,’t’,’!’,0
- myByte1 BYTE “Hot “, ‘Dog’, 33, 0
- myByte2 BYTE ‘Fancy’
Code labels may only appear on lines with no instructions.
True / False
False
By default, code labels are visible only within the procedure in which they are assigned (created).
True / False
True
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
- XCHG reg, reg
- XCHG reg, mem
- XCHG mem,reg
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)?
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
Which directive is used when defining 64-bit IEEE long reals?
REAL64
REAL
REAL8
REAL4
REAL8
The following is a valid data definition statement:
str1 \
BYTE “This string is quite long!”, 0
True / False
True
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
False
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
101Eh
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
2229h
Which library procedure sets the Zero flag if the AL register contains the ASCII code for a decimal digit (0–9)?
IsDigit