• Advice on Pointer arithmetic please?
    Could anyone enlighten me on pointer arithmetic please? Assigning a constant is fine, but a warning is generated when using a variable. (The code does do what I expect though.) The warning is :...
  • User Stack Pointer Corruption with Double Precision Arithmetic
    When using C167 simulation and double precision arithmetic, I ran into a problem. Things didn't seem to be working properly, so I inspected the generated assembly and found that the user stack pointer...
  • unexpected results in integer arithmetics
    Hello experts, to avoid a division, I use integer arithmetics. The unsigned int x which is in the range of 2000 is first multiplied by a number s which is 2048 plus/minus 1000 and then shifted by 11...
  • Undesired pointer conversion
    I am calling an assembly function from C. The prototype explicitly declares a xdata pointer parameter, foo(unsigned char xdata *buffer). Likewise the definition explicitly declares xdata pointer parameter...
  • Hexadecimal Arithmetic
    I want to carry out following Hexadecimal Arithmetic operation using C code Multiplication...................................... char A[2] = { 0x01, 0x02}; char B[2] = { 0x03, 0x04}; I want...