BBS: Inland Empire Archive Date: 05-13-92 (09:02) Number: 101 From: RICHARD DALE Refer#: NONE To: RICHARD MCCARRON Recvd: NO Subj: DISK SPACE AVAILABLE -QB Conf: (2) Quik_Bas
RM>IS IT POSSIBLE TO WRITE A SUB ROUTINE IN QUICK BASIC TO
RM>CHECK HOW MUCH SPACE IS AVAILABLE ON HARD OR FLOPPY DISK
RM>WITH THE VALUE IN A VARIABLE .
Only if you promise to QUIT SHOUTING! Start with /lQB switch.
DECLARE FUNCTION FreeDiskSpace& ()
TYPE RegType
ax AS INTEGER
bx AS INTEGER
cx AS INTEGER
dx AS INTEGER
bp AS INTEGER
si AS INTEGER
di AS INTEGER
flags AS INTEGER
END TYPE
FUNCTION FreeDiskSpace&
InRegs.ax = &H3600
InRegs.dx = 0
CALL interrupt(&H21, InRegs, OutRegs)
bytes& = (OutRegs.cx * OutRegs.ax)
FreeDiskSpace& = bytes& * OutRegs.bx
END FUNCTION
* DeLuxe2 1.25* #2989 * $ not found: A)bort, R)efinance, D)eclare bankruptcy
--- FidoPCB v1.1 [FF019]
* Origin: Sound Advice - 24 nodes (816)436-4516

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