Му арх 2012

  • View
    230

  • Download
    11

Embed Size (px)

DESCRIPTION

 

Transcript

  • . .

  • 2

    . .

    6.0050103

    2010

  • 3

    004.2.075 32.973.2-02 29 : . . , ,

    .

    . . , .

    . . : . . . 6.0050103 ; . . . . - .-: - , 2010. 81 .

    29

    , , . 6.0050103 .

    004.2.075 32.973.2-02

    -

    ( 2010 .)

    . ., 2010

    , 2010

  • 4

    ... . . 1. 2. .. 3. .. 4. Assembler. 5. Assembler. 6. Assembler 7. .. 8. 9. 10. .

    5 7 20 26 32 46 51 55 60 63 68 72

    ... ..

    76 77

  • 5

    , ,

    . , , . ' , ' . ', . , , , .

    , , , , , .

    , , .

    . , . , , . , . - C++Builder 6 ( C++Builder 2007/2009), Visual Studio C++2005/2008.

    4 : - ; - ;

  • 6

    - ; - . ,

    ( ).

    6.0050103 .

    , .

    4 .

    1. ' . , .

    2. . . . . . . . . . . . . ' . '. .

    3. . - . . . . . SATA, SAS, IrDa, Bluetooth, WUSB, WiFi, WiMax . DIP, SIP, SIPP, SIMM, DIMM, RIMM.

    4. . -. CD-R. CD-RW. DVD. . . . .

    , . .

  • 7

    .

    .

    . (, , ++ ), ( ).

    , . , ++, (), ++ . , - , , () - :

    - (, , );

    - () . - ' , ' (

    , , , , ), . - - , , , , ' , , . , , , . ' . , ' . . , , - ' . ', .

    ', , 32

  • 8

    , . :

    - '. , . ' , .

    IA-32 (Intel Architecture) Intel (. 1):

    ', , 232 (4 ), Pentium II 236 (64 );

    ; ;

    (); ,

    ( ' Pentium );

    ( ' Pentium III);

    , .

    , , IA-32, -, .

    (486, Pentium Pentium ) ' ( 232 , 32 ), , . . 1 , ' Intel. , , 386 486. 8086/88, , . 8- 16- , , FLAGS, IP ' 1 .

  • 9

    . 1. -32

    AX

    AH AL

    DX

    DH DL

    CX

    CH CL

    BX

    BH BL

    EAX

    EDX

    ECX

    EBX

    BP

    SI

    DI

    SP

    EBP ESI

    EDI ESP

    236 -1 (232 -1)

    Pentium II/III/IV

    I486, Pentium

    C3

    D3

    S3

    E3

    F3

    G3

    31 15 7 0

    31 15 0

    15 0

    ST(0)

    ST(1)

    ST(2)

    ST(3)

    ST(4)

    ST(5)

    ST(6)

    ST(7)

    MMX1

    MMX2

    MMX3

    MMX4

    MMX5

    MMX6

    MMX7

    MMX0

    79 0

    63 0

    -

    ()

    FLAGS EFLAGS

    31 15 0

    E

    - 0..

    7

  • 10

    ',

    . , '. . , .

    , :

    - ///AL, EBX/BX/BH/BL, EDX/DX/DH/DL, X/CX/CH/CL, EBP/BP, ESI/SI, EDI/DI, ESP/SP , ( ) ;

    - CS, DS, SS, ES, FS, GS , . '. GDT LDT;

    - ST(0), ST(1), ST(2), ST(3), ST(4), ST(5), ST(6), ST(7), , ;

    - 0, 1, 2, 3, 4, 5, 6, 7;

    - 0, 1, 2, 3, 4, 5, 6, 7;

    - ( EFLAGS/FLAGS EIP/IP) , .

    , , , , . , IA-32, :

    - CRO CR4 ;

    - ' GDTR, IDTR, LDTR, TR ;

    - DR0/DR7 ;

  • 11

    - ' MTRR ';

    - - MSR , , .

    : ; . ,

    , . ' ESP. , - .

    , - ( ):

    (cumulator register) EAX/AX/AH/AL , ';

    - (base register) EBX/BX/BH/BL ' ';

    - (ount register) X/CX/CH/CL , ;

    - (data register) EDX/DX/DH/DL, EAX/AX/AH/AL, ( ', ).

    , , , 32, 16 8 :

    - (source index register) ESI/SI ;

    - (destination index register) EDI/DI .

  • 12

    , :

    - (stack pointer register) EBP\BP .

    Intel

    . , - : , . A 32 , . ', . IA 32 CS, SS, DS, ES, GS, FS, .

    . . (code segment register) CS. , - , . , ( GDT LDT ).

    . . (data segment register ) DS, .

    . : . (stack segment register ) SS, .

    . , , DS. , , (extension data segment register ) ES, GS, FS. ES. , .

  • 13

    Intel (. . 1),

    , , :

    - EIP/IP; - EFLAGS/FLAGS.

    . (instruction pointer register) EIP/IP

    32/16 . , . , , , . .

    EIP/IP (FLAG register) EFLAGS/FLAGS 32/16 . . EFLAGS/FLAGS FLAGS i8086.

    , EFLAGS/FLAGS :

    1. :

    - (carry flag). CF=1, ( ) . 7-, 15- 31- ; CF 0 . .

    - (parity flag). PF=1, 8 ( 8 - ) ; 0 8 .

    - (auxiliary carry flag) AF , BCD . : AF=1 3

  • 14

    ; AF=0 ( ) ;

    - (zero flag). ZF = 1 0; ZF =0 0.

    - (sign flag) SF - ( 7, 15 31 8, 16 32- ): SF=1 1; SF =0 - 0.

    - (overflow flag) OF : OF=1 ( 7,15 31 8, 16 32- ); .

    2. (directory flag) DF EFLAGS. DF : DF = 0 , : DF = 1 , . DF CLD ( DF) STD ( DF).

    3. IOPL - , , , 8086:

    - (trace flag) TF : TF=1 1 ( ); TF =0 .

    - (interrupt enable flag) IF () ( 1NTR): IF=1 ; IF=0 .

    - IOPL - .

    (nested task) NT ' ,

  • 15

    ' . ' CALL, IRET, TR TSS.

    (resume flag) RF .

    8086 (virtual 8086 mode) VM - : VM=1 8086; VM=0 .

    (alignment check) '. AM CR0. I-32 ( i80486) , - . ( CPL=3), , , 2 4.

    (virtual interrupt flag) VIF ( Pentium) , V , IF. VIF VIP ( CR4.VME=1).

    (virtual interrupt nding flag) VIP ( Pentium) 1 . i8086 VIF ( CR4.VME=1). , .

    (identification flag) ID , CPUID. , , CPUID.

    ,

    . . . , , .

    : - ; - ;

  • 16

    - ; Pentium

    : - CR4; - MSR (MSR- Model Specific Register,

    , ) . , MSR, . .

    ' CR0, CR1,

    CR2, CR3, CR4. . 0. ; CR1, ( ).

    CR0 , , . CR0 '. :

    - PE (protect enable), 0 . , (PE=0) (PE=1) .

    - MP (math present ), 1 . 1. - TS (talk switched), 3 .

    .

    - AM (alignment mask), 18 . (AM = 1) (AM = 0) .

    - CD (cache disable), 30 '. (CD=1) (CD=0) - ' ( ).

    - PG (paging), 31 (PG=1) (PG=0) .

    CR2 ' , , ', '. 14, 32 , , CR2.

  • 17

    , 14 , ' .

    CR3 '. . 20 . 1024 32 , . , 1024 32 , '. 4 .

    CR4 , , , ' Pentium. : 36 , i 8086, 4 .. CR4 , .

    '.

    . :

    - ; - . ,

    : - GDTR (Global

    Descriptor Table Register) 48 32 ( 16 - 47) (GDT) 16 ( 0 - 15) , GDT;

    - LDTR (Local Descriptor Table Register) 16 . GDT, , (LDT).

    - LDTR (Interrupt Descriptor Table Register) 48 32 ( 16

  • 18

    47) (IDT) 16 ( 0 - 15) , IDT;

    - 16 TR (Task Register),