I need to make a mini OS(boot from floppy A) that can write/read floppy B.
The environment is vmware workstation. The floppies are A.img and B.img.
In A.img, I set a MBR program and a func.bin. I need to archieve above function in func.bin. Following is a code snippet in it.
... ; set es:bx
mov ah, 0x03 ; read sectors
mov al, 0x01 ; 1 sector
mov ch, 0x00 ; cylinder
mov cl, 0x03 ; sector
mov dh, 0x00 ; head
mov dl, 0x01 ; B.img
int 0x13
Then I got the return code: ah = 0x01. It means "illegal command" but I don't know what caused it.
I tried to change mov dl, 0x01
to mov dl, 0x00
(A.img) or mov dl, 0x80
(hard disk), they all succeed. So I want to know how I can solve it.
update my question:
The B.img has been set to "be auto-connected when vm runs".
size of A: 31.5KB size of B: 1.44MB