diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-12-26 13:22:28 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-12-26 13:30:04 -0800 |
commit | d8eacb3893a310f6f0ca5ef7ad9a7653fc7a8c67 (patch) | |
tree | e6d73bbc988e894e4f6b6b585dde7b9c08e2c819 /baremetal/bos/3-2.hex | |
parent | 2fcf7e24d14bad5c66071ba0c7c313e480987e50 (diff) | |
download | mu-d8eacb3893a310f6f0ca5ef7ad9a7653fc7a8c67.tar.gz |
7403 - baremetal/ for apps without a kernel
Diffstat (limited to 'baremetal/bos/3-2.hex')
-rw-r--r-- | baremetal/bos/3-2.hex | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/baremetal/bos/3-2.hex b/baremetal/bos/3-2.hex new file mode 100644 index 00000000..85792e26 --- /dev/null +++ b/baremetal/bos/3-2.hex @@ -0,0 +1,65 @@ +# Bootable image. +# Boot sector must have exactly 512 bytes. +# 16-bit real mode. +# +# To convert to a disk image: +# ./bootstrap run apps/hex < baremetal/bos/3-2.hex > boot.bin +# To run: +# qemu-system-i386 boot.bin +# Or: +# bochs -f baremetal/bos/bochsrc # bochsrc loads boot.bin +# +# Expected output inside emulator: +# Hello + +b4 0e # ah <- 0e (teletype output) + +b0 48 # al <- 'H' +cd 10 # int 10h +b0 65 # al <- 'e' +cd 10 # int 10h +b0 6c # al <- 'l' +cd 10 # int 10h +b0 6c # al <- 'l' +cd 10 # int 10h +b0 6f # al <- 'o' +cd 10 # int 10h + +e9 fd ff # loop forever + +# padding to 512 bytes + 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +55 aa # final 2 bytes: boot sector marker + +# vim:ft=subx |