China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 19:48
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » [Discussion] How to modify the contents and related information of specified sectors on a disk View 2,546 Replies 1
Original Poster Posted 2002-10-26 00:00 ·  中国 江西 南昌 电信
初级用户
老猫
Credits 151
Posts 11
Joined 2002-10-25 00:00
23-year member
UID 58
Gender Male
Status Offline
I ran into the following problems while programming:
1、How can I tell whether a certain sector on the disk is occupied, and how can I search for and locate available disk space?
2、How can I safely move occupied sectors to available disk space (similar to Norton Speedisk)?
3、How can I keep a certain sector from being used by other programs (preferably not even readable)?
4、How can I add and remove bad cluster markers for a certain sector?
My knowledge is not broad, my level is not high, and my experience is insufficient. I ask all the experts here to enlighten me using Assembler/BASIC/C/C++.
Floor 2 Posted 2002-10-28 00:00 ·  中国 江西 吉安 电信
高级用户
★★
Credits 667
Posts 135
Joined 2002-10-25 00:00
23-year member
UID 62
Gender Male
Status Offline
To achieve the functions mentioned above, you must be quite familiar with the format used by disks to store files. Also, there are too many file formats now: fat12 fat16 fat32 ntfs, and different file formats have to be handled differently.
If it's only under DOS, it's somewhat easier to talk about.
I suggest you find relevant materials and study them.
In addition, the two articles I reposted, "Detailed Explanation of the Hard Disk Partition Table" and "Introduction to Hard Disk Partition Structure", can also be used as references.
As for how to implement it, you can look at the relevant contents in DOS interrupt calls.
================================= kickout
大功告成,打个Kiss!
Forum Jump: