Коды загрузки ОС. Ознакомление с последовательностью действий при загрузке ОС

Страницы работы

Содержание работы

Выполнил: Половинко Сергей КИТ-14б

Лабораторная работа № 7

Тема: коды загрузки ОС.

Цель работы: Ознакомление с последовательностью действий при загрузке ОС. Анализ кодов загрузки, расположенных в BIOS, в главном секторе загрузки (MBR) и в секторе загрузки раздела (BOOT).

Ход выполнения работы:

Часть листинга BIOS, отвечающая за загрузку и проверку MBR:

F000:54D7 B80102        MOV      AX,0201                           

F000:54DA BB007C        MOV      BX,7C00                           

F000:54DD B90100        MOV      CX,0001                           

F000:54E0 BA8000        MOV      DX,0080                           

F000:54E3 CD13          INT      13                                

F000:54E5 81C3BE01      ADD      BX,01BE                           

F000:54E9 26            ES:                                        

F000:54EA 813F55AA      CMP      WORD PTR [BX],AA55                

F000:54EE 741D          JZ 550D                              

Часть листинга MBR, отвечающая за проверку BOOT:

0B28:0100 33C0          XOR      AX,AX                             

0B28:0102 8ED0          MOV      SS,AX                             

0B28:0104 BC007C        MOV      SP,7C00                           

0B28:0107 FB            STI                                        

0B28:0108 50            PUSH     AX                                

0B28:0109 07            POP      ES                                

0B28:010A 50            PUSH     AX                                

0B28:010B 1F            POP      DS                                

0B28:010C FC            CLD                                        

0B28:010D BE1B7C        MOV      SI,7C1B                           

0B28:0110 BF1B06        MOV      DI,061B                           

0B28:0113 50            PUSH     AX                                

0B28:0114 57            PUSH     DI                                

0B28:0115 B9E501        MOV      CX,01E5                           

0B28:0118 F3            REPZ                                       

0B28:0119 A4            MOVSB                                      

0B28:011A CB            RETF                                       

0B28:011B BDBE07        MOV      BP,07BE                           

0B28:011E B104          MOV      CL,04                             

0B28:0120 386E00        CMP      [BP+00],CH                        

0B28:0123 7C09          JL 012E                              

0B28:0125 7513          JNZ      013A                              

0B28:0127 83C510        ADD      BP,+10                            

0B28:012A E2F4          LOOP     0120                              

0B28:012C CD18          INT      18                                

0B28:012E 8BF5          MOV      SI,BP                             

0B28:0130 83C610        ADD      SI,+10                            

0B28:0133 49            DEC      CX                                

0B28:0134 7419          JZ 014F                              

0B28:0136 382C          CMP      [SI],CH                           

0B28:0138 74F6          JZ 0130                              

0B28:013A A0B507        MOV      AL,[07B5]                         

0B28:013D B407          MOV      AH,07                             

0B28:013F 8BF0          MOV      SI,AX                             

0B28:0141 AC            LODSB                                      

0B28:0142 3C00          CMP      AL,00                             

0B28:0144 74FC          JZ 0142                              

0B28:0146 BB0700        MOV      BX,0007                           

0B28:0149 B40E          MOV      AH,0E                             

0B28:014B CD10          INT      10                                

0B28:014D EBF2          JMP      0141                              

0B28:014F 884E10        MOV      [BP+10],CL                        

0B28:0152 E84600        CALL     019B                              

0B28:0155 732A          JNB      0181                              

0B28:0157 FE4610        INC      BYTE PTR [BP+10]                  

0B28:015A 807E040B      CMP      BYTE PTR [BP+04],0B               

0B28:015E 740B          JZ 016B                              

0B28:0160 807E040C      CMP      BYTE PTR [BP+04],0C               

0B28:0164 7405          JZ 016B                              

0B28:0166 A0B607        MOV      AL,[07B6]                         

0B28:0169 75D2          JNZ      013D                              

0B28:016B 80460206      ADD      BYTE PTR [BP+02],06               

0B28:016F 83460806      ADD      WORD PTR [BP+08],+06              

0B28:0173 83560D0A      ADC      WORD PTR [BP+0D],+0A              

0B28:0177 00E8          ADD      AL,CH                             

0B28:0179 2100          AND      [BX+SI],AX                        

0B28:017B 7305          JNB      0182                              

0B28:017D A0B607        MOV      AL,[07B6]                         

0B28:0180 EBBC          JMP      013E                              

0B28:0182 813EFE7D55AA  CMP      WORD PTR [7DFE],AA55              

0B28:0188 740B          JZ 0195                              

0B28:018A 807E1000      CMP      BYTE PTR [BP+10],00               

0B28:018E 74C8          JZ 0158                              

0B28:0190 A0B707        MOV      AL,[07B7]                         

0B28:0193 EBA9          JMP      013E                              

0B28:0195 8BFC          MOV      DI,SP                             

0B28:0197 1E            PUSH     DS                                

0B28:0198 57            PUSH     DI                                

0B28:0199 8BF5          MOV      SI,BP                             

0B28:019B CB            RETF                                       

0B28:019C BF0500        MOV      DI,0005                           

0B28:019F 8A5600        MOV      DL,[BP+00]                        

0B28:01A2 B408          MOV      AH,08                             

Похожие материалы

Информация о работе