🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1323

Help. Lattice & UnHunk

#1323
From: Greg Deuerling
Date: Mon, 18 Sep 1989 13:58
47 lines
1935 bytes
Has any one out there used a program called UNHUNK posted by Eric Black a 
few years ago ?  I've been trying to use UNHUNK & LATTICE 5.0 to write
romable code for a 68000 project I have been working on.  My test program is
a very simple one, but I get errors from UNHUNK when I try to use it.

test.c :

void main()
{
	int	*x;
	x = (int *)0x60021;
	*x = 0x0f;
}

I compile with "lc -L test.c", and I use UNHUNK as "unhunk -p test test.out".
UNHUNK generates the following :

Hunk 0, type CODE, size 2412
Hunk 1, type CODE, size 40
Data Hunk size 63 doesn't match header (217)
Hunk 2, type DATA, size 252
Assigning hunk load addresses:
Hunk 0 (CODE) load address 0x0
Hunk 1 (CODE) load address 0x96C
Hunk 2 (DATA) load address 0x994
Section    Origin      Size(bytes)
 CODE      0x0           2452 (0x994)
 DATA      0x994         252 (0xFC)
 BSS       0xA90         0 (0x0)
Done
1 errors encountered

Why is the output so long, I would think that test.c would be less than 
100 bytes (I compiled the same test.c with UNI-WARE on a VAX and the output
was around 45 bytes).
Am I compiling wrong ??? Should I be linking differently ???
I'm somewhat a beginner at all of this, so if there is a better way to
use LATTICE to produce romable code let me know.

Are there any books or manuals sold that would give me the information
to write a program that would strip out all of the scatter loading 
stuff ???

Any help any one can give me would be greatly appreciated. Thanks ......


gad.........
Technical Details
Message-ID: <1602@tellab5.tellabs.CHI.IL.US>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!att!tellab5!gad

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!att!tellab5!gad
From: gad@tellab5.tellabs.CHI.IL.US (Greg Deuerling)
Newsgroups: comp.sys.amiga.tech
Subject: Help.  Lattice & UnHunk
Message-ID: <1602@tellab5.tellabs.CHI.IL.US>
Date: 18 Sep 89 13:58:17 GMT
Reply-To: gad@tellab5.UUCP (Greg Deuerling)
Distribution: na
Organization: Tellabs, Inc., Lisle, IL
Lines: 47