Reputation: 301
I am using DOSBox and nasm, trying to use int 13 in order to get hard disk information such as serial code etc. Int 13 needs:
AH=25h
DL=(80h,81h) and
ES:BX-> 512 byte buffer for reply packet.
i dont understand the requirements of the final line at all. any help?
An example would be much appreciated.
Upvotes: 0
Views: 1046
Reputation: 40982
As you know es
and bx
are 16 bits registers.
es
is the segment, while bx
is the offset.
If you concatenate them [es:bx]
you get the full 32 bit address (AKA pointer) to the "buffer", which the data will be copied to from the disk device.
Here is a snippet should work for you:
xor ax,ax
mov ah,25h
mov dl,80; 81h is for write probably
mov bx,0h
mov es,0800h
int 13
Upvotes: 0
Reputation: 62058
The registers es
and bx
supply the far address of the buffer to receive the data, the buffer is 512 bytes long.
Upvotes: 2