FREE! Click here to Join FunTrivia. Thousands of games, quizzes, and lots more!
Quiz about Assembly Language for the x86 Processor
Quiz about Assembly Language for the x86 Processor

Assembly Language for the x86 Processor Quiz


Assembly Language is a non portable programming language consisting of instruction mnemonics used to form programming statements. This quiz is based on the Intel 80x86 family.

A multiple-choice quiz by ebanks120. Estimated time: 3 mins.
  1. Home
  2. »
  3. Quizzes
  4. »
  5. Science Trivia
  6. »
  7. Computers
  8. »
  9. Software and Programming

Author
ebanks120
Time
3 mins
Type
Multiple Choice
Quiz #
387,703
Updated
Dec 03 21
# Qns
10
Difficulty
Average
Avg Score
6 / 10
Plays
488
Last 3 plays: Guest 207 (4/10), Guest 173 (2/10), Guest 73 (1/10).
-
Question 1 of 10
1. Which of the following is a legal identifier in assembly language?
Hint


Question 2 of 10
2. Which 32-bit register is used as the default loop counter? Hint


Question 3 of 10
3. Which of these values is the most acceptable for the data type REAL4? Hint


Question 4 of 10
4. What scenario sets the parity flag to 1?
Hint


Question 5 of 10
5. Assume that anArray is a 16 bit array containing the following elements:

19, 'L', 110001000b, 4C0h


Which expression identifies an element written in base 16?

Hint


Question 6 of 10
6. Which jump would take place in this code snippet:

mov al,232
cmp al,135

je L1
ja L2
jb L3
jz L4

Hint


Question 7 of 10
7. How is 17D78400h written in little endian mode? Hint


Question 8 of 10
8. What is 01100101b XOR 11010110b? Hint


Question 9 of 10
9. Which operator in assembly language counts the number of bytes in an identifier? Hint


Question 10 of 10
10. If 'M', 59, 0, 'j', -99, and '?' was pushed in the stack in that order, what will be the order in which these elements are popped? Hint



(Optional) Create a Free FunTrivia ID to save the points you are about to earn:

arrow Select a User ID:
arrow Choose a Password:
arrow Your Email:




Most Recent Scores
Dec 17 2024 : Guest 207: 4/10
Dec 05 2024 : Guest 173: 2/10
Dec 05 2024 : Guest 73: 1/10
Nov 22 2024 : Guest 78: 4/10
Oct 25 2024 : Triviaballer: 10/10

Quiz Answer Key and Fun Facts
1. Which of the following is a legal identifier in assembly language?

Answer: july_2012

The name of an identifier in assembly language can only contain letters, numbers, underscores, and these following symbols: $, @, and ?. However, it cannot start with a number, contain any additional symbols, or be a reserved​ word. It also cannot exceed 247 characters.
2. Which 32-bit register is used as the default loop counter?

Answer: ECX

When using the LOOP instruction, the ECX register keeps track of how many times a loop iterates. The loop stops when ECX=0. CX is used in 16 bit mode, and CL is used in 8 bit mode.
3. Which of these values is the most acceptable for the data type REAL4?

Answer: 9.54

REAL4 is a 32 bit data type that represents fractional numbers in IEEE format. It has a maximum value of about 1.7*10^38.
4. What scenario sets the parity flag to 1?

Answer: When an assembly language instruction yields an even number of 1 bits

Adding 1 to the binary number 10010010b will set the parity flag to 1 since its sum 10010011b will yield four 1 bits.
5. Assume that anArray is a 16 bit array containing the following elements: 19, 'L', 110001000b, 4C0h Which expression identifies an element written in base 16?

Answer: anArray+6

The identifier anArray by itself points to the first element in the array (in this case, anArray points to 19). Subsequent elements in an array are accessed by incrementing the offset of the array by the number of bytes in it. Since anArray is assumed to be 16 bits or 2 bytes, the offset is incremented by 2. 4C0h is the element written in base 16 and it is the last element in the array, so the expression that accesses it is (((anArray+2)+2)+2)=anArray+6.
6. Which jump would take place in this code snippet: mov al,232 cmp al,135 je L1 ja L2 jb L3 jz L4

Answer: ja

The code snippet in this question​ compares the value in the al register to a particular value. It then makes jumps based on whether the value in the al register is greater than, less than or equal to the value being tested. If the value in the al is greater than the number tested, ja (jump if above) will execute whereas if the value in the al register is less than the value tested, jb (jump if below) will execute.

However, if the value in the al register is the same as the value tested, je (jump if equal) will execute.

It also test to see if al=0 in which the jz (jump if 0) will executed​. Since 232 is greater than 135, the ja instruction will execute.
7. How is 17D78400h written in little endian mode?

Answer: 00, 84, D7, 17

In little endian mode, memory holds data from the least significant byte to the most significant byte. In this case, byte 00h is stored at offset 0000, byte 84h at offset 0001, byte D7h at offset 0002, and byte 17h at offset 0003.
8. What is 01100101b XOR 11010110b?

Answer: 10110011b

1 XOR 1 is 0, 1 XOR 0 is 1, 0 XOR 1 is 1, and 0 XOR 0 is 0.
9. Which operator in assembly language counts the number of bytes in an identifier?

Answer: TYPE

The way the TYPE operator counts the bytes in an identifier is as follows:

BYTE/SBYTE-1 byte
WORD/SWORD-2 bytes
DWORD/SDWORD-4 bytes
FWORD-6 bytes
QWORD-8 bytes
TBYTE-10 bytes
REAL4-4 bytes
REAL8-8 bytes
REAL10-10 bytes
10. If 'M', 59, 0, 'j', -99, and '?' was pushed in the stack in that order, what will be the order in which these elements are popped?

Answer: '?', -99, 'j', 0, 59, 'M'

The last item pushed into the stack will be the first item that is popped. Then the second to last item pushed into the stack will be the second item that is popped and so on.
Source: Author ebanks120

This quiz was reviewed by FunTrivia editor WesleyCrusher before going online.
Any errors found in FunTrivia content are routinely corrected through our feedback system.
Related Quizzes
This quiz is part of series Computer Science Quizzes:

A series of quizzes on computer programming and architecture.

  1. C++ Trivia Average
  2. Assembly Language for the x86 Processor Average
  3. The Science of Computer Technology Average
  4. Unix Is Unique Average
  5. HTML Fundamentals Average
  6. The SQL Database Environment Average

12/22/2024, Copyright 2024 FunTrivia, Inc. - Report an Error / Contact Us