beautypg.com

Linker command define – Zilog Z80380 User Manual

Page 58

background image

Linker Command File

Linking Files

3–8

UM004001-COR1103

make a copy of an initialized RAM data section in a ROM address space, so that the RAM
may be initialized from the ROM at run time.

Syntax:

COPY <section> <address-space> [ AT <expression> ]

The <section> must be a control section name, and the <address-space> must be an address
space name. The optional AT <expression> is used to copy the control section to a specific
address in the target address space.

Example:

COPY bank1_data ROM or COPY bank1_data ROM at %1000

Linker Command DEFINE

This command is used for a link-time creation of a user defined public symbol. It helps in
resolving any external references (EXTERN) used in assembly time.

Syntax: DEFINE <symbol name> = <expression>

<symbol name> is the name of the public symbol. <expression> is the value of the public
symbol.

Example: DEFINE copy_size = copy top of usr_seg - copy base of usr_seg