Monday, August 9, 2010

Translation Limits

The term "translation limits" refers to the minimum numbers of various element that a C compiler must be able to handle. These include such things as the length of identifiers, levels of nesting, number of case statements, and a number of member allowed in structure or union. C99 has increased several of these limits beyond the already generous ones specified by C89. Here are some examples:

Limit                                                                       C89      C99
Nesting levels of blocks                                         15        127
Nesting levels of conditional inclusion                  8          63
Significant characters in an internal identifier       31        63
Significant characters in an external identifier      6          31
Members of a structure or union                         127      1023
Arguments in a function call                                31        127
Numbers of case statement in switch                 257     1023

Ref: C, The Complete Reference by Herbert Schildt (Fourth Edition)


Some good c-examples


Saturday, March 13, 2010

NAND Types

There are various types of NAND Flash available. Bare NAND chips, SmartMediaCards, DiskOnChip.
SmartMediaCards are bare NAND chips covered by thin plastic. They are very common in digital cameras and MP3 players. The card itself contains nothing smart at all. It gets smart by software.
DiskOnChip is NAND Flash with additional glue logic as a drop in replacement for NOR Flash chips. The glue logic provides direct memory access to a small address window, which contains a boot loader stub, which loads the real boot code from the NAND device. The logic contains also control registers for the static NAND chip control lines and a hardware ECC generator.