[comp.sys.amiga.hardware] Interpretation of Guru numbers

ms1@philabs.philips.com (Mitch Stein) (12/13/90)

	Help,

	I,m using a public domain pascal compiler and while attempting
to write my first program using arrays and strings although the source
code compiles without errors when I try to run the program the system
immediately GURU's with: 00000003.002398D8  What does it mean. Secondly
This same program with slight modification runs fine on a PC using
Turbo Pascal what could be the problem using PCQ.

				MITCH

conan@ccwf.cc.utexas.edu (Robert Faulkner) (12/15/90)

>	I,m using a public domain pascal compiler and while attempting
>to write my first program using arrays and strings although the source
>code compiles without errors when I try to run the program the system
>immediately GURU's with: 00000003.002398D8  What does it mean. Secondly
>This same program with slight modification runs fine on a PC using
>Turbo Pascal what could be the problem using PCQ.


Well for one PCQ does not support strings in the samne fashion that`
Turbo Pascal does.  The proper way to do this, would be to include the 
strings.i include file and then allocate string space for each string
you wanted to use.  This is much like C.  PCQ is not the best Pascal
to use but it will interface with the operating system nicely, (with a 
little work.)  You might want to read through the includes to get an
idea of how to allocate strings correctly, and then free the memory
when you are done.  To find out what the alert number means:

       00000003.002398D8
the first 8 characters are an alert number describing what went wrong,
I would look this up for you but I am at the school and would have to 
go home to get my Kernel Manuals, sorry.  The second 8 numbers is the 
address at which the error occured.  I think this is a corrupt memory 
location error but I could be and probably am mistaken. To really under-
stand all this go out and buy the Addison-Weseley ROM Kernel Manuals
(especially Includes and AutoDocs) and they will help you when you
find a problem like this.  ALSO, you might want to contact the author
of PCQ for info.

Enjoy programming the AMIGA, believe me it can be interesting ;-)


-- 

Robert Faulkner                              conan@ccwf.cc.utexas.edu
            ///                  Recursion:     Thinking
        \\\///    University of Texas                 about
         \\//   Amiga Computers                     Thinking

mpierce@ewu.UUCP (Mathew W. Pierce) (12/15/90)

In article <115091@philabs.Philips.Com>, ms1@philabs.philips.com (Mitch Stein) writes:
> 
> 	Help,
> 
> 	I,m using a public domain pascal compiler and while attempting
> to write my first program using arrays and strings although the source
> code compiles without errors when I try to run the program the system
> immediately GURU's with: 00000003.002398D8  What does it mean. Secondly
> This same program with slight modification runs fine on a PC using
> Turbo Pascal what could be the problem using PCQ.
> 
> 				MITCH

I too have used PCQ very much and have encountered a few gurus.  The guru that
you are experiencing, #00000003, is a trap code for an uneven addressing error.
The second number (002398D8) is that address of the error solving task, according to my "Amiga C for Advanced Programers" manual, the only address I know of to
solve the error is the address of my left mouse button :^)  I used PCQ for everyproject in my data structures class, so I know that it works, I think that the 
compiler is a littel loose on some checking, so it'll let things slide and guru
at runtime.  If you can't solve the problem, I would like to help, I'm no 
expert, but I am familiar with the package.  So email me some code if you like
and I'll see if I can figure it out with you.

-Mathew Pierce

lkoop@pnet01.cts.com (Lamonte Koop) (12/15/90)

ms1@philabs.philips.com (Mitch Stein) writes:
>
>	Help,
>
>	I,m using a public domain pascal compiler and while attempting
>to write my first program using arrays and strings although the source
>code compiles without errors when I try to run the program the system
>immediately GURU's with: 00000003.002398D8  What does it mean. Secondly
>This same program with slight modification runs fine on a PC using
>Turbo Pascal what could be the problem using PCQ.
>
>				MITCH

The guru number you are getting is indicative of a general purpose 680x0
address error.  This is what the 3 before the decimal point refers to.  The
numbering after the decimal place is the address of the problematic task. 
Without a debugger, it is hard to know exactly why the program is causing
this, as there can be many sources of such an error.  Unfortunately, the fact
that you are using a PD compiler only means it could also be a problem rooted
there.  Note that even if the program compiles fine on the PC that it will not
necessarily mean that it is in suitable form for use in the context of an
Amiga. However, since you noted that it is basically an array and string
manipulation program, this may not in fact be the problem.  If you are bent on
using something such as Pascal, I suggest you look into one of the Modula-2
compilers available for the Amiga.  Benchmark Modula-2 is fairly good, and bug
free (I use it myself for projects which don't call for C).  In this way, you
can be relatively sure it's not a buggy compiler, and going from Pascal to
Modula-2 is not terribly difficult.


                             LaMonte Koop
 Internet: lkoop@pnet01.cts.com         ARPA: crash!pnet01!lkoop@nosc.mil
           UUCP: {hplabs!hp-sdd ucsd nosc}!crash!pnet01!lkoop
  A scientist is one who finds interest in the kinetic energy of Jell-O
   moving at ridiculous velocities...an engineer is one who can find a
               real-life application for such silliness.