A89: Re: address error
[Prev][Next][Index][Thread]
A89: Re: address error
Here, I'll give you a little more information so that maybe someone can help
me even if they don't know about the addressing error. Here is my PutSprite
routine:
PutSprite:
move.w #30,d2
move.b #15,d3
bsr FindPixel
psLoop:
clr.l d1
move.w (a1)+,d1
swap d1
lsr.l d0,d1
or.l d1,(a0)
add.w d2,a0
dbra.b d3,psLoop
rts
The FindPixel works; I tested it thoroughly. FindPixel returns the video
mem address pointer in a0 and the bit offset in d0 from the x and y
coordinates in d0 and d1. Here is how I called the PutSprite:
move.l #10,d0
move.l #20,d1
move.l sprite(pc),a1
bsr PutSprite
But it crashes saying address error. Also does the .l on the lsr
instruction indicate that the register with the number of shifts is a long
or that the operand is a long?
thanks
>
>What causes an "address error"? These are the two indirect addressing
>instructions I am using: move.w (a1),d1 and or.l d1,(a0), where a0 should
>point to video memory and a1 points to an address within the program. Or
is
>that error caused by trying to put data to an inaccessable area of memory,
>meaning my pointer is somehow messed up?
>
>thanks
>