Format a floppy disk

Posted on 2001-06-06
Last Modified: 2010-04-17
I want to format a floppy disk in turboc such that it is not readable in DOS. please respond urgently. thanks.

I have managed to format the disk in turboc in such a way that it is unredable in dos using biosdisk.
now i want to write and read on the disk. what do i have to do becos i have already tried it with an
error- Bad ECC on disk read- with biosdisk function.
Question by:snb2001
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6159242
After normally formatting a disk delete the boot sector ( put some 0 ) and DOS could not read the disk normally.
LVL 24

Expert Comment

ID: 6160220
This is sector 0, it needs specific values for 1st and last bytes. Zeroing them should do the trick. errr,,

I misunderstand something.. what tools in turbo C will you use to access the disk to do the format anyway? Or to read it (diskette) afterwards? Odds are you want DOS or minimally the BIOS part, or are you good at implementing low level direct I/O?

For best chance at getting incompatibility, load up linux. MS-Dos won't accept anything done in linux world. See also, free-DOS, they likely have some utilities that are relevant, and could be placed on a FAT16 space where turbo can find & call them.

Expert Comment

ID: 6160348
Hi !

  Once u write something into the boot sector, DOS will ot recognise it.Use the harddisk writing interrupt to write to track 0 sector 1 and u are done.
hope that helps,

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 24

Expert Comment

ID: 6161153
That is any different or improved from any of prior comments?

Go here for 90% of the assembler code:
Note: you need not read disk, or loop to all sectors, but should initialize buffer to zero

Author Comment

ID: 6163424
I have managed to format the disk in turboc in such a way that it is unredable in dos using biosdisk. now i want to write and read on the disk. what do i have to do becos i have already tried it with an error- Bad ECC on disk read.
LVL 24

Expert Comment

ID: 6169129
You have to read it as it was written. If you disable dos|bios, then you cannot use it.

Your error sounds like error control, like Parity bits and CRC, Cyclic Redundancy. But at moment I forget what is ECC. I think the format operation was likely incomplete.
LVL 24

Expert Comment

ID: 6169379
;-)  Ah, you rewired your PC so electons called by subroutine form electromagnet perhaps?

ECC refers to the bits the hardware uses for error control. This is traditionally beyond any accessibility of s/w, for placing the computations in H/W is so much more efficient. So, easiest way to create ECC prob is to have physical damage on disk, either through bad h/w or perhaps a magnet may suffice.

Still, my guess is that you are not using same disk layout when reading it than you did when writing. This could happen I suppose if you tried to change sector length to an odd, say 756 bytes, then tried to read it back as if it was 912 bytes, when the system looks for headers, trailers, parity, etc, - it does not find them where they are suspected to be.  Note - ECC says it can have error AND still correct it, and this is the code not found.

I think your blocking factors are mismatched.
LVL 24

Expert Comment

ID: 6303977
LVL 54

Expert Comment

ID: 7466764

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.



Accepted Solution

modulo earned 0 total points
ID: 7506204
Finalized as proposed


Community Support Moderator
Experts Exchange

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Part One of the two-part Q&A series with MalwareTech.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question