kit posting, what I'm working on

Andy Heffernan ahh at glyph.UUCP
Sat Dec 15 12:32:45 AEST 1990


In article <1990Dec14.060413.13515 at i88.isc.com> botton at i88.isc.com (Brian D. Botton) writes:
[...]
>  This gets you a COFF binary that is set up to run at absolute address
>0x0800000, which is where the ROM is.  It also limits the size to 32k,
>which is the max ROM you can have.  Now all you have to do is make sure
>your code is completely self contained, i.e., no printf's.

I think you'll have to pay special attention to un-initialized data
blocks, like your stack, any global variables you might have, etc.
You can't modify your pre-initialized data, naturally.
You'll probably need your own startup code, too.

>  There is one thing you have to do is strip off the COFF header.  Through
>experimentation, I've found you need to chop off the first 168 bytes from
>the file rom.  Then you need to program to EPROM chips, one with even bytes,
>the other with odd bytes.

You probably know this already, but there's more to COFF than the header
and your data.  Your data is sitting in the middle of all kinds of goop
(although the tail end might be gone if you've stripped the binary).
It's pretty durn easy, though, to write a program that extracts the
.text and .data section data from a COFF object.  See ldfcn(4).

-- 
-------------------------------------------------------------------------
  Andy Heffernan					uunet!glyph!ahh
"`Ha ha ha,' taunted Judy.  `Your scaly exterior seems to be failing you!'"



More information about the Comp.sys.att mailing list