8-bit byte array
8-bit byte array
Hello all,
I am new around here and am currently writting a FAT driver from the specs. I came across a part in it that said an array was (as the title says) an 8-bit byte array. How would you do this? Would just making an array of pointers work?
Thanks for your time.
Best Regards,
EDIT: I am working in 32-bit architecture. I am using C, and I am used to writting userspace application, so please cut me just a tiny bit of slack
I am new around here and am currently writting a FAT driver from the specs. I came across a part in it that said an array was (as the title says) an 8-bit byte array. How would you do this? Would just making an array of pointers work?
Thanks for your time.
Best Regards,
EDIT: I am working in 32-bit architecture. I am using C, and I am used to writting userspace application, so please cut me just a tiny bit of slack
Last edited by WookiePaw on Sun Nov 16, 2014 10:52 am, edited 1 time in total.
-
- Member
- Posts: 307
- Joined: Wed Oct 30, 2013 1:57 pm
- Libera.chat IRC: no92
- Location: Germany
- Contact:
Re: 8-bit byte array
What language do you want to use? What architecture are you working on? Without any of that (minimal) information, there is no way we can help.
Assuming you will probably use C or Assembly, this should tell you that have not the required (very good) knowledge you have to have to do anything OSdev-related.
Assuming you will probably use C or Assembly, this should tell you that have not the required (very good) knowledge you have to have to do anything OSdev-related.
Re: 8-bit byte array
Just edited the Original Post
Re: 8-bit byte array
Which bit of the spec are you talking about? Can you link to it (or quote it) telling us which bit you are having difficulty with?
-
- Member
- Posts: 307
- Joined: Wed Oct 30, 2013 1:57 pm
- Libera.chat IRC: no92
- Location: Germany
- Contact:
Re: 8-bit byte array
Even though this is not absolutely required, you should always provide a link to the docs. Any information that will help us to help you.iansjack wrote:Which bit of the spec are you talking about? Can you link to it (or quote it) telling us which bit you are having difficulty with?
Now, this question is exactly one Google-search away from an answer. Tip: you have to look for something that stores 8-bit-wide data on your development environment
Re: 8-bit byte array
The spec is FATgen103.doc. I was thinking of doing something like this:
u8int **Array[8];
Would that work for this instance? Thanks for the help guys!
PS: The refrence is from page 16, paragraph 1.
u8int **Array[8];
Would that work for this instance? Thanks for the help guys!
PS: The refrence is from page 16, paragraph 1.
- max
- Member
- Posts: 616
- Joined: Mon Mar 05, 2012 11:23 am
- Libera.chat IRC: maxdev
- Location: Germany
- Contact:
Re: 8-bit byte array
No, "8-bit byte array" most probably means a plain array of a type that has a size of 8 bits. What you just created there is an array containing 8 pointers to pointers to u8int'sWookiePaw wrote:The spec is FATgen103.doc. I was thinking of doing something like this:
u8int **Array[8];
Would that work for this instance? Thanks for the help guys!
PS: The refrence is from page 16, paragraph 1.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: 8-bit byte array
Considering you claim to have userspace experience, you would at least know what C type to use when you read a regular binary file.
Re: 8-bit byte array
That document is just saying that you read the sector into a buffer which is an array of bytes. Those bytes are the usual 8-bit bytes. (You might think that is redundant - it isn't.)
Re: 8-bit byte array
Ok, whoops. I though it was saying I need an 8-byte array of 8-bit items. Silly silly me
Anyway, thanks guys
Anyway, thanks guys