[Coco] Fwd: failure notice

Bill Pierce ooogalapasooo at aol.com
Tue May 12 02:40:36 EDT 2015


Gene, I haven't a clue why the email didn't go through, I used the same address and method I always use... probably some "Linus thing".... security blanket and all that... (j/k)but anyway...

The problem is that when I assemble (or compile, in the case of C sources) the sources to CK's clib.l, EVERY resulting ROF has 2 extra zeros at the end.

Apparently, when trying to compile a C file using the merged library, the linker (and any other file made to use ROFs), reads the header, which is WAAAY different from a standard OS9 header, and get the ROF's size, then uses this size to calculate where the next header should be... So the zeros must not be figured into the size as the linker and CK's "lib" which separates C libraries, reports that the file is not an valid ROF.
In fact, CK's "lib" separates the first file in the library then pukes on the second because it can't find the header, so it assumes the library is not an ROF. It will separate CK's clib.l fine.
I have checked the assembled files against the library files that I've been using and they are byte-for-byte identical except for those two bytes at the end. Even the headers are the same.

I tried using RMA and C.Asm, and both produce the same result. The resulting rofs, when merged, should make a valid lib file, but the linker says no, and aborts if I use the lib in a C compile.

And I have CK's notes on the contents of the ROF header. It's much more complex than a standard OS9 modules header. The ROF header contains all the info about the file's global and dp variables as well as the pointers, so that the linker can tie them all together later when used in module. In a C library, these ROFs are left raw and just merged so the linker is not involved until the library is used.

I want to make some "custom" libraries, but until I solve what's adding the "00 00" to the end, it ain't happenin'

 

 


Bill Pierce
"Today is a good day... I woke up" - Ritchie Havens
 

My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com


 

 

-----Original Message-----
From: Gene Heskett <gheskett at wdtv.com>
To: coco <coco at maltedmedia.com>
Sent: Tue, May 12, 2015 1:51 am
Subject: [Coco] Fwd: failure notice


Not a clue Bill.  the only problem I
ever had with home made libraries 
was merge related, and c.link does not make
but one pass while resolving 
linkages.  

Translation: if you use function "a"
from a module, then later use 
function "b" from the same module, you will have
to link another copy of 
that module later in the library.  I recall that an os9
module starts 
with $87CD, and a library module starts with $62CD (I think) but
the 
rest of the module is pretty straight os9.

Isolate it down by looking at
the assembled modules and see if the 
surplus 2 $00's are there.  If they are,
then backup and look at the src 
code being fed to the assembler, there should
not be anything that would 
make output after the emod,end statements. 

The
size is stored in the header, does it fit with or without the $00 $00 
on the
end?

Another person to query would be Willard, he worked on c.prep, but I

think the rest of it, ansifront, c.opt,and c.opt2, and the c.pass1, 
c.pass2
stuff is close to 25 years old.  Bit rot?

If worse comes to worse, one could
probably knock up an assembler built 
routine that would read the header, then
copy only the bytes the header 
says it is to a new file, thereby getting rid of
the 2 byte surplus?

> Bill Pierce
> "Today is a good day... I woke up" -
Ritchie Havens
>
>
> My Music from the Tandy/Radio Shack Color Computer 2 & 3
>
https://sites.google.com/site/dabarnstudio/
> Co-Contributor, Co-Editor for
CocoPedia
> http://www.cocopedia.com/wiki/index.php/Main_Page
> E-Mail:
ooogalapasooo at aol.com

Cheers Bill, Gene Heskett
-- 
"There are four boxes to be
used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that
order."
-Ed Howdershelt (Author)
Genes Web page
<http://geneslinuxbox.net:6309/gene>


-------------------------------------------------------
Cheers,
Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap,
ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt
(Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

-- 
Coco mailing
list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco

 


More information about the Coco mailing list