AnsweredAssumed Answered

Compiler Option

Question asked by Brax02 on Jul 23, 2013
Latest reply on Jul 25, 2013 by Brax02



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;


_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 ?