Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 10th, 2004, 11:29 AM   #1
G.I.Josh
Programmer
 
G.I.Josh's Avatar
 
Join Date: Aug 2004
Location: Eastern U.S
Posts: 51
Rep Power: 5 G.I.Josh is on a distinguished road
Send a message via AIM to G.I.Josh
I put this in the C section because C seemed the most likely to support something like this. However, the solution can be in any language.

Is there any way of writing raw data to hdd? Now, I don't meen ignoring the file system or anything like that. I just want to know how to put raw 1's and 0's on the hdd.

*note that I don't meen their acsii equivelant*

Thanks,
Josh
__________________
http://exponentialab.blogspot.com/ - w00t, I've started a blog!
G.I.Josh is offline   Reply With Quote
Old Oct 10th, 2004, 4:34 PM   #2
Tuskony
Newbie
 
Join Date: Oct 2004
Posts: 3
Rep Power: 0 Tuskony is on a distinguished road
Try looking into Assembly.
Tuskony is offline   Reply With Quote
Old Oct 10th, 2004, 4:59 PM   #3
Ravilj
Programmer
 
Ravilj's Avatar
 
Join Date: Sep 2004
Location: JHB , South Africa
Posts: 79
Rep Power: 5 Ravilj is on a distinguished road
I am quite interested as to why you would want to do that since the possibility of corrupting data is very high. I would also vote assmebler for this and i dont think a simple interrupt will quite cover that :/

You no building a virus/malicious program are you? :/
__________________
Ravilj's OpenGL Terrain aka WinTerrain Last Updated: 17/01/2005!
Ravilj is offline   Reply With Quote
Old Oct 10th, 2004, 5:08 PM   #4
G.I.Josh
Programmer
 
G.I.Josh's Avatar
 
Join Date: Aug 2004
Location: Eastern U.S
Posts: 51
Rep Power: 5 G.I.Josh is on a distinguished road
Send a message via AIM to G.I.Josh
Quote:
I am quite interested as to why you would want to do that since the possibility of corrupting data is very high
For fun. To experiment. To learn from. Maybe make some file types of my own. But in general, just to increase my knowledge.

Quote:
You no building a virus/malicious program are you? :/
:ph34r: :ph34r: :ph34r:
__________________
http://exponentialab.blogspot.com/ - w00t, I've started a blog!
G.I.Josh is offline   Reply With Quote
Old Oct 13th, 2004, 10:47 AM   #5
mici
Programmer
 
Join Date: Oct 2004
Posts: 67
Rep Power: 5 mici is on a distinguished road
quite simply you shouldn't try to write bit by bit instead combine your bits into bytes simply and then you can use write/read routines instead of using fprintf and similar...
one thing though when you said you're not interested in their ASCI counterparts did you mean that you're not interested in writing ones and zeroes as characters to a file where each would take 8 bits or are you uninterested in collecting 8 diferent ones and zeroes to form a byte character...

ok that was confusing so to simplify if you wrote 191 bits to a file for an example
then the file wouldn't be readable because system can handle minimum 8 bits at
a time and any less is unacceptable (as far as i know), even when programing in
assembler you still need to form bytes and then handle them instead of just bits.

otherwise system integrity will be endangered and some remote nuclear reactor
controler will fail and then a meltdown will occur and the explosion will be so bright that the aliens from orion's belt will see us and they will come and make us their sex slaves and 43. 2df 342 2#$"# 234 safd 3
sorry i lost few bits.
__________________
coffee is my heroin.
mici is offline   Reply With Quote
Old Oct 13th, 2004, 12:10 PM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
"sorry i lost few bits. "

that was hilarious.

I agree on accumulating bits and writing them out as bytes... if not accumulating bytes and writing them out in kilobytes. You don't want to hammer resources with excessive file I/O.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:51 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC