cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean variable segment in STVD

jdf25252
Associate II
Posted on June 14, 2011 at 17:20

Here's a question for the STVD & Cosmic gurus!  Since bit instructions in the STM8 do not utilize the zero page addressing I wanted to move the ''.bit'' section out of the ''Zero Page'' and into ''Ram'' so I'd have more room down there.  In STVD, I cannot make any change to the ''.bit'' section.  Is there a way to allow changes? 

As a side note, I'd sure like to be able to modify the default segment/section mapping.

jdf

#cosmic-link-linking-stvd
4 REPLIES 4
luca239955_stm1_st
Senior II
Posted on June 15, 2011 at 09:17

Hi,

the Cosmic linker gives the possibility to link .bit outside of page zero for stm8: if this is not supported by STVD (I haven't checked), just use the semi-automatic option for the linker file generation and add by hand something like

+seg .bit -b 0x200     # bit segment outside the zero page

Regards,

Luca

jdf25252
Associate II
Posted on June 15, 2011 at 16:37

Thanks Luca

I'll do it that way if it's not possible in STVD.

jdf

luca239955_stm1_st
Senior II
Posted on June 17, 2011 at 10:45

doing some trials I realized my answer was possibly confusing: if you want to put the .bit segment at address 0x200 you must write

+seg .bit -b 0x200:0     # bit segment outside the zero page

jdf25252
Associate II
Posted on June 17, 2011 at 19:19

yeah, it is confusing

+seg .bit -b 0x800 -m 0x20 -n .bit -id

will put the booleans at 0x100

A few revs back STVD didn't allocate the bits at all so I created a

Boolean segment from 0x800 to 0x81f

and a .bit section with a -id option

these older project files carry over but new ones force the bits into zero page.

INTERESTING

btw thanks a lot for the info I'll have to try 0x100:0 instead of 0x800

jdf