Kusti, > 0013 A6s00 150 lda #>__str_0 > 0015 B7*00 151 sta *_main_sloc0_1_0 > 0017 A6r00 152 lda #__str_0 > 0019 B7*01 153 sta *(_main_sloc0_1_0 + 1) > > Fine but suspicious as both 'sta' instructions use the direct > addressing mode > Disassembling the final the S-record file confirms: > > E034: A6 E0 LDA #$E0 ; 224 > E036: B7 00 STA $00 ; 0 > E038: A6 98 LDA #$98 ; 152 > E03A: B7 01 STA $01 ; 1 > > this was compiled with the '--data-loc 0x100' command line switch which > lead me to the wrong conclusion the internal compiler generated variables > were stored on top internal registers. > > Compiling with '--data-loc 0x40' and '--data-loc 0x140', which both > result in identical code, confirms that the real problem is the addressing > mode which should be 'extended', or the compiler should give a warning > that the data-loc is out of range.
When you say identical, do you mean identical to each other or to the above? In other words is it still STA $00 or is it STA $40 ? Have you tried without --data-loc? Maarten ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user