daily discovery

Memory dump of new things discovered daily.

Thursday, March 31, 2005

Interrupt vectors, the NULL pointer, printf

  1. The first 256 words of an IA32 machine in memory are interrupt vectors - pointers to routines that handle interrupts. They reside in the first 1024 bytes of addressable memory. Its also called a dispatch table.
  2. char * ptr; (ptr = NULL) = 0; Whilst 0 and NULL are equivalent in pointer context, NULL's actual value is not guaranteed to be 0 (all bits zero).
  3. If you ever want to print a float such that trailing zeros are omitted, use %g.
Yet again brought to you by ni.

Cheers,
Steve


0 Comments:

Post a Comment

<< Home