Search:

Type: Posts; User: grumpy

Search: Search took 0.03 seconds.

  1. Replies
    16
    Views
    5,492

    The enum trick (or hack) is used to attach a name...

    The enum trick (or hack) is used to attach a name to a value, which can be checked by the compiler


    enum {size_reg = 16, size_mem = 256};

    int main()
    {
    int regs[size_reg],...
  2. Replies
    16
    Views
    5,492

    Oh, okay. That's because size_reg is a variable...

    Oh, okay. That's because size_reg is a variable (and your arrays are therefore VLAs). Try making the sizes visible to the compiler at compile time (e.g. #define size_mem 256 or [slightly more...
  3. Replies
    16
    Views
    5,492

    That's one way.

    That's one way.
  4. Replies
    16
    Views
    5,492

    All of the bit fiddling techniques in main(), and...

    All of the bit fiddling techniques in main(), and the magic hex values, mean that your code is assuming a particular endianness on your target machine. If your target machine is a different...
Results 1 to 4 of 4