Yeah yeah, I suppose I’m just going to have to get used to it now with Apple moving to x86, but that doesn’t mean I have to like it. I’m talking about the wrong endianness, of course: little-endian. That’s what the problem was with the directory recursion; I was reading the cluster address as big endian, not spastic endian. Grr.
For those who aren’t familiar with this issue, it’s quite simple. Our understanding and use of mathematics is big endian. You write your “tens” digit before your “ones”. So the current year would be written 2006. Duh. But oh no, that’d just be too bloody obvious for Intel; they decided to reverse the byte order of all their addressing. So today’s year is essentially written as 6002. Real clever Intel. Brilliant. You’ve single-handed created a significant portion of communication bugs and performance failures, all by yourselves. Have a cookie.
What is the “true” endianness is of course an endless flame war on Slashdot and such places. There are arguments for both sides, but the bulk are most definitely in favour of big endian. The example above is an excellent example; people use big endian naturally. It’s what we’re brought up on.
And don’t even get me started on even more bizarre endianness, where they swap every 16 instead of 8 bits, or only swap even-odd bytes pairs. Eegads!
Anyway, directory recursion’s now working fine. Hooray! Snippet included, of course.
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 96
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: AC
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 128
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: CODE
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:491 (FATOpenFile) - Current block logical address: 33866240
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 0
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:528 (FATOpenFile) - Entry for current or parent directory.
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 32
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:528 (FATOpenFile) - Entry for current or parent directory.
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 64
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: COMMAND TXT v222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 96
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: IDE1
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 128
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: Ai
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 160
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: INTERC~1LOD
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 192
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: Ai
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 224
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: INTERC~1MAP
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 256
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: IO C 213222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 288
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: IO H 216222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 320
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: IO OBJ 220222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 352
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: LCD C 222222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 384
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: LCD H 225222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 416
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: LCD OBJ 227222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 448
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: MAIN C 231222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 480
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: MAIN OBJ 235222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:491 (FATOpenFile) - Current block logical address: 1028608
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 0
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: AO
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 32
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: OPTIONS TXT
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 64
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: PRJ PRO 243222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 96
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: PRJ WSP 246222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 128
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: AP
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 160
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: PRJ~1 ZDS
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 192
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: Bk
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 224
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: P
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 256
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: PRJ_DE~1LIN
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 288
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: AP
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 320
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: PRJ_DE~1MAK
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 352
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: SLEEP C 261222250a3a3
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:514 (FATOpenFile) - Current offset: 384
/Users/wadetregaskis/Documents/School/Fifth Year/ENP/Project/FATShell/FATDriver.c:534 (FATOpenFile) - Current condensed directory entry: SLEEP H 263222250a3a3
Successfully opened "/Code/Sleep.h".
Successfully closed "/Code/Sleep.h".