Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 21 - dos 4.0 internal - get/set disk serial number http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 21 - DOS 4.0 internal - GET/SET DISK SERIAL NUMBER
        AH = 69h
        AL = subfunction
            00h get serial number
            01h set serial number
        BL = drive (0=default, 1=A, 2=B, etc)
        DS:DX -> disk info (see below)
Return: CF set on error
            AX = error code (see AH=59h)
        CF clear if successful
            AX destroyed
            (AL = 00h) buffer filled with appropriate values from extended BPB
            (AL = 01h) extended BPB on disk set to values from buffer
Notes:  does not generate a critical error; all errors are returned in AX
        error 0005h given if no extended BPB on disk
        does not work on network drives (error 0001h)
        buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
           extended BPB on disk
SeeAlso: AX=440Dh

Format of disk info:
Offset  Size    Description
 00h    WORD    info level (zero)
 02h    DWORD   disk serial number (binary)
 06h 11 BYTEs   volume label or "NO NAME    " if none present
 11h  8 BYTEs   (AL=00h only) filesystem type--string "FAT12   " or "FAT16   "

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson