[comp.sys.mac.programmer] Lightspeed Pascal & SE/30

anarch@eleazar.dartmouth.edu (Brendan Hahn) (06/08/89)

     Does anyone out there know what a 'bus error' in Lightspeed Pascal is?  I 
have just switched to an SE/30 and they have been popping up everywhere.  The
message is not documented in the manual and I haven't got the tech support
number.  I am at a loss and the problem is really disrupting my work.  It seems
to have something to do with pointer access; after the fourth or fifth time a
program uses a pointer it bombs.  The programs will work fine when moved to a
different computer however.  I'm using LSP 2.0p1 with a brand-new SE/30 and
system 6.0.3.  Any help would be greatly appreciated!

     P.S. If the grammar in this note leaves a little to be desired it's because
the comma key on this terminal doesn't work.

ra_robert@gsbacd.uchicago.edu (06/08/89)

In article <13842@dartvax.Dartmouth.EDU>, anarch@eleazar.dartmouth.edu (Brendan Hahn) writes...
 
> 
>     Does anyone out there know what a 'bus error' in Lightspeed Pascal is?  I 
>have just switched to an SE/30 and they have been popping up everywhere.  The
>message is not documented in the manual and I haven't got the tech support
>number.  I am at a loss and the problem is really disrupting my work.  It seems


I believe a bus error can occur in one of two ways: when an instruction refers
to an address that's invalid, or when an instruction tries to access a byte at
an odd address.  (By instruction, I mean assembly language instruction.)  So
your pointer is probably pointing out somewhere in la-la land and trying to do
something to memory in the wrong place.  Use Lightsbug to check where you're
pointers are pointing to.  (BTW, bus errors will only occur on 68020 and 68030
machines, not on 68000 machines).

I highly recommend taking a look at Scott Knaster's "How To Write Macintosh
Software", 2nd edition, for further hints on debugging.


Robert
------
ra_robert@gsbacd.uchicago.edu
------
generic disclaimer: all my opinions are mine
------
MOFO knows!

siegel@endor.harvard.edu (Rich Siegel) (06/08/89)

In article <13842@dartvax.Dartmouth.EDU> anarch@eleazar.dartmouth.edu (Brendan Hahn) writes:
>
	[questions about bus errors]

	A bus error is an exception that is signalled by external hardware
(external to the CPU, that is)  when an attempt is made to access an illegal
address.

	Bus errors are only signalled on Macs that have memory or I/O busses,
such as the II, IIx, IIcx, and SE/30. The 68020 or 68030 will not
signal odd memory references, since they are legal on these CPUs.

	Tech support for THINK Pascal and THINK C is  (617) 275-1738.

		--Rich



~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

 "She told me to make myself comfortable, so I pulled down my pants
 and sat in the pudding." -Emo Phillips
~~~~~~~~~~~~~~~