Article View: comp.os.ms-windows.programmer.misc
Article #1618Re: reply: serialnumber harddisk
From: Howard Harvey
Date: Thu, 15 Oct 1992 17:01
Date: Thu, 15 Oct 1992 17:01
57 lines
2958 bytes
2958 bytes
eduard@htsa.aha.nl (Eduard Beijnes) writes: >The following programs writes 2911.1971 as a serialnumber on the >default drive (29 nov 1971) >----- uuencoded program / cut here ----- >begin 600 serial.com >4N %ILP"Z#@'-(;1,S2$ '$9$2D > >end >----- end of uuencoded program /cut here ----- >dump van debug.com: >2F73:0100 B80169 MOV AX,6901 >2F73:0103 B300 MOV BL,00 >2F73:0105 BA0E01 MOV DX,010E >2F73:0108 CD21 INT 21 >2F73:010A B44C MOV AH,4C >2F73:010C CD21 INT 21 >2F73:010E 0000 ADD [BX+SI],AL >2F73:0110 7119 JNO q012B >2F73:0112 1129 ADC [BX+DI],BP >I don't have the documentation with me because I am on school while >I am writing this. >I am not sure but if you change MOV AX,6901 in MOV AX,6900 it reads the >serialnumber. >If this doesn't work email me (eduard@solist.htsa.aha.nl) and I will >look it up You are right: 6900 returns the serial number in the disk info buffer pointed to by DS:DX Now my question: I have precise detail on how the number is initially generated. It is a combination of date and time. However, on a hard disk the top two bits of the second group are set. In theory they are beyond the range of any combination of date and time. Both bits may not be set. I have seen different combinations of these bits on different systems. Does anyone know the real mechanism for generating these two bits? BTW, the probability of any two diskettes having the same serial number is about 1 in 2**28, but playing around with function 6901 could lead to identical numbers and hence a failure by MS-DOS to identify a changed diskette (see MS-DOS User's Guide, p134) Howie ---------------------------------------------------------------------------- Howard J. Harvey | Email: hjh@aeg.dsto.gov.au SOIC - Avionics Integration | Phone: +61 8 259 6322 Air Operations Division | FAX: +61 8 259 5507 Defence Science and Technology Organisation | c = 1802617499785.254116 f/f Salisbury, South Australia | (furlongs/fortnight) ----------------------------------------------------------------------------
Technical Details
Message-ID:
<1992Oct15.110151.164779@dstos3.dsto.gov.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!munnari.oz.au!yoyo.aarnet.edu.au!dstos3.dsto.gov.au!goose!hjhReferences:
<1992Oct9.132325.22772@htsa.aha.nl>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!munnari.oz.au!yoyo.aarnet.edu.au!dstos3.dsto.gov.au!goose!hjh From: hjh@goose.dsto.gov.au (Howard Harvey) Newsgroups: comp.os.ms-windows.programmer.misc Subject: Re: reply: serialnumber harddisk Message-ID: <1992Oct15.110151.164779@dstos3.dsto.gov.au> Date: 15 Oct 92 17:01:49 GMT References: <1992Oct9.132325.22772@htsa.aha.nl> Lines: 57 Nntp-Posting-Host: goose.dsto.gov.au