[A92] Re: TI92+ HW2 AMS 2.05 ASM size limit


[A92] Re: TI92+ HW2 AMS 2.05 ASM size limit

On Wed, 8 Aug 2001, Rudolf Polzer wrote:

> On Tue, Aug 07, 2001 at 04:11:44PM -0700, Patrick Davidson wrote:
> >
> >
> > On Tue, 7 Aug 2001, Rudolf Polzer wrote:
> >
> > > Isn't the ASM size limit 24k on HW2, AMS 2.05?
> >
> > Yes, it is.
> >
> > > I have installed the HW2Patch, but my TIGCC program (22k) still
> > > crashes. Interestingly, it crashes before my code is executed (the
> > > first line to be executed is a clrscr()!) and I get an "Address
> > > Error". If I run my program (compiled in Doors mode) in UniversalOS,
> > > it works.
> >
> > The problem isn't likely due to the size limit.  If the program were over
> > the size limit with no kernel installed, you'd get the "ASAP or Exec
> > String Too Long" error message.  On HW2, there is a hardware protection to
> > back up the size limit by prohibiting code being executed in certain
> > address ranges, which can cause crashes if you try to run code outside the
> > range without circumventing or deactivating the hardware protection (which
> > HW2Patch does for you anyway).  In any case, unless your program tries to
> > run code somewhere in RAM outside its own boundaries, this won't happen,
> > and if it did the result would not be "Address Error" .
> My code cannot be the fault here - the first thing I do is a
> clrscr(), but the screen is not cleared before the call.
> Also, if I leave out the big (11k) .o file and replace
> it with a small one providing the same exported function
> (with empty body), it works. But I call this function
> _after_ getline() (TIGCC example code).
> Maybe a bug in the linker? In the compiler? Is there a
> working 9XZ disassembler?
> I use no linker flags and '-Os -fno-omit-frame-pointer' as compiler
> flags.

If I had to guess, I would say this is most likely a bug in the linker,
though I'm not certain of it.  This is especially likely if the .o file is
in the Amiga object file format (as generated by A68K) because the linker
doesn't do too god a job of combining such files with coff format files
(which are made by GCC and the GNU assembler).

One 9xz disassembler is included with the TIGCC Tools Suite; it is listed
as an early beta but it seems to work well.  Also you can use the debugger
of VTI which also allows you to run through the execution step by step.

Follow-Ups: References: