blob: 238823e9f1474938e4f754f11a26952ca48ec36c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# 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 higher-resolution
# 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 program on 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
# main: (address 0x8800)
e9 fb ff ff ff # jump to address 0x8800
# vim:ft=subx
|