Compiler Option

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiler Option

Jump to solution
895 Views
Brax02
Contributor III

Hello,

 

I have a basic question about the compiler options

 

in my PRM file I have the following configuration about the Z_RAM direct access

 

Z_RAM                    = READ_WRITE   0x0080 TO 0x00FF;

 

DEFAULT_RAM,                        INTO  Z_RAM;

etc..

_DATA_ZEROPAGE,                     /* zero page variables */

MY_ZEROPAGE                         INTO  Z_RAM;

 

 

in main.asm

 

MY_ZEROPAGE:  section

abcd:  DS.B  1

 

main: section

LDA abcd           ; 3 bytes used in memory (2 bytes for the addresses)

LDA abcd.B        ;2 bytes used in memory (1 bytes for the addresses)

 

 

How is it possible to configure the compiler to do the difference between a direct address and a long address by itself to optimize the code size ?

Labels (1)
Tags (1)
1 Solution
756 Views
bigmac
Specialist III

Hello,

The PRM file, which identifies the addresses of the various section names, is accessed by the linker, but not the assembler.  The assembler will normally assume that all variables have 16 bit addresses, by default.  Any variables to be specifically located within zero page RAM can be identified with the assembler directive XREFB.

Regards,

Mac

View solution in original post

0 Kudos
Reply
3 Replies
757 Views
bigmac
Specialist III

Hello,

The PRM file, which identifies the addresses of the various section names, is accessed by the linker, but not the assembler.  The assembler will normally assume that all variables have 16 bit addresses, by default.  Any variables to be specifically located within zero page RAM can be identified with the assembler directive XREFB.

Regards,

Mac

0 Kudos
Reply
756 Views
Brax02
Contributor III

ok thanks a lot !

756 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

can you please upload your demo project to showcase us your issue? thanks!

0 Kudos
Reply