diff options
Diffstat (limited to 'baremetal/ex1.hex')
-rw-r--r-- | baremetal/ex1.hex | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/baremetal/ex1.hex b/baremetal/ex1.hex new file mode 100644 index 00000000..0c605df1 --- /dev/null +++ b/baremetal/ex1.hex @@ -0,0 +1,18 @@ +# The simplest possible program: just an infinite loop. +# All is well if your computer clears screen and hangs without restarting. +# On an emulator the window may get bigger to accomodate the 1280x1024 graphics mode. +# +# 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 +# Load the disk image: +# cat baremetal/boot.hex baremetal/ex1.hex |./bootstrap run apps/hex > a.bin +# dd if=a.bin of=disk.img conv=notrunc +# To run: +# qemu-system-i386 disk.img +# Or: +# bochs -f apps/boot.bochsrc # boot.bochsrc loads disk.img + +# address 0x8000 +e9 fb ff ff ff # jump to address 0x8000 + +# vim:ft=subx |