2020-12-26 22:21:04 +00:00
|
|
|
# The simplest possible program: just an infinite loop.
|
|
|
|
# All is well if your computer clears screen and hangs without restarting.
|
2020-12-27 16:33:22 +00:00
|
|
|
# On an emulator the window may get bigger to accomodate the higher-resolution
|
|
|
|
# graphics mode.
|
2020-12-26 22:21:04 +00:00
|
|
|
#
|
|
|
|
# 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
|
2020-12-27 19:39:17 +00:00
|
|
|
# Load the program on the disk image:
|
2021-03-04 08:24:24 +00:00
|
|
|
# cat baremetal/boot.hex baremetal/ex1.hex |bootstrap/bootstrap run hex > a.bin
|
2020-12-26 22:21:04 +00:00
|
|
|
# dd if=a.bin of=disk.img conv=notrunc
|
|
|
|
# To run:
|
|
|
|
# qemu-system-i386 disk.img
|
|
|
|
# Or:
|
2020-12-30 02:56:21 +00:00
|
|
|
# bochs -f baremetal/boot.bochsrc # boot.bochsrc loads disk.img
|
2020-12-26 22:21:04 +00:00
|
|
|
|
2021-01-28 08:25:54 +00:00
|
|
|
# main: (address 0x9400)
|
2021-01-09 23:38:03 +00:00
|
|
|
e9 fb ff ff ff # jump to main, hanging indefinitely
|
2020-12-26 22:21:04 +00:00
|
|
|
|
|
|
|
# vim:ft=subx
|