![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
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! |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Oct 2004
Posts: 3
Rep Power: 0
![]() |
Try looking into Assembly.
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Sep 2004
Location: JHB , South Africa
Posts: 79
Rep Power: 5
![]() |
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! |
|
|
|
|
|
#4 | ||
|
Programmer
|
Quote:
Quote:
__________________
http://exponentialab.blogspot.com/ - w00t, I've started a blog! |
||
|
|
|
|
|
#5 |
|
Programmer
Join Date: Oct 2004
Posts: 67
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
"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." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|