From 2a8f6641665bc556b48dd8833587d03a1b1d7191 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 15 Mar 2021 14:53:23 -0700 Subject: get shell/ working This mutates the expected binary. --- boot.subx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'boot.subx') diff --git a/boot.subx b/boot.subx index b8789acd..4e651910 100644 --- a/boot.subx +++ b/boot.subx @@ -54,17 +54,17 @@ # initialize segment registers b8/copy-to-ax 0/imm16 - 8e/->seg 3/mod/direct 0/rm32/ax 3/rm32/ds - 8e/->seg 3/mod/direct 0/rm32/ax 0/rm32/es - 8e/->seg 3/mod/direct 0/rm32/ax 4/rm32/fs - 8e/->seg 3/mod/direct 0/rm32/ax 5/rm32/gs + 8e/->seg 3/mod/direct 0/rm32/ax 3/r32/ds + 8e/->seg 3/mod/direct 0/rm32/ax 0/r32/es + 8e/->seg 3/mod/direct 0/rm32/ax 4/r32/fs + 8e/->seg 3/mod/direct 0/rm32/ax 5/r32/gs # initialize stack to 0x00070000 # We don't read or write the stack before we get to 32-bit mode, but BIOS # calls do. We need to move the stack in case BIOS initializes it to some # low address that we want to write code into. b8/copy-to-ax 0x7000/imm16 - 8e/->seg 3/mod/direct 0/rm32/ax 2/rm32/ss + 8e/->seg 3/mod/direct 0/rm32/ax 2/r32/ss bc/copy-to-esp 0/imm16 # undo the A20 hack: https://en.wikipedia.org/wiki/A20_line -- cgit 1.4.1-2-gfad0