Compiler Option

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
897件の閲覧回数
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 ?

ラベル(1)
タグ(1)
1 解決策
758件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
759件の閲覧回数
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 件の賞賛
返信
758件の閲覧回数
Brax02
Contributor III

ok thanks a lot !

758件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信