Search:

Type: Posts; User: flp1969

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds; generated 10 minute(s) ago.

  1. Probably call *__imp_MessageBoxA(%%rip).

    Probably call *__imp_MessageBoxA(%%rip).
  2. No... the thread id isn't a pointer per se. Look...

    No... the thread id isn't a pointer per se. Look at the example. The thread id is a value returned by pthread_create (pointed in the first argument) and isn't sequential as in 0,1,2,3...!

    If you...
  3. Lots of error assuming wrong things: 1 - Each...

    Lots of error assuming wrong things:

    1 - Each time pthread_create is called it can fail (return a value different of 0);
    2 - Thread ID isn't a sequential value. It can be anything;
    3 - A pointer...
  4. mov eax,0x10 isn't, let's say, mov al,0x10,...

    mov eax,0x10 isn't, let's say, mov al,0x10, because, in x86-64 mode, updating 32 bits aliases (E??) of 64 bits registers (R??) automatically zero the upper 32 bits (See Intel SDM or AMD development...
  5. NASM "optimizes" some instructions... Example,...

    NASM "optimizes" some instructions... Example, sometimes xor rax,rax is optimized to xor eax,eax (do the same, but smaller). GAS isn't an optimizing assembler..
    I prefer NASM because of this and it...
  6. I didn't say ALL instructions opcodes are...

    I didn't say ALL instructions opcodes are different...
  7. There are some differences between 32 bits code...

    There are some differences between 32 bits code and 64 bits code... For example:


    0x40 - inc eax ; i386
    0xFF 0xC0 - inc eax ; x86_64
    In x86-64 mode 0x4x is a REX prefix,...
  8. Replies
    6
    Views
    1,198

    My policy: In case of doubt, DRAW! 16473

    My policy: In case of doubt, DRAW!

    16473
  9. Replies
    11
    Views
    1,084

    I suppose that these "sensors" are lasers which...

    I suppose that these "sensors" are lasers which have the beam interrupted by the object... But this isn't a good project and something is missing... with 6 pilars you should have 5 sensors:


    ->...
  10. Replies
    11
    Views
    1,084

    Let say your sensors are connected to bits 0 to 2...

    Let say your sensors are connected to bits 0 to 2 of a register called IR:

    // Do something... (here I'll pass sensors data to the functions).
    extern void not_in_weightbridge(unsigned int);...
  11. Replies
    6
    Views
    550

    "C only knows about binary at the machine level"...

    "C only knows about binary at the machine level" means: There is no "decimal format"!
  12. Replies
    5
    Views
    21,551

    Use 'statvfs' syscall.

    Use 'statvfs' syscall.
  13. And, clock() doesn't measure cpu clock cycles.

    And, clock() doesn't measure cpu clock cycles.
  14. Let me understand this: You want to do a GUI...

    Let me understand this: You want to do a GUI application for a keyboard because you want to use the mouse instead of pressing keys?
  15. AND... local objects aren't initialized to zero...

    AND... local objects aren't initialized to zero by default... Only static local objects OR global objects... This:


    int a[10]; // local
    Isn't initialized... This:


    int a[10] = { 0 }; ...
  16. And, NO... this: int f( ... ) { int b = 0;...

    And, NO... this:

    int f( ... )
    {
    int b = 0;
    ...
    }
    Here b is initialized at RUNTIME because it is on stack OR in a register...
    The compiler can discard this object only if the...
  17. I don't get where you are trying to reach......

    I don't get where you are trying to reach... this:

    int f( ... )
    {
    int a[10];
    int n;

    n = g( a );
    if ( ! n )
    return 0;
  18. Replies
    8
    Views
    1,178

    Yep, but it is nice to know that multi byte...

    Yep, but it is nice to know that multi byte charsets can be traced back to Dennis Ritchie and Ken Thompson in the 70's (UNICODE was designed based on experiences made by XEROX in the 80's -- as...
  19. Replies
    8
    Views
    1,178

    There are routines in wchar.h to convert to/from...

    There are routines in wchar.h to convert to/from wchar_t to/from local charset, but you have to set locale properly, typically:


    setlocale( LC_ALL, "" );
  20. Replies
    8
    Views
    1,178

    Well... working with single byte charsets isn't a...

    Well... working with single byte charsets isn't a real problem with portability... nowadays we have a difficult one: In Windows you can work with WINDOWS-1252 charset (a modified ISO-88591-1 charset)...
  21. A small correction: void...

    A small correction:



    void voltage(t_SenseDataRaw *k, float *adv) {
    uint16_t *p = &k->Vbias; // the first member (A pointer!).
    for (int i = 0; i < 4; i++)
    adv[i] = p[i] * 3.3...
  22. Simplier: // Circular single linked list...

    Simplier:



    // Circular single linked list test.

    #include <stdio.h>
    #include <stdlib.h>

    // Macro to initialize a list.
  23. Replies
    5
    Views
    1,078

    AND... free works (do nothing) if the pointer is...

    AND... free works (do nothing) if the pointer is NULL (ISO 9899 7.20.3.2 2)... But if the pointer isn't NULL and not allocated by the functions above, then the behavior is unspecified (probably a...
  24. Ahhh... yep, I'm talking about x86! x86 uses...

    Ahhh... yep, I'm talking about x86!

    x86 uses the static approach for conditional jumps because they are, mostly, used in loops. And with static behavior it is easy to avoid mispredictions: "if"...
  25. This is talking about "dynamic predictors", not...

    This is talking about "dynamic predictors", not static ones... Instructions as Jcc use "static" branch preditor algorithms. Only indirect jumps use dynamic...
Results 1 to 25 of 498
Page 1 of 20 1 2 3 4