That's right, I suppose [I]"a = y" will become "y[a] = i" then? I don't see any toher options. So the codeBackwards will beCode:Register[0] = *( ( unsigned char* ) ( IOBASE + 0x10 ) );Or not?Code:( int ( IOBASE + 0x10 ) ) = unsigned char;
That's right, I suppose [I]"a = y" will become "y[a] = i" then? I don't see any toher options. So the codeBackwards will beCode:Register[0] = *( ( unsigned char* ) ( IOBASE + 0x10 ) );Or not?Code:( int ( IOBASE + 0x10 ) ) = unsigned char;
I'm sorry to have to say this, but I think you need to read chapters 1, 2 and 3 or so of your C programming book - you are currently trying to swim in the deep end, and you can't even swim in the shallow end with floating aids.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Thank you for your compliment, you are right though. This code will be my first code ever written in program languace. Actually yesterday I kept trying to find the right code. I believe this is itThank you for being critic on my work. It get's the best out of meCode:*( (unsigned char*)( IOBASE + 0x10 ) ) = ddr;
Now we're going somewhere. Is that working right for you?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
This is not what I would term 'Beginner's material.' Perhaps you might want to start with the fundamentals of pointers and such before you try to tackle something like this. Even to fairly experienced programmers this line of code is quite ugly.Code:*( (unsigned char*)( IOBASE + 0x10 ) ) = ddr;
I agree - this is NOT beginner C, which is why I suggested to the OP to re-read the first few chapters in the C book.
Yes, if you read back to my original proposal, I was actually intending to hide all those casts inside a macro [at least, that way, the code looks a bit tidier]. For some reason or another the OP decided to not follow that pattern.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.