>Hi
>Thank for your response. I tryed your code, and work, but don't give
>the rigth serial. I got 2020-2020 as my serial hard disk number.
>
>I'm using WIndows 98se fat32 is this matters.
>
>What is this serial.bin code means???
>
>Thank again
Jorge,
Probably you called with a non-existant drive letter.
It would be like (assuming you saved as myprg.prg) :
do myprg with 'c'
For ease of ttransfer and preventing you from having an assembler I directly sent the disk image of a binary file. FYI here is my original ASM.
.MODEL LARGE
.CODE
Org 0h ; FP needs bins absolutely execute from address 0
main:
push bx ; save bx
mov ax,6900h ; get disk serial number function
mov dx,bx ; our return buffer offset
mov bx,ds:[bx] ; drive passed as parameter
int 21h ; execute dos interrupt
pop bx ; restore bx
retf ; return far to FP
end main
Just create serial.bin by running the upper code once. If you look at this file with debugger (debug.exe) you should see similar.
It works on win98 fat32 and NT NTFS drives too.
Cetin