Changeset 145
- Timestamp:
- Apr 8, 2017, 12:27:40 AM (8 years ago)
- Location:
- trunk/bootcode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/airboot.asm
r144 r145 1138 1138 ENDIF 1139 1139 1140 ; ----------------------------------------------------------------------------- 1141 ; UPDATE MBR 1142 ; ----------------------------------------------------------------------------- 1143 1144 ; Write MBR back to disk to sync MBR variables. 1145 ; Otherwise subsequent MBR loads will differ from the RAM stored one, 1146 ; which is used by MBR protection to validate parts of the MBR. 1147 xor bx, bx ; 0000h - our load address (8000:0000) 1148 mov cx, 1 ; CHS sector 1, cylinder 0 1149 xor dh, dh ; CHS head 0 1150 mov dl, [BIOS_BootDisk] ; The disk we were loaded from 1151 mov al, 1 ; One sector to write 1152 mov ah, 03h ; BIOS write disk (legacy) 1153 int 13h ; Call BIOS 1154 ;! 1155 ;! TODO: Check success 1156 ;! Yes, we should check for errors here, coz it would mean AirBoot 1157 ;! was loaded from a disk where the MBR cannot be written ! 1158 ;! 1140 1159 1141 1160 ; ----------------------------------------------------------------------------- -
trunk/bootcode/regular/other.asm
r142 r145 183 183 call MBR_TeletypeNL 184 184 185 ; Write MBR back to disk to sync MBR variables.186 ; Otherwise subsequent MBR loads will differ from the RAM stored one,187 ; which is used by MBR protection to validate parts of the MBR.188 xor bx, bx189 mov cx, 1190 xor dh, dh191 mov dl, [BIOS_BootDisk]192 mov al, 1193 mov ah, 03h194 int 13h195 ;!196 ;! TODO: Check success197 ;! Yes, we should check for errors here, coz it would mean AirBoot198 ;! was loaded from a disk where the MBR cannot be written !199 ;!200 201 202 185 ; 203 186 ; Phase 1 Indicator
Note:
See TracChangeset
for help on using the changeset viewer.