Re: A89: Address Error: Original Question


[Prev][Next][Index][Thread]

Re: A89: Address Error: Original Question




At 21:07 1998-12-07 +0000, you wrote:
>
>I am resubmitting my original Address Error question because the original 
>message has most likely not continued on in its entirety.  I think that all 
>the information that I am including is important, so here it is again.
>
>  I keep getting an address error (actually it is an Adress Error) when I 
>run this program I'm writing. I figured out where it is, sort of. It has to 
>do when I use a macro to display a variable. 

An Adress Error occurs when you try to read a word or a longword from
an odd address. I think that's because the whole memory is divided into
2-byte chunks (since the whole 68k architechture is 16-bit).

>  print_value: 
>  move.l #str 8,a0 

Now, what is this?? "#str 8,a0"?? What are you tring to do?
Make A0 point at str...? Then it should just be "move.l str,a0"
or "lea str,a0", or even better, put (PC) after str, like

 lea str(PC),a0

as it's smaller & faster.

As to where in the code the error lies, I can't find. You've managed
to make a darn complex program with so few rows... congratulations :)

--
Real name:     Jimmy Mårdell         
Email:         mailto:yarin@acc.umu.se
Homepage:      http://www.acc.umu.se/~yarin/

Icarus Productions homepage: http://icarus.ganymed.org/


References: