Re: A92: BSS + New feature for Fargo?


[Prev][Next][Index][Thread]

Re: A92: BSS + New feature for Fargo?




Anton Ivanov wrote:
> 
> What is the difference between declaring variables in the code and in BSS?
> 
> fi97 Guillaume POTHIER wrote:
> 
> > >
> > > Does anybody know how to use the BSS feature of Fargo II?
> >
> > Here is a small piece of prog using BSS
> >
> > ;****************************************************************************
> >         BSS
> > RegsV           ds.l    15      ;d0-d7/a0-a6
> >         CODE
> >
> >         xdef    _main
> >
> > _main:
> >         movem.l d0-d7/a0-a6,RegsV

As I understand it, the BSS block is allocated by Fargo when you run the
program. The variables are used in exactly the same way. The bottom
line: you save memory :)

Something I just discovered is that the BSS block isn't cleared when
it's allocated. This can give some hard-to-find bugs if you're not
careful :(  Maybe an idea for the next Fargo, David?


Follow-Ups: References: