Solved

Format a floppy disk

Posted on 2001-06-06
10
265 Views
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.
0
Comment
Question by:snb2001
10 Comments
 

Expert Comment

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

Expert Comment

by:SunBow
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.
0
 

Expert Comment

by:rasaraja
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,
rasaraja
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 24

Expert Comment

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

Go here for 90% of the assembler code:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=progsoftgen&qid=20129928
Note: you need not read disk, or loop to all sectors, but should initialize buffer to zero
0
 

Author Comment

by:snb2001
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.
0
 
LVL 24

Expert Comment

by:SunBow
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.
0
 
LVL 24

Expert Comment

by:SunBow
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.
0
 
LVL 24

Expert Comment

by:SunBow
ID: 6303977
done?
0
 
LVL 54

Expert Comment

by:nico5038
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7506204
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

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

Suggested Solutions

Title # Comments Views Activity
C# code editing and collaboration 3 131
C# Error - Add Failed 12 93
Modify a small python script 19 116
VbScript to countdown to New Year's Day 6 65
This is an explanation of a simple data model to help parse a JSON feed
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

860 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