This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BSS [was compile error when using newer version ecos configurat ion tool]


It was a dark and stormy night.  Suddenly
"Chris Gray" <chris.gray@acunia.com> began to type furiously:

> Alex Schuilenburg wrote:
> 
> > I asked the compiler folks around here.  The answer I got was that
> >   "bss" was actually the mnemonic for the IBM/370 instruction that
> > zero'ed a section of memory, and hence how the naming of the section was derived.
> >
> > No-one can recall what the mnemonics actually stood for though - not old enough ;-)

Well, I qualify for this one ;-)

Back in the olden days when everything was written in assembly language,
evaluating arithmetic expressions was really hard; that's why FORTRAN originally
constrained array subscripts to look like "n*k+i": you could leave out parts but
if present, they must be written in this order.

Anyway, writing in assembly language itself was a bit of a challenge because the
assembler didn't allow expressions just anywhere.  Where today, you'd write
something like:

	MyLabel: . = . + 500

to reserve some memory, the assembler had to provide a special opcode:

	MyLabel bss 500

that defined "MyLabel" as a "block started by symbol" and "MyLabel" was
addressed as the first location in the memory area.  There was also a "BES" that
was "block ended by symbol":

	MyLabel bes 500

that assigned "MyLabel" to the last (last + 1? I don't remember) location of the
block.

Thank goodness that everything is not a special case these days.

Cheers!

---------------------------------------------+-----------------------------
Tommy Reynolds                               | mailto: <reynolds@redhat.com>
Red Hat, Inc., Embedded Development Services | Phone:  +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA  | FAX:    +1.256.837.3839
Senior Software Developer                    | Mobile: +1.919.641.2923

Attachment: msg00191/pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]