EASy68K  
It is currently Tue Aug 20, 2019 2:03 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Mar 31, 2012 12:26 pm 
Offline

Joined: Sun Mar 18, 2012 12:14 pm
Posts: 1
Hi, I am starting to learn to program for the 68000 and I can't figure out some of the adessing modes.

What does A(PC) do in an instruction like MOVE.W A(PC) D0 and why is it different to MOVE.W A, D0.

Thanks for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 31, 2012 1:12 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1101
When the Program Counter is used as part of the address, the assembler calculates the offset from the current program counter to the destination address and uses that offset in the code, instead of the actual destination address. This supports writing code that is position independent. That is, the code may be loaded into any address and it will still run, provided the data is also moved with the code.

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group