>From markg@urchin.ti.com Thu Feb  7 21:08:13 1991
Received: by eceugs (5.57/2 4/27/87)
	id AA14797; Thu, 7 Feb 91 21:08:08 EST
Posted-Date: Thu, 7 Feb 91 15:39:02 CST
Received-Date: Thu, 7 Feb 91 21:08:08 EST
Received: by ti.com id AA28629; Thu, 7 Feb 91 19:47:52 -0600
Received: from tilde by ti-csl id AA03848; Thu, 7 Feb 91 15:38:37 CST
Received: from urchin.csc.ti.com by tilde id AA27507; Thu, 7 Feb 91 15:39:14 -0600
Received: by urchin.csc.ti.com (4.1/SMI-4.1)
	id AA00396; Thu, 7 Feb 91 15:39:02 CST
Date: Thu, 7 Feb 91 15:39:02 CST
From: markg@urchin.csc.ti.com (Mark Greenberg)
Message-Id: <9102072139.AA00396@urchin.csc.ti.com>
To: jlloyd@eceugs.ece.ncsu.edu
Subject: 68k asm
Status: R

I've just received a copy of the simulator and compiled the files. When
I ran asm on a Sun4, the var "tableSize" in insttable.c was set to a
very large number. This was due to the fact that tablesize had been
declared "short int" in insttable.c referenced as "extern int tablSize"
in instlookup.c (I just changed it to int)

Other bug I found from running the source through lint was incompatable
parameter passing in calls to "extWords" from movem.c and "listLine"
from assemble.c. 

Here is a diff of the changes ( < is new, > is original )
assemble.c:
90c90
<                                       listLine();
---
>                                       listLine(line, lineNum);
134c134
<                               (void)define(label, loc, pass2, errorPtr);
---
>                               define(label, loc, pass2, errorPtr);
154c154
<                               (void)define(label, loc, pass2, errorPtr);
---
>                               define(label, loc, pass2, errorPtr);


build.c:
< unsigned  moveMask;
---
> unsigned short moveMask;
611c611
< int disp;
---
> short disp;


insttable.c:
< int tableSize = sizeof(instTable)/sizeof(instruction);
---
> short int tableSize = sizeof(instTable)/sizeof(instruction);


listing.c:
<               exit(1);
---
>               exit();
97c97
<               exit(1);
---
>               exit();
132c132
<               default   : printf("LISTOBJ: INVALID SIZE CODE!\n"); exit(1);
---
>               default   : printf("LISTOBJ: INVALID SIZE CODE!\n"); exit();


movem.c
< unsigned regList, temp, instMask;
---
> unsigned short regList, temp, instMask;
122c122
<                               extWords(&memOp, WORD, errorPtr);
---
>                               extWords(&memOp, errorPtr);
153c153
<                               extWords(&memOp, WORD, errorPtr);
---
>                               extWords(&memOp);


object.c:
79c79
<               exit(1);
---
>               exit();
134c134
<               default   : printf("outputObj: INVALID SIZE CODE!\n"); exit(1);
---
>               default   : printf("outputObj: INVALID SIZE CODE!\n"); exit();
166c166
<               exit(1);
---
>               exit();
181c181
<               exit(1);
---
>               exit();


Thanks,
 Mark
------------------------------------------------------------------
Mark I Greenberg,  Computer Science Centre,  Texas Instruments,
13510 N. Central Exprway,  PO.Box 655474, MS-238, Dallas, Tx 75265
Fax: 214 995-0304     Tel: 214 995-0778    Email: markg@csc.ti.com
------------------------------------------------------------------



