Chào các bạn! Vì nhiều lý do từ nay Truyen2U chính thức đổi tên là Truyen247.Pro. Mong các bạn tiếp tục ủng hộ truy cập tên miền mới này nhé! Mãi yêu... ♥

Lec CA

Chapter 1

Explain and draw a typical computer system.

 The main components in a typical computer system are the processor, memory, IO devices:

-          Processor: is the workhorse of the system. It is the component that executes a program by performing arithmetic and logical operations on data.

-          Memory: is a passive component that simply stores information until it is requested by another part of the system.

-          Input/output(IO): transfer information without altering it between the external world and one or more internal components.

Discuss the significance of professors, memories and buses

-          Professors: Is the workhorse. The operation of a professor is characterized by a fetch-decode-execute.

-          Memories: are characterized by their function, capacity, and response times. Operations on memories called reads and writes, defined from the perspective of a processor or device that uses a memory. The performance of a memory system is defined by two different measures, the access time and cycle time.

-          Buses: A bus is used to transfer information between several different modules. Communication on a bus is broken into discrete transactions. The performance of a bus is defined by two parameters, the transfer time and the overall bandwidth.

Chapter 2

Convert numbers from one number system to another

-         Decimal to Binary

-         Binary to Hexadecimal

Chapter 3

Describe the importance of BIOS

-         The BIOS routines perform I/O operations for the PC.

-         The BIOS routines are machine specific

-         The DOS I/O operations are ultimately carried out by the BIOS routine.

-         Other important functions performed by BIOS are circuit checking and loading of the DOS routines

Discuss functions of Operating System

-         Reading and executing the commands typed by the user

-         Performing I/O operations

-         Generating error messages

-         Managing memory and other resources

Chapter 4

Explain steps to assemble and run an assemble language

Step1. Create the Source Program File

We used an editor to create the preceding program, with the file name PGM4_1.AMS. The .AMS extension is the conventional extension used to identify an assembly language source file.

Step2. Assemble the program

We use Microsoft Macro Assembler (MASM) to translate the source file PGM4_1.AMS into a machine language object file called PGM4_1.OJB

Step3. Link the program

The LINK program takes one or more object files. This file can be loaded into memory and run.

To link the program, type

A: \>C:\LINK    PGM4_1

If you use TASM, type

A:\>C:\TLINK   PGM4_1

Step4. Run the program

To run it, just type the file name, with or without the .exe extension.

A:\>PGM4_1

The program prints a “?” and waits for us to enter a character.

Chapter 6

Discuss and implement the branching structures and looping structures

1. Branching structures: Three structures

If-Then:

            IF condition is true THEN

                        Execute true_branch statements

            END_IF

The condition is an expression that is true or false. If it is true, the true-branch statements are executed. If it false, nothing is done, and the program goes on to whatever follows

If-Then-Else:

            IF condition is true

                  THEN

                            Execute true-branch statements

                  ELSE

                            Execute false-branch statements

            END_IF

If condition is true, the true-branch statements are executed. If condition is false, the false-branch statements are done.

CASE: is a multi-way branch structure that tests a register, variable, or expression for particular values or a range of values.

            CASE   expression

                         Values_1:          statements_1

                         Values_2:          statements_2                  

            Values_n:           statements_n

            END_CASE

2. Looping structures

FOR loop: This is a loop structure in which the loop statements are repeated a known number of times

            FOR     loop_count times DO

                        Statements

            END_FOR

WHILE Loop: This loop depends on a condition:

            WHILE condition DO

                        Statements

            END_WHILE

The condition is checked at the top of the loop. If true, the statements are executed; if false, the program goes on to whatever follows

REPEAT loop:

            REPEAT

                        Statements

            UNTIL condition

The statements are executed, and then the condition is checked. If true, the loop terminates; if false, control branches to the top of the loop.

 Chapter 7

Describe the Shift and Rotate instructions.

Shift instructions:

-         Left Shift: The SHL instruction shifts the bits in the destination to the left. The format for a single shifts is : SHL       destination, 1

A 0 is shifted into the rightmost bit position and the msb is shifted into CF. If the shift count N is different from 1, the instruction takes the form

            SHL         destination, CL

Where CL contains N. In this case, N single left shifts are made. The value of CL remains the same after the shift operation

                                                                              0                     

CF

-         Right Shift: The instruction SHR performs right shifts on the destination operand. The format for a single shift is:  SHR      destination, 1

A 0 is shifted into the msb position, and the rightmost bit is shifted into CF. If the shift count N is different from 1, the instruction takes the form

                        SHR       destination, CL

Where CL contains N. The effect on the flags is the same as for SHR

0                                             

                                                                              CF

Rotate Instructions

-         Rotate Left:

ROL         destination, 1

                        And

                                    ROL         destination, CL

-         Rotate Right:

ROR         destination, 1

                        And

                                    ROR         destination, CL

-         Rotate Carry Left:

RCL         destination, 1

                        And

                                    RCL         destination, CL

-         Rotate Carry Right:

RCR         destination, 1

                        And

                                    RCR         destination, CL

Explain how Shift instructions are for multiplication and division Write the logic instructions to perform various frequently occurring tasks in assembly language

-         The AND instruction can be used to clear specific destination bits while preserving the others. A 0 mask bit clears the corresponding destination bit; a 1 mask bit preserves the corresponding destination bit.

-         The OR instruction can be used to set destination bits while preserving the others. A 1 mask bit sets the corresponding destination bit; a 0 mask bit preserves the corresponding destination bit.

-         The XOR instruction can be used to complement specific destination bits while preserving the others. A 1 mask bit complements the corresponding destination bit; a 0 mask bit preserves the corresponding destination bit.

Chapter 8

Discuss the importance of Call instruction

-         The return address to the calling program is saved on the stack. This is offset of the next instruction after the CALL statement. The segment:offset of this instruction is in CS:IP at the time the call is executed.

-         IP gets the offset, address of the first instruction of the procedure. This transfer control to the procedure.

Explain the concept and execution of various operations on the Stack

PUSH and PUSHF

-         To add a new word to the stack we PUSH it on. The syntax is

PUSH          source

                        Where source is a 16-bit register or memory word. For example,

                                    PUSH          AX

                        Execution of PUSH causes the following to happen:

1.      SP is decreased by 2.

2.      A copy of the source content is moved to the address specified by SS:SP. The source is unchanged                         

-         The instruction PUSHF, which has no operands, pushes the contents of the FLAGS register onto the stack

POP and POPF

-         To remove the top item from the stack, we POP it. The syntax is

POP             destination

Where destination is a 16-bit register (except IP) or memory word. For example,  POP            BX’

Executing POP causes this to happen:

1. The content of SS:SP(the top of the stack) is removed to the destination.

2. SP is increased by 2

-         The instruction POPF pops the top of the stack into the FLAGS register. There is no effect of PUSH, PUSHF, POP, POPF on the flags.

Chapter 9

Explain MUL, IMUL, DIV and IDIV instructions with examples

MUL

-         Standard for Multiply.

-         For unsigned multiplication

-         Effect of MUL on the status flags

SF, ZF, AF, and PF: Underfined

            CF and OF

                        After MUL, CF/OF     0 if the upper half of the result is zero

                                                            1 otherwise

IMUL

-         Standard for Integer Multiply

-         For signed multiplication

-         Effect of IMUL on the status flags

SF, ZF, AF, and PF: Underfined

CF and OF

            After MUL, CF/OF     0 if the upper haft of the result is the sign extension of the lower haft

                                                1 otherwise

Example: Suppose AX contains 1 and BX contains FFFFh:

Instruction     Decimal product      Hex product      DX      AX        CF/OF

 MUL   BX          65535                 0000FFFF       0000    FFFF         0

 IMUL   BX         -1                       FFFFFFFF      FFFF   FFFF         0

                        For MUL, DX=0, so CF/OF=0

For IMUL, the signed interpretation of BX is -1, and the product is also -1. In 32 bits, this is FFFFFFFFh, CF/OF=0 because DX is the sign extension of AX.

DIV

-         Standard for divide

-         Is used for unsigned division

-         The syntax is:   DIV     divisor

IDIV

-         Standard for integer divide

-         For signed division

-         The syntax is :   IDIV  divisor

Example: Suppose DX contains 0000h, AX contains 0005h, and BX contains 0002h

Instruction       Decimal quotient     Decimal remainder    AX         DX

DIV   BX                      2                               1                 0002h     0001h

IDIV   BX                     2                               1                 0002h     0001h

Dividing 5 by 2 yields a quotient of 2 and a remainder of 1. Because  both dividend and division are positive, DIV and IDIV give the same results

Chapter 11

Define various string instructions with their syntax

Chapter 13

Explain the reasons for using full segment definitions

-         Full segment definitions must be used for versions of MASM earlier than version 5.0

-         With the full segment definitions, the programmer can control how segment are ordered, combined with each other, and aligned relative to each other in memory.

Explain the use of pseudo-ops like PUBLIC and KEYWORD Describe the .COM programs along with their advantages and disadvantages

-         A program format in which the code, data, and stack segments coincide is called a .Com program, because that is extension given the run file.

-         The primary advantages of .COM programs are their simple structure and the fact that they take up relatively little disk space.

-         The disadvantages are inflexibility and limited size, because everything – code, data, and stack – must fit into the single segment

Chapter 14

Discuss the process of hardware interrupts  A hardware that needs service sends an interrupt request signal to the processor The 8086 suspends the current task it is executing and transfers control to an interrupt routine.

The interrupt routine services the hardware device by performing some I/O operation. Control is transferred back to the original executing task at the point where it was suspended

Chapter 18

Explain the 8087 numeric processor

-         The 8087 chip is designed to perform fast numeric operations for an 8088 – or 8086 – based system.

-         It can operate on multiple – precision, BCD, and floating – point data.

Describe the various RAID levels with their diagrams

RAID Level 0

-         RAID level 0, often call “striping”, is a performance – oriented striped data mapping technique

RAID Level 1

-         RAID level 1, or “mirroring”, has been used longer than any other form of RAID.

RAID Level 2

-         RAID level 2 uses Hamming error correcting algorithm that employs disk – striping strategy that breaks a file into bytes and spreads it across multiple disks.

RAID Level 3

-         RAID level 3 is similar to RAID level 2.

-         It uses the same striping method as level 2, but it requires only one disk for parity data.

-         RAID 3 suffers from a write bottleneck.

RAID Level 4

-         Level 4 use parity concentrated on a single disk driver to protect data.

-         It is better suited to transaction I/O rather than large file transfers

RAID Level 5

-         RAID level 5 eliminates the write bottleneck inherent in level 4

Bạn đang đọc truyện trên: Truyen247.Pro

Tags: #son