diff --git a/Makefile b/Makefile index 25ee92b..2a6a31a 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ boot.o: boot.s floppy.bin: boot.bin floppy_base.bin rm -vf $@ cp floppy_base.bin $@ - dd if=boot.bin of=$@ + dd if=boot.bin of=$@ conv=notrunc .PHONY: boot disasm hexdump boot: floppy.bin diff --git a/boot.s b/boot.s index 7283777..c45b104 100644 --- a/boot.s +++ b/boot.s @@ -1,4 +1,6 @@ .code16 +# the currently viewed sector gets put at 0x7c00 +# we move to 0x7000 to make space .global _start # the linker needs to find it _start: @@ -88,6 +90,16 @@ palette_loop: mov $0x7c0, %ax # ES = the bootsector mov %ax, %es + mov $1, %al # read only one sector + mov $2, %cx # sector/track + xor %dx, %dx # head / drive number + xor %bx, %bx # write to es:bx + +# mov $0, %ah # reset disk system +# int $0x13 + mov $2, %ah # actual read + int $0x13 # TODO error checking + update_screen_vgay: mov $0, %dh