about summary refs log tree commit diff stats
path: root/baremetal
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-01-24 11:56:58 -0800
committerKartik Agaram <vc@akkartik.com>2021-01-24 19:43:23 -0800
commit0cf7cecedc463891c236e3c81a19cd24ce6efc70 (patch)
treec6cd3b42f10d89d0f2e2d807cd14e1cc53a7ffd0 /baremetal
parent1c490388d13bb0fa3cab4fa245d6e17da1b22b87 (diff)
downloadmu-0cf7cecedc463891c236e3c81a19cd24ce6efc70.tar.gz
7557
Oh, stupid mistake in segmented address calculation. Now Qemu's working
again everywhere. Bochs is again broken everywhere. But I think we're
getting closer. I think Bochs's BIOS implementation for reading sectors
has two interacting constraints:

  - Can't write to more than 0x10000 bytes past segment register.
  - Can't write across segment alignment boundaries.

Qemu only cares about the first.
Diffstat (limited to 'baremetal')
-rw-r--r--baremetal/boot.hex2
1 files changed, 1 insertions, 1 deletions
diff --git a/baremetal/boot.hex b/baremetal/boot.hex
index c05a3f19..491e3718 100644
--- a/baremetal/boot.hex
+++ b/baremetal/boot.hex
@@ -100,7 +100,7 @@
   # "Addressing of Buffer should guarantee that the complete buffer is inside
   # the given segment, i.e. ( BX + size_of_buffer ) <= 10000h."
   #   https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=02h:_Read_Sectors_From_Drive
-  bb 00 fa  # bx <- 0xfa00 [label]
+  bb a0 0f  # bx <- 0xfa0
   8e c3  # es <- bx
   bb 00 00  # bx <- 0
   cd 13  # int 13h, BIOS disk service