Re: A89: Starting out assembly, need help
[Prev][Next][Index][Thread]
Re: A89: Starting out assembly, need help
>
>In a message dated 11/30/98 8:57:08 PM Eastern Standard Time,
>Daniel7073@aol.com writes:
>
>> Example:
>> Ram Addresss: 1500 50
>> 1502 75
>>
>> a7 = 1502
>>
>> move.w 150, -(a7)
>>
>> Ram Address: 1500 150
>> 1502 75
>>
>> a7 = 1500
>>
>> I hope this helps.
>
>Thank you, l see what you mean.
>Earlier you or someone else said that storing to an odd RAM address (like
>1501) is BAD, so is that why you might not want to do move.b 150, -(a7)
>because b would be 1?
that would point a7 to an odd address .. I don't even know if that
instruction would compile; move.b 150,(a7) though would be alright. the
problem is that if you are using an address register as a pointer it cannot
hold an odd address or else the next time you use it as a pointer, you will
get an address error.
>l can see how storing things to RAM addresses is a great thing, but how do
you
>know which ones to use? How many are there?
just define space in your program:
xCoordinate:
dc.w 0
or you can use video memory that way you don't take up space in your
program; a lot of the allocated memory for the video memory is unused so
that it can be compatable with 92+
note:
to access the memory in your program you would use relative addressing
(label(pc)) and to access the video memory you would use absolute addressing
(just label)