BBS: Inland Empire Archive Date: 04-11-92 (11:30) Number: 132 From: RICHARD VANNOY Refer#: 122 To: JIM TANNER Recvd: NO Subj: A Shareware Timelock Conf: (2) Quik_Bas
JT>OK... so how do you know when/where a "blind spot" exists.? First you have to know how long the BIO.SYS file is. That can be obtained from reading the directory file size. Next you need to know how many 512 byte sectors are in a cluster (usually 1, 2 or 4). I don't know how to do this in QB, but it is available through an interrupt call. So, suppose BIO.SYS is 23,456 bytes and the cluster size is 2 sectors or 1024 bytes. Divide 23,456 by 1024 = 22.90 So the file takes 23 full clusters (since the next file to be written MUST go at the start of the NEXT cluster). So 23 * 1024 = 23,552 minus file size 23,456 ====== = 96 So there are 96 bytes "invisible" to DOS, at the end of cluster 23. Note that I have never done this. I am presuming from my knowledge of DOS and common sense and my limited knowledge of DOS interrupts that writing to those bytes is possible. If I'm correct, then I've done the easy part, the theory. Next would come learning enough to write the code. (Translation: I'm just thinking out loud, so don't come hollering to me if you try some of this stuff and it trashes your hard disk! <grin>) > MegaMail 2.1b #0:Support FREE software! Write it yourself! --- WM v2.01/91-0012 * Origin: Com-Dat BBS Hillsboro, OR. HST (503) 681-0543 (1:105/314)
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