utils/dosfstools/mcopy --arca --offset 17 -i $@ apps/pcomm/pcomm.com ::command.com
run-qemu: chimaera.img chimaera.vhd
- qemu-system-i386 -cpu 486 -drive file="chimaera.img",format=raw,if=floppy,index=0 -m 4M
+# qemu-system-i386 -cpu 486 -drive file="chimaera.img",format=raw,if=floppy,index=0 -m 4M
qemu-system-i386 -cpu 486 -drive file="chimaera.vhd",format=raw,if=ide,index=0 -m 4M
mov word ptr [bp - 48], ax
mov word ptr [bp - 46], dx
+ cmp dx, cs:[_root_cluster + 2]
+ jne _make_dos_entry.got_prev
+
+ cmp ax, cs:[_root_cluster]
+ jne _make_dos_entry.got_prev
+
+ push ax
+ push dx
+
+ xor ax, ax
+ xor dx, dx
+
+ mov word ptr [bp - 48], ax
+ mov word ptr [bp - 46], dx
+
+ pop dx
+ pop ax
+
+_make_dos_entry.got_prev:
+
mov word ptr [bp - 36], cx
mov word ptr [bp - 32], bx
xor bx, bx
call _write_sectors
+ mov ax, cs:[_info_sector]
+
+ and ax, ax
+ jz _make_dos_entry.done
+
+ xor dx, dx
+
+ add ax, cs:[_hidden_sectors]
+ adc dx, cs:[_hidden_sectors + 2]
+
+ mov bx, cs:[_disk_scratch]
+ mov es, bx
+ xor bx, bx
+
+ mov cx, 1
+ call _read_sectors
+
+ mov di, HEX (01E0)
+
+ mov ax, es:[di + 8]
+ mov dx, es:[di + 10]
+
+ sub ax, 1
+ sbb dx, 0
+
+ mov es:[di + 8], ax
+ mov es:[di + 10], dx
+
+ mov ax, es:[di + 12]
+ mov dx, es:[di + 14]
+
+ add ax, 1
+ adc dx, 0
+
+ mov es:[di + 12], ax
+ mov es:[di + 14], dx
+
+ mov ax, cs:[_info_sector]
+ xor dx, dx
+
+ add ax, cs:[_hidden_sectors]
+ adc dx, cs:[_hidden_sectors + 2]
+
+ mov cx, 1
+ call _write_sectors
+
jmp _make_dos_entry.done
_make_dos_entry.error: