Basic Can Obtain MS-DOS Disk Serial Number for Floppy Drive (82156)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
This article was previously published under Q82156 SUMMARY
The following code example demonstrates how to retrieve the disk
serial number from an MS-DOS formatted floppy disk. (Disks formatted
by MS-DOS versions 4.0 and later receive a serial number). The example
uses Interrupt 25 hex to do an absolute disk read of the first sector
on the disk (the boot sector). After the sector has been read into
memory, the disk serial number can be found at offsets 28 hex, 29 hex,
2a hex, and 2b hex of that memory area.
REFERENCES
"The New Peter Norton Programmer's Guide to The IBM PC &
PS/2," Peter Norton, Microsoft Press, 1988
"Advanced MS-DOS Programming," Ray Duncan, Microsoft Press, 1988
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB82156 |
---|
|