In a 32 bit processor if I want to access 8 bit or 16 bit data from RAM, how do processor manage?
Does it access 4 bytes and disposes remaining three?
Note: This is regarding ARM processor.
...
Type: Posts; User: Juganoo
In a 32 bit processor if I want to access 8 bit or 16 bit data from RAM, how do processor manage?
Does it access 4 bytes and disposes remaining three?
Note: This is regarding ARM processor.
...
Help wanted for writing most optmized "C" code for following arithemntic calculation.
y = (x * 63.66667)/128
There is one floating point operation. But this needs to be converted to decimal...
Which one do you think is optimized?
Juganoo
Hello All,
I have following snap of code. If I build the same in VC6++ I get following assembly output.
124: val = Count(x);
00401068 mov ecx,dword ptr [ebp-4]
0040106B shl ...
Hello,
I have an application running in embedded system, developed in C. We are using small memory model.
We are hardly allocating memory using DMA( i.e using malloc).
I have been told to...
There will be some library function whose return values are hardly taken care. Best example would be printf.
During programming, we never catch its return value.
Similar to printf, can I ignore...
I am working on Borland C++ 4.0 version compiler and Win NT system.
If I add any standard library function very first time to my program, size of the exe file increases significantly, whereas,...
So you mean to say, If I rearrage the strcuture following way then it will give size as 8 only.
typedef struct Element
{
BYTE ID;
BYTE Type;
BYTE Ptr;
BYTE Status;
INT16 Cnt;
INT16 Idx;
Please see following snap code. Sizes of individual members of structure are correct but when I print size of structure it gives two bytes extra.
#define BYTE unsigned char
#define INT16 unsigned...
But I also have some code after first if condition. In your case, I do not think, else will execute upon TRUE on first if condition and FALSE on second if.
if ( val[0] == '-' ) {
if (...
bigtamscot,
In order to execute error = somevalue2, condition1 and condition2 both need to be true.
In your posted code, error = 2 executes only if condition2 is TRUE and condition1 is FLASE.
...
I have following code snap.
if ( condition1)
{
// some lines of code
error = somevalue1;
if ( condition2 )
{
// some lines of code
...
vVv, what is C99?
J
Post the code, we could help u..
Juganoo
Do Borland C 4.0 support inline function?
If yes, does it take it as oder or request?
Thanks,
Juganoo
How to interchange two number without using temporary veraible?
Juganoo
Hello,
You can share good and bad C programming proctices as per your perspective. If anybody know good article on web about this, let me know.
I would like to know, whether following C coding...
How do I know that CHAR_BIT is not a standard definition?
Thanks for ur promt reply.
Juganoo
what is CHAR_BITS ?
Given a compiler file( .exe file) how do I know, whether compiler is 16 bit or 32 bit?
I have BC4.0, is it 16 bit compiler or 32 bit compiler?
What is difference between bcc.exe bcc32.exe?
...
Hello,
Is there any good book or web site( besides cprogramming.com) on C code optimization?
Juganoo
Hello,
I am developing a routine which has mutiple returns. Some of the returns are in deep nested loops.
Is it bad programming practice to return from deep nested loops? If yes, Is there any...
Hello All,
I am using Borland C++ but we do not have copy of manual. Can anybody provide me with URL?
Basically I am looking for library functions, debugging(with good GUI if possible) and...
Thanks a lot.. It did work.
But I would like to know, what exactly is literal? If it is beyond the scope to explain here. Your pointer somewhere in K and R or Shaum series C book would be enough....
Here is some more hint.
135: *(p+j) = k;
00401403 mov edx,dword ptr [ebp+8]
00401406 add edx,dword ptr [ebp-8]
00401409 mov al,byte ptr [k]
0040140C ...