Description: ProDOS 8: Finding Volume Size using Assembly Language Header: ProDOS 8: Finding Volume Size using Assembly Language This article last reviewed: 8 March 1989 You can determine the number of blocks on a ProDOS-compatible device from assembly language. On a ProDOS volume, the total number of blocks available is stored on block 2, bytes $29 and $2A. The number is in low byte/high byte format: for example, an 800K floppy will have $40 at byte $29 and $06 at byte $2A. Byte $2A contains the first two digits and byte $29 contains the last two digits. $0640 is equal to 1600 decimal, which is the total number of blocks on an 800K ProDOS disk. If you need to determine the number of blocks on a device from the hardware, that information can be obtained regardless of whether or not block 2 is intact. Check memory locations $Cs01, $Cs03, $Cs05 (s = slot number) for $20, $00, and $03, respectively. If these values are found, then the card in the slot is a disk controller. Check memory location $CsFF. If the value is $00 or $FF, assume that an Apple Disk II disk controller card is installed ($00 is 16-sector, $FF is 13-sector). Otherwise, check memory location $Cs07. If the value does not equal $00, the device is not a SmartPort device, and the total number of blocks for the drive are stored at memory locations $CsFC and $CsFD in low-byte/high-byte order. If the total number of blocks is 0, contact the card manufacturer for details on how to determine the number of blocks. (NOTE: We do not know of any disk controller that does not store the total number of blocks at memory locations $CsFC and $CsFD.) If the value at memory location $Cs07 is $00, the drive is a SmartPort device. To find the number of blocks on the drive, you must make SmartPort status call $03 (get DIB). This call is documented in the "Apple IIGS Firmware Reference Manual" (Apple # 030-3121-A) on pages 114 through 125, with the most specific information starting on page 121. Copyright 1989 Apple Computer, Inc. Keywords: