Basic Program to Change Floppy Disk Volume Label in MS-DOS (84482)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
This article was previously published under Q84482 SUMMARY
The following code example demonstrates how to retrieve and modify the
volume label from an MS-DOS formatted floppy disk. (Disks formatted by
MS-DOS versions 4.0 and later receive an optional volume label in the
boot sector of the disk). 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 volume label can
be found and modified at offsets 2C hex to 37 hex of that memory area.
The sector is then rewritten to the disk using Interrupt 26 hex
(Absolute Disk Write).
This information applies to Microsoft QuickBasic versions 4.0, 4.0b,
and 4.5 for MS-DOS; Microsoft Basic Compiler versions 6.0 and 6.0b
for MS-DOS; and Microsoft Basic Professional Development System
(PDS) versions 7.0 and 7.1 for MS-DOS.
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: | KB84482 |
---|
|