about summary refs log tree commit diff stats
path: root/apps/boot.hex
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-21 00:04:38 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-21 00:04:38 -0800
commit946dfe7ffb4bbf1e0f3f85b3560c9f9395b708e0 (patch)
tree25d477f430e7e0c4313ffbad1a1cec13b9d10e5e /apps/boot.hex
parent6ac16fd1ae275fb4042ab4aa85df3ccc86f3e615 (diff)
downloadmu-946dfe7ffb4bbf1e0f3f85b3560c9f9395b708e0.tar.gz
7370
Use a more realistically sized disk image. Now we can read the second sector.
Diffstat (limited to 'apps/boot.hex')
-rw-r--r--apps/boot.hex11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/boot.hex b/apps/boot.hex
index a95c1de7..ec65898d 100644
--- a/apps/boot.hex
+++ b/apps/boot.hex
@@ -6,12 +6,15 @@
 # If the initial load fails, it prints 'D' to the top-left of the screen and
 # halts.
 #
-# To convert to a disk image:
+# To convert to a disk image, first prepare a realistically sized disk image:
+#   dd if=/dev/zero of=disk.img count=20160  # 512-byte sectors, so 10MB
+# Now fill in sectors:
 #   ./bootstrap run apps/hex < apps/boot.hex > boot.bin
+#   dd if=boot.bin of=disk.img conv=notrunc
 # To run:
-#   qemu-system-i386 boot.bin
+#   qemu-system-i386 disk.img
 # Or:
-#   bochs -f apps/boot.bochsrc  # boot.bochsrc loads boot.bin
+#   bochs -f apps/boot.bochsrc  # boot.bochsrc loads disk.img
 #
 # Since we start out in 16-bit mode, we need instructions SubX doesn't
 # support.
@@ -37,7 +40,7 @@
   b2 80  # dl <- 80  # hdd 0
   b5 00  # ch <- 0  # cylinder 0
   b6 00  # dh <- 0  # track 0
-  b1 01  # cl <- 1  # sector 0 (first sector, 1-based)
+  b1 02  # cl <- 2  # second sector, 1-based
   b0 01  # al <- 1  # number of sectors to read
   # address to write sectors to = es:bx = 0x7e00, contiguous with boot segment
   bb 00 00  # bx <- 0
nventati.org> 2020-03-14 16:23:53 +0530 Split project into multiple programs' href='/andinus/cetus/commit/README.org?h=v0.6.5&id=a7e66bc241524caf1accf02966c76f436fa19210'>a7e66bc ^
2f15edf ^



16bcb7f ^
ad0dd2a ^
052140f ^

f0a905d ^
b34b873 ^




51cbcc4 ^
5e6090c ^
17ca26f ^
bfa2918 ^
6849d7f ^
b34b873 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46