I'm writing 16-bit boot sector code. It reads "sector 0" under VMware with all the fields, including the 0xaa55 sig, as expected but the same code copied to DOSBox under Win 8.1 (x64) reads nothing. This makes testing a bit tedious.
The A: drive is a
MOUNT in DOSBox.
Is anyone aware of a work-around, please?
Here is example assembly code to show the problem (assemble into a .COM file with NASM,
mov bp,4 getsect_loop: mov ax,0x0000 ; RESET mov dl,0x00 ; (bit 7 for HDD) int 0x13 mov al,01 ; # sectors mov ah,02 ; read sector(s) mov cl,1 ; 6 bits first sector (1-based, aka "sector 0") mov ch,0 ; low 8 bits of CYL (2 more bits can be given in CL) mov dh,0 ; HEAD mov dl,0x00 ; 0-based drive. 0 is typically A:, 1 for B:, 80 for C: mov bx,di push cs pop es ; es:bx -> buffer area. Careful about segment boundaries clc int 0x13 ; READ SECTOR(S) jnc getsect_done dec bp cmp bp,0x0000 ja getsect_loop getsect_done:
Thanks if anyone can explain the difference, or suggest what would also work in DOSBox.