Crossware

Table of Contents        Previous topic       Next topic       

C COMPILER->Compiler Command Line Options->Small Memory Model Direct Addressing (/AD)

This option is ignored unless the /AS option is also used.

The /AD option tells the compiler to place all objects that it would otherwise place in idata space, in data space.

This option should be always be used in conjunction with the small memory model if the internal ram does not extend above 7F hex.  It is more efficient because the compiler knows that it can directly access objects in ram rather than indirectly accessing them via the @R0 or @R1 addressing modes.

It may also be possible to use this option even if internal ram extends above 7F hex. providing all variables, static stack frames, etc can be accommodated in the memory up to 7F hex. This will leave 80 hex. upwards for run time stack.