diff --git a/Makefile b/Makefile index 5b72847..a35d6b5 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ debug.rom: debug/*.asm lib/*.inc nasm -s -o $@ -I lib -I debug debug/main.asm && scripts/fix-rom.sh $@ floppy.bs: boot/fatvbr.asm - nasm -s -o $@ $< + nasm -s -DCMDLINE='"KERNEL.COM"' -o $@ $< fdimage.img: floppy.bs kernel.com dd if=/dev/zero bs=512 count=$$(( $(FD_CYLINDERS) * $(FD_HEADS) * $(FD_SECTORS) )) of=$@ @@ -40,11 +40,5 @@ fdimage.img: floppy.bs kernel.com clean: rm -f *.com *.bin *.rom *.img *.log *.bs *.lst -qemu-rom: kernel.rom $(DEBUGROM) - $(QEMU) $(QEMU_ARGS) -option-rom kernel.rom - qemu-floppy: fdimage.img $(DEBUGROM) $(QEMU) $(QEMU_ARGS) -boot c -fda fdimage.img - -qemu-serial: boot/serial.bin $(DEBUGROM) - $(QEMU) $(QEMU_ARGS) -hda boot/serial.bin diff --git a/kernel/main.asm b/kernel/main.asm index 3a6778f..98a2bdd 100644 --- a/kernel/main.asm +++ b/kernel/main.asm @@ -42,7 +42,13 @@ init: push cs call isr_dos_main - int3 + mov cx, WORD [0x80] + xor ch, ch + mov si, 0x81 +.loop: + lodsb + call putc + loop .loop cli .halt: