Hi, and thx :)
I tryed this
.area DATA
_varOne:
.ds 1
_lcdchar:
.db 1
.area CODE
.include "fcnt.inc"
_prog:
; init port D
MOV PD_DDR, #0b111111....
...
, but the flasher complains about
"Determine FLASH area
Writing Intel hex file Address 0002 is out of range at line 8"
I guess my problem is in the way i am making this:
i have a main.c that calls prog()
and a fonctions.asm , containing the code .. and some data .
Do I have "really" to declare this variable in the .c file ?
Best regards
Le 06.09.2014 00:54, Erik Petrich a écrit :
> On Fri, 5 Sep 2014, [email protected] wrote:
>
>> Hello
>>
>> SDCC : stm8 3.4.1 #9068 (Sep 5 2014) (Linux)
>>
>> I dont see the difference between this ( A and B ) :
>>
>> I have _lcdchar declared by :
>>
>> .area OSEG
>> _varOne:
>> .ds 1
>> _lcdchar:
>> .db 1
>>
>> .area CSEG
>>
>> .
>> .which seems not working, at least the way variables
>> are to mee in assembly ...
>> .
>
> Assuming you aren't using a custom linker script, I think you should
> use
> areas DATA and CODE instead of OSEG and CSEG. In particular, OSEG is
> usually used to hold temporary values in functions that do not call
> other
> functions because all of the OSEG areas overlay (the O in OSEG) each
> other. So if your delay_m function also uses a variable in OSEG (or
> calls
> some other function that does), this other variable is likely to be at
> the
> same memory location as lcdchar, and so lcdchar is overwritten.
>
> Erik
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user