-M (-Mb, -Ms, -Mt): Memory Model

Group

CODE GENERATION

Scope

Application

Syntax
  -M(b|s|t)
  
  
Arguments

b: banked memory model

s: small memory model

t: tiny memory model

Default

-Ms

Defines
  __BANKED__
  
  
  
  __SMALL__
  
  

  __TINY__
  
  
Pragmas

#pragma CODE_SEG: Code Segment Definition

Description

The Compiler defaults to the small memory model. The small memory model assumes that all pointers and functions have 16-bit addresses, and requires code and data to be located in the 64-kilobyte address space. Specifying the small memory model when -MMU is enabled causes the Compiler to consider any __far function accessible only through the code banking mechanism (i.e., using a CALL instruction). The tiny memory model assumes that data pointers have 8-bit addresses unless explicitly specified with the keyword __far. The banked memory model is available only when -MMU is enabled. Memory banking allows you to place program code into at most 256 pages of 16 kilobytes each, but does not affect data allocation. When using banked mode, the compiler considers all functions paged functions unless otherwise specified. Refer Memory Models.