Changeset 145 for trunk/bootcode/airboot.asm
- Timestamp:
- Apr 8, 2017, 12:27:40 AM (8 years ago)
- File:
-
- 1 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 ; -----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.