Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!msunews!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!unsw.edu.au!news
From: s9300078@cumulus.csd.unsw.OZ.AU (Weiguang Huang)
Subject: how to get disk serial number by bio() in PDC Prolog ?
Message-ID: <1994Dec16.005851.23405@usage.csd.unsw.OZ.AU>
Sender: news@usage.csd.unsw.OZ.AU
Nntp-Posting-Host: aix00.csd.unsw.oz.au
Organization: University of New South Wales
Date: Fri, 16 Dec 1994 00:58:51 GMT
Lines: 29


Please help to get correct the disk serial number by bios(). Althought I can
get it by the DOS command VOL.

--------------
goal

bios(0x21,reg(0x6900,0x02,0x0866,0x0866,0,0,0x0866,0),reg(AX,BX,CX,DX,SI,DI,DS,ES),F),
write("AX=",AX," BX=",BX," CX=",CX," DS=",DS," DX=",DX, " F=",F).

---------------

INT 21 U - DOS 4+ 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 #0866)
Return: CF set on error
            AX = error code (see #0789 at 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)

