Skip to content

Commit b00bf34

Browse files
committed
Let compiler select register when loading GDT
1 parent 39b5f16 commit b00bf34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bios/stage-2/src/protected_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn enter_unreal_mode() {
7474

7575
// load GDT
7676
unsafe {
77-
asm!("mov bx, 0x10", "mov ds, bx");
77+
asm!("mov {0}, 0x10", "mov ds, {0}", out(reg) _);
7878
}
7979

8080
// unset protected mode bit again

0 commit comments

Comments
 (0)