// File: 10f222_g.lkr
// Generic linker script for the PIC10F222 processor

#DEFINE _CODEEND _DEBUGCODESTART - 1
#DEFINE _CEND _CODEEND + _DEBUGCODELEN
#DEFINE _DATAEND _DEBUGDATASTART - 1
#DEFINE _DEND _DATAEND + _DEBUGDATALEN

LIBPATH .


#IFDEF _DEBUGCODESTART
  CODEPAGE   NAME=page       START=0x0               END=_CODEEND
  CODEPAGE   NAME=debug      START=_DEBUGCODESTART   END=_CEND        PROTECTED
#ELSE
  CODEPAGE   NAME=page       START=0x0               END=0x1FF                    
#FI

CODEPAGE   NAME=.idlocs    START=0x200             END=0x203          PROTECTED 
CODEPAGE   NAME=.config    START=0xFFF             END=0xFFF          PROTECTED 

DATABANK   NAME=sfrs       START=0x0               END=0x8            PROTECTED


#IFDEF _DEBUGDATASTART
  DATABANK   NAME=gprs       START=0x9               END=_DATAEND     
  DATABANK   NAME=dbgspr     START=_DEBUGDATASTART   END=_DEND        PROTECTED
#ELSE //no debug
  DATABANK   NAME=gprs       START=0x9               END=0x1F           
#FI


SECTION    NAME=PROG       ROM=page            // ROM code space
SECTION    NAME=IDLOCS     ROM=.idlocs         // ID locations

