Assembly Quiz 2, Assembly Quiz 3, Irvine32 chapter 4

¡Supera tus tareas y exámenes ahora con Quizwiz!

In real-address mode, convert the following hexadecimal segment-offset address to a linear address: 0950:0100

09600h

In real-address mode, convert the following hexadecimal segment-offset address to a linear address: 0CD1:02E0

0CFF0h

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

21h, 43h, 65h, 87h

What is the maximum length of an identifier?

247 characters

What is the duration of a single clock cycle in a 3-GHz processor?

3.33x10^-10

In MASM's flat segmentation model, how many bits hold the address of an instruction or variable?

32 bits

How many bits long are the FPU data registers?

80 bits

Declare a symbolic constant using the equal-sign directive that contains the ASCII code (08h) for the Backspace key.

BACKSPACE = 08h

What characteristics distinguish BIOS-level input/output?

BIOS functions communicate directly with the system hardware. They are independent of the operating system

Why would it not be a good idea to use numeric addresses when writing instructions that access variables?

Because the addresses coded in the instructions would have to be updated whenever new variables were inserted before existing ones.

What are the main differences between Wi-Fi and Bluetooth?

Bluetooth is a wireless communication protocol for exchanging small amounts of data over short distances. It is commonly used with mobile devices such as cell phones and PDAs. Wi-Fi devices operate at a greater speed and capacity than Bluetooth. Wi-Fi devices often communicate with each other when in the range of a wireless network.

In the AddSub program, how are the CPU registers displayed?

By calling the DumpRegs procedure.

Describe the CISC design approach.

CISC means complex instruction set. A large collection of instructions, some of which perform sophisticated operations that might be typical of a high-level language

Name all six segment registers

CS, DS, ES, FS, GS, SS

Which flag is set when the result of an unsigned arithmetic operation is too large to fit into the destination?

Carry

Show an example of a block comment.

Code example: Comment ! This is a comment This is also a comment !

The central processor unit (CPU) contains registers and what other basic elements?

Control Unit, Arithmetic Logic Unit, and the clock.

Why does memory access take more machine cycles than register access?

Conventional memory is outside the CPU and it responds more slowly to access requests. Registers are hard-wired inside the CPU.

The central processor unit is connected to the rest of the computer system using what three buses?

Data, Address, and Control buses.

Reserved words can be instruction mnemonics, attributes, operators, predefined symbols, and __________.

Directives

During which stage of the instruction execution cycle is the program counter incremented?

During the fetch step.

Name four types of RAM mentioned in this chapter.

Dynamic RAM, Static RAM, Video RAM, and CMOS RAM

Name all eight 32-bit general-purpose registers.

EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP

Besides the stack pointer (ESP), what other register points to variables on the stack?

EBP

What types of files is produced by the linker?

Executable .EXE

Write a constant expression that divides 10 by 3 and returns the integer remainder.

Expression: 10 MOD 3.

Assembler directives execute at runtime.

False

Which two additional steps are required in the instruction execution cycle when a memory operand is used?

Fetch and Store

What are the three basic steps in the instruction execution cycle?

Fetch, decode, execute

When a program runs, what information does the OS read from the filename's disk directory entry?

Filename, file size, and starting location on the disk. Most directories also store the file's last modification date and time.

Which part of the CPU performs floating-point arithmetic?

Floating-Point Unit

What is the range of addressable memory in protected mode?

GByte 0 to FFFFFFFFh

Why do game programs often send their sound output directly to the sound card's hardware ports?

Game programs often try to take advantage of the latest features in specialized sound cards. It should be noted that MS-DOS game applications were more prone to do this than games running under MS-Windows. In fact, Windows-NT, 2000, and XP all prevent applications from directly accessing system hardware.

In the flat segmentation model, which table contains pointers to at least two segments?

Global descriptor table

What is the purpose of the identifier in the END statement?

It marks the last line of the program to be assembled, and the label next to END identifies the program's entry point (where execution begins).

Name the four basic parts of an assembly language instruction.

Label, mnemonic, operand(s), comment.

Which operating system component reads and executes programs?

Loader

In protected mode, which table contains pointers to memory segments used by a single program?

Local descriptor table

What special purpose does the ECX register serve?

Loop counter.

What is the range of addressable memory in real-address mode?

MByte 0 to FFFFFh

In the AddSub program, what does the .CODE directive identify?

Marks the beginning of the code segment.

Name at least four CPU status flags.

Most common: Carry, Sign, Zero, Overflow. Less common: Auxiliary Carry, Parity.

Why are device drivers necessary, given that the BIOS already has code that communicates with the computer's hardware?

New devices are invented all the time with capabilities that were often not anticipated when the BIOS was written.

Does the multiplication operator * have a higher precedence than the division operator / in integer expressions?

No

Is A5h a valid hexadecimal constant?

No

Must string constants be enclosed in single quotes?

No, they can also be enclosed in double quotes

Is it likely that the BIOS for a computer running MS-Windows would be different from that used by a computer running Linux?

No. The same BIOS would work for both operating systems. Many computer owners install two or three operating systems on

What types of files are produced by the assembler?

Object .OBJ and listing .LST files.

Which flag is set when the result of a signed arithmetic operation is either too large or too small to fit into the destination?

Overflow

What does the PROTO directive do?

PROTO declares the name of a procedure that is called by the current program.

Show an example of a valid real number constant with an exponent.

Real number constant: +3.5E-02.

What are the x86 processor's three basic modes of operation?

Real-address mode, Protected mode, and System Management mode

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

SDWORD

Describe SRAM and its most common use.

SRAM is an acronym for Static RAM, used in CPU cache memory

In protected mode, which register references the descriptor for the stack segment?

SS Register

Declare a symbolic constant named SecondsInDay using the equal-sign directive and assign it an arithmetic expression that calculates the number of seconds in a 24-hour period.

SecondsInDay = 24 * 60 * 60

List at least two features found in the Intel P965 Express chipset.

Select any two features from the following list: 1. Intel Fast Memory Access uses an updated Memory Controller Hub (MCH). 2. I/O Controller Hub (Intel ICH8/R/DH) that supports serial ATA devices (disk drives). 3. Support for 10 USB ports, 6 PCI express slots, networking, and Intel Quiet System technology. 4. High definition audio chip.

Which flag is set when an arithmetic or logical operation generates a negative result?

Sign

Which type of RAM is used for Level 2 cache memory

Static Ram

What is the purpose of the 8259A PIC controller?

The 8259 is the interrupt controller chip, sometimes called PIC, that schedules hardware interrupts and interrupts the CPU.

In the example regarding displaying a string of characters, which level exists between the operating system and the video controller card?

The BIOS level

Define multitasking

The CPU executes multiple tasks or programs by rapidly switching from one program to the next. This gives the impression that all programs are executing at the same time

Which directive ends a procedure?

The ENDP directive

In the AddSub program (Section 3.2), what is the meaning of the INCLUDE directive?

The INCLUDE directive copies necessary definitions and setup information from the Irvine32.inc text file. The data from this file is inserted into the data stream read by the assembler.

Which Intel processor was the first member of the IA-32 family?

The Intel 80386.

After a program has been loaded into memory, how does it begin execution?

The OS executes a branch, like a GOTO to the first machine instruction in the program.

What is the function of the OS scheduler?

The OS scheduler determines how much time to allot to each task, and it switches between tasks

Which directive begins a procedure?

The PROC directive

Which Intel processor first introduced superscalar execution?

The Pentium

Which Intel processor first used MMX technology?

The Pentium II

Of the four levels of input/output in a computer system, which is the most universal and portable.

The application program level

What advantages does a USB device offer over a standard serial or parallel device?

The computer can query a device connected via USB to find out its name and device type and the type of driver it supports. The computer can also suspend power to individual devices. None of these capabilities is possible with serial and parallel port

In the AddSub program, which statement halts the program?

The exit statement

In real-address mode, demonstrate two segment-offset addresses that point to the same linear address

The following segment-offset addresses point to the same linear address: 0640:0100 and 0630:0200.

At which levels can an assembly lannguage program manipulate input/output?

The operating system, BIOS, and hardware levels.

When the processor switches from one task to another, what values in the first task's state must be preserved?

The program counter, the task's variables, and the CPU registers (including the status flags).

Describe the RISC design approach

The term RISC stands for reduced instruction set. Is a small set of simple (atomic) instructions that may be combined into more complex operations

What is the main advantage to using the paging feature of x86 processors?

The total size of all programs loaded into memory can exceed the amount of physical memory installed in the computer.

Can you think of a reason why MS-DOS was not designed to support protectedmode programming?

This is an open-ended question, of course. It is a fact that MS-DOS first had to run on the 8086/8088 processors, which only supported Real-address mode. When later processors came out that supported Protected mode, my guess is that Microsoft wanted MS-DOS to continue to run on the older processors. Otherwise, customers with older computers would refuse to upgrade to new versions of MS-DOS.

A code label is followed by a colon (:), but a data label does not have a colon.

True

An identifier cannot begin with a numeric digit.

True

Assembler directives can be written in any combination of uppercase and lowercase letters.

True

Assembly language identifiers are (by default) case insensitive.

True

MOV is an example of an instruction mnemonic.

True

The linker extracts assembled procedures from the link library and inserts them in the executable program.

True

When a program's source code is modified, it must be assembled and linked again before it can be executed with the changes.

True

Describe VRAM.

VRAM (video ram) holds displayable video data. When CRT monitors are used, VRAM is dual ported, allowing one port to continuously refresh the display while another port writes data to the display.

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

bArray BYTE 20 DUP(0)

What are the names of the segments in the AddSub program?

code, data, and stack.

Declare an uninitialized array of 50 unsigned doublewords named dArray.

dArray DWORD 50 DUP(?)

Identify valid suffix characters used in integer constants.

h, q, o, d, b, r, t, y.

The two ways of describing an address in real-address mode are segment-offset and __________

linear or absolute

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

myColor BYTE "blue", 0

Declare a string variable containing the word "TEST" repeated 500 times.

myTestString BYTE 500 DUP("TEST")

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

var1 SWORD ?

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

var2 BYTE ?

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

var3 SBYTE ?

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

var4 QWORD ?

Declare a 32-bit signed integer variable and initialize it with the smallest possible negative decimal value.

var5 SDWORD -2147483648

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

wArray WORD 10, 20, 30


Conjuntos de estudio relacionados

Multiplication (3 word problems)

View Set

a&p ch 20: lymphatic system immunity (innate immunity)

View Set