Jumat, 03 Februari 2012

STUCTUR MEMORY ADDRESS

Okay now we will membahan memory structure, here are explained on the objectives and measures conversion of logical addresses into physical addresses, meaning, function and other types of registers, such as general purpose registers, and status registers

DEFINITION REGISTER
 A register is a temporary shelter for the data- data will be processed by the processor, and is formed by a 16 point electronic in the microprocessor chip itself. With the existence of places This temporary data storage, processing will be done is much faster than if the data should be taken directly from the memory locations. The Register-registe  the internal registers and registers consist of fourteen andwhole can be divided into several types, namely:
 
• Register segment
  
Consists of four registers, the code segment, data segment, stack segment,  and the extra segment.   Segment is part of the memory space berkapa-sitas 64 kilobytes (65536 bytes) and is used specifically for
  
placing certain types of data. For example, code segment is used by the program and instructions (code), the data segment is allocated for data, stack segment is used to provide space for  stack, which serves for temporary storage of data and address the when the main program is working on branching program (subroutine  procedures, etc.) and the extra segment as well as data  segment is also used as data placement.
 
• Register data
  
Register there is a register that contains information that would, were or has been processed by computer. In the 8088 register is realized by AX, BX, CX and BX (as a general-purpose registers), in connection with
  
functions in addition to handling specific tasks, can also be utilize   right to assist the processes of data in the internal pengolahand micro- processor.
 
• Register pointer
Register index
  
Register kind of pointer and index registers are registers which contains the address offset of certain segments, which consisn from the stack pointer (SP) and base pointer (BP) is used as holder of an offset value of the stack segment, while the source index (SI  and destination index (DI) contains the offset value of the data segment. Instruction pointer (IP) is the holder of an offset value of the code segment and its function is similar to the program counter (PC) on the processor-  8-bit processors. Only difference, the program counter directly put address  there are instructions in memory with their own value, the IP must working with CS register to be able to form addressing 20 bit in format segment: offset.
 
• Register status
  
This register has a different structure with the registers  other, which is formed from a 16-bit registers, each of which   bitnya provide certain information about the circumstances of the   occurs on the processor, as a result of data processing. Informatio  represented by a bit in status register called 'flag'.  Only 9 of the overall 16-bit status register that is used by as a signal processor conditions.
GENERAL PURPOSE REGISTER
General Purpose registers are versatile, often used for other purposes keperlua-which is not a typical function and to temporarily hold data to be processed, before retrieved and processed by the ALU (Arithmetic and Logical Unit), although Thus there are certain instructions that require the use of specific registers (according to the actual function), which has 16 bit, and can use the full 16 bits (1 word = 1 word) or 8 bits (1 byte = 1 character) only.
 
The types of general purpose registers can be explained as follows:
 
1. AX (16 bits), consisting of AH (high byte / 8 bit), AL (low byte / 8 bit)   In particular, the Accumulator and register a versatile functional   as input, or accommodate the processes / calculations (add, sub,   mul, and div) and often to store data temporarily. Many instructions   its performance is optimized when operating in the register   accumulator. Operation of the data stored in the accumulator bit   faster than if the data is stored in another register. In the operation   division, if the amount of 16-bit divisor, divide any number   accommodated in the register pair DX: AX. After sharing the results fit   in AX is remainder in DX.  When the amount of 8-bit divisor, divide any number placed   in AX. After division, the quotient is placed in the rest of the AL  for the AH.   In the operation of multiplication, accumulator which will accommodate a number multiplied by-    right. Multiplication result is placed in register AX. In the operation of I / O to and  from the port, accumulator holds the data to be transferred.
 
2. BX (16 bit), consisting of the BH (high byte.bit), AL (low byte / 8 bit)   Base specifically as well as a versatile and registers   one of the two base register addressing mode (pointer base address),   who can take or write directly from / to memory by segment  DS (Data Segment) and can be used as a pointer to a base   such data.
 
3. CX (16 bit), consisting of CH (high byte.bit), CL (low byte / 8 bit)   Specifically as a counter to put the number of jumps in   LOOP is performed, such as indicator of how much computation   performed. Serves to accommodate a loop count operation  (Loop, string, shift, and rotate). These registers can be used as   temporary data storage.
 
4. DX (16 bit), consisting of the DH (high byte.bit), DL (low byte / 8 bit) Specifically as well as data registers versatile   used as a container for a particular data (characters, pointers,  determination of the disk). 4 main tasks of the register DX:
   
• Mmbantu AX in the process of multiplication and division, especially the multiplicatio   and the division of
16 bits
   
• DX is offset from the DS register
   
• Shows the port number in port operations
   
• Used as a container for temporary data. Used in pairs with     AX register, the operation of 16-bit multiplication and division. In the operation I / O to and from the port, the port will accommodate DX accessible.

                              
AX / BX / CX / DX
 
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
 
-------------------------------------------------- ------------------------
        
AH / BH / CH / DH AL / BL / CL / DL
 
Of the functions of registers AX, BX, CX, DX registers can be classified as 'Data' because of the usefulness and utilization data that tend to shelter, in addition to having a specific function but can be mutually dependent.
 
SEGMENT REGISTER1. ES (Extra Segment)
   
Not have a job, but is useful for programming at the time   operations to another segment. The value contained by the register   This is an address that is useful for string instructions.   Address of an additional segment can also be stored in registers   This ES. 80386 processor in addition to the ES, it still has 2 extra registers   segment, the FS and GS.
 
2. CS (Code Segment)
   
Which points to the segment is the segment register, the CS is.   one of the four segment registers. His job is to show   program segment is located. While this register is the register pair   IP.   Hold the value which is the initial address of a segment.   This segment contains the instructions and the operand-operand-dispesi   repairs was identified by the program.
 
3. DS (Data Segment)
   
Accommodated by the value of this register is the address of the segment which normally contains data allocated by the program
 
4. SS (Stack Segment)
   
Address in the register is useful for instruction  which stores data temporarily distack. Stack is an area   memory reserved for temporary data storage.   DS and SS segment registers are two, each of which has   segment of the task indicates data segment and stack segment DS is a pair of DX and SS is a partner of SP.

 
POINTER REGISTER 
       Pointer register is a special function to store the offset valueof the relative address. These registers     consist of:
1. IP (Instruction Pointer)
    
CS is a pair that is most important to register   demonstrate a command line program. When you first run the program,   This register will directly point at the beginning of the program and always contains   address of the instruction to be executed immediately. Programmer does not   can directly access or modify the IP register. Conversion   can only take place through the instructions call, jump, loop   and interrupt that automatically changes the values ​​in the   IP registers. Combination of CS and IP address show Segment: Offset.
 
2. SP (Stack Pointer)  
   CS is a pair, then the SP is a used pair SS  for stack operations. Contains data which is the current location address  present in the stack. This register is a register multi-functional technical  which can be used as data storage and a place   calculations, although day-to-day operations should be used only in the stack.
 
3. BP (Base Pointer)    
   To write and read to or from memory directly to the   segment SS (Stack Segment) and used in communication between languages   computers, such as Pascal with assembler or C language with the language   Assembler Although used as a container for temporary data frequently   stack frame base pointer is used.
 
INDEX REGISTER

Registers used to perform string operations and frequently used to write and read to or from memory as well as the BX and BP (Base Pointer), which consists of registers:
 
A. SI (Source Index)

   
Used as a pointer or a place to store data. Registerini often   used as a pointer to point to an item               (indexing) in the   single unit data. String operations, SI is used to point to   byte or word in a source string.

B. DI (Destination Index)
   
Used as a pointer or data storage. Often used  as a pointer to point to an item (indexing) in one   data    unit.   String operations, DI used to point to the byte or word in   a destination string. Is a composition of 16-bit registers, wherein the composition bitnya   check whether something works or not. Is a 16 bit register   the bit-bitnya control a variety of instruction and reflect the status   processor at the time. For the actual real mode there are 9 flags, for   80 286 protected mode there are 11 flags, and to 80 386 to 13 flags.   For example, the Interrupt Flag to check whether at the time of surgery Interrupt   is active or not, if not actively interrupt will not be executed.   Carry Flag to check whether an error occurred during surgery or   not, Sign Flag indicating whether a number is marked or not and so on.

 
Composition of 16 bit (flag bits)
 
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OF DF IF TF SF ZF AF

Tidak ada komentar:

Posting Komentar