BBS: Inland Empire Archive Date: 04-13-92 (23:18) Number: 155 From: STEVE HALKO Refer#: NONE To: SCOTT WUNSCH Recvd: NO Subj: More questions! Conf: (2) Quik_Bas
SW> 1) Does anybody know how to check the amount of free conventional SW> memory? DOS 5.0 UMB's? XMS? For free conventional memory, I use INT 21h, Function 52h to find the first MCB (Memory Control Block). Then I walk the MCB's til I find the last one - the "size of block" field in the last MCB is the amount of free memory available. UMB's and XMS - I don't know, but I'm looking forward to finding out from someone! SW> 2) I am trying to produce a report similar to that of CHKDSK, but SW> I can't figure out how to check the amount bad sectors. You might investigate INT 21h, Function 36h. It reports total drive space and free drive space, but I'm not sure if these include bad sectors or not. Lost clusters are not counted in free drive space for this interrupt. If you find that this doesn't help you with # of bad sectors, then the only other way I know of is to read the FAT and see how many clusters are marked with the bad sector code (FF7h for FAT-12 or FFF7h for FAT-16). * SLMR 2.1a * Backup not found: (A)bort (R)etry (P)anic --- DB B1064/002487 * Origin: Gulf Coast BBS -QuickSHARE #2- (904)563-2547 HST/V.32bis (1:365/12)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET