diff --git a/Makefile b/Makefile index 115d588..47bf6d4 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ FLOPPY = 360 -BIOS = 0xFA00 + +RAM = 0x10000 PROGRAMS = $(patsubst %.asm,%.com,$(wildcard com/*.asm)) -DISTFILES = rdos.bin $(PROGRAMS) +DISTFILES = bdos.bin $(PROGRAMS) ROMS = QEMU_ARCH = $(shell uname -m) @@ -11,7 +12,7 @@ QEMU_ARGS = $(addprefix --option-rom ,$(ROMS)) NASM = nasm NASM_ARGS = -s -Ilib -Plib/nasmcomp.asm -w-macro-params -NASM_ARGS += -DBIOS=$(BIOS) +NASM_ARGS += -DRAM=$(RAM) EMUL = utils/emul @@ -32,9 +33,9 @@ endif default: fdimage.img -# Kernel image -rdos.bin: kernel/*.asm lib/*.asm - $(NASM) $(NASM_ARGS) -o $@ -I kernel kernel/main.asm +# BDOS image +bdos.bin: bdos/*.asm lib/*.asm + $(NASM) $(NASM_ARGS) -o $@ -I bdos bdos/main.asm # Boot sectors boot/%.bs: boot/%.asm diff --git a/kernel/con86.asm b/bdos/con86.asm similarity index 100% rename from kernel/con86.asm rename to bdos/con86.asm diff --git a/kernel/disk.asm b/bdos/disk.asm similarity index 100% rename from kernel/disk.asm rename to bdos/disk.asm diff --git a/kernel/dump.asm b/bdos/dump.asm similarity index 100% rename from kernel/dump.asm rename to bdos/dump.asm diff --git a/kernel/exec.asm b/bdos/exec.asm similarity index 100% rename from kernel/exec.asm rename to bdos/exec.asm diff --git a/kernel/fcb.asm b/bdos/fcb.asm similarity index 100% rename from kernel/fcb.asm rename to bdos/fcb.asm diff --git a/kernel/main.asm b/bdos/main.asm similarity index 100% rename from kernel/main.asm rename to bdos/main.asm diff --git a/kernel/string.asm b/bdos/string.asm similarity index 100% rename from kernel/string.asm rename to bdos/string.asm diff --git a/kernel/syscall.asm b/bdos/syscall.asm similarity index 100% rename from kernel/syscall.asm rename to bdos/syscall.asm diff --git a/bios/8086.asm b/bios/8086.asm index 8921404..fbd41b6 100644 --- a/bios/8086.asm +++ b/bios/8086.asm @@ -1,9 +1,9 @@ -ORG BIOS +ORG (RAM - 0x0800) CPU 8086 -DISKCX: EQU 0x40 -DISKDX: EQU 0x42 -DISKBX: EQU 0x44 +DISKCX: EQU 0x8 +DISKDX: EQU 0xA +DISKBX: EQU 0xC JMP NEAR BOOT JMP NEAR WBOOT diff --git a/boot/fat.asm b/boot/fat.asm index 03b8b21..71a2ab4 100644 --- a/boot/fat.asm +++ b/boot/fat.asm @@ -234,7 +234,7 @@ error: int 0x19 kernel_name: - db "RDOS BIN" + db "BDOS BIN" times (0x1FE - ($-$$)) db 0