6809 assembly knowledge needed

From: ruud.baltissen_at_apg.nl
Date: Wed, 6 Jan 2010 11:40:02 +0100
Message-ID: <3FAF2D74FB701448B997B2CB7A0076C20F4C0F3E@winsv116.office01.internalcorp.net>
Hallo allemaal,
 
 
In between other projects I try to improve my "MP-ASM", Multi Processor
Assembler. Momentary it supports the 6502 and various variants, the Z80
and the 6800. I'm busy with the 6809 (used in the SuperPET so 'on
topic') and ran into an addressing mode I don't understand: xx,PCR or
[xx,PCR]. It's called "Constant Offset from PC". It is equivalent to
xx,X / [xx,X], which is more or less equivalent to xx,X / (xx,X) for the
6502 (because xx can be 16 bits as well). 
 
What I don't understand is how it can be used. I mean, if I want to load
something I would use:

	LDA Label1
	....
	LDA [Label2]

How can I use the Program Counter as index if its content is only known
after compilation? The only thing I can think of is that you can program
a piece of code that loads something from a table and both code and
table have to be relocatable on the fly.

Any revelation, info or URL is welcome, TIA!


--
     ___
    / __|__
   / /  |_/     Groetjes, Ruud
   \ \__|_\
    \___|       URL: Ruud.C64.org


 
De informatie in dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de 
geadresseerde. Wanneer u dit bericht per abuis ontvangt, verzoeken wij u contact op te 
nemen met de afzender per kerende e-mail. Verder verzoeken wij u in dat geval dit 
e-mailbericht te vernietigen en de inhoud ervan aan niemand openbaar te maken. 
Wij aanvaarden geen aansprakelijkheid voor onjuiste, onvolledige dan wel ontijdige 
overbrenging van de inhoud van een verzonden e-mailbericht, noch voor daarbij 
overgebrachte virussen.

APG Algemene Pensioen Groep NV is gevestigd te Heerlen en is ingeschreven in het 
handelsregister van de Kamer van Koophandel Limburg onder nummer 14099617


The information contained in this e-mail is confidential and may be privileged. 
It may be read, copied and used only by the intended recipient. 
If you have received it in error, please contact the sender immediately by 
return e-mail; please delete in this case the e-mail and do not disclose it's 
contents to any person. We don't accept liability for any errors, omissions, 
delays of receipt or viruses in the contents of this message which arise as a 
result of e-mail transmission.

APG Algemene Pensioen Groep NV is registered in the trade register of the Chamber 
of Commerce Limburg, The Netherlands, registration number: 14099617


       Message was sent through the cbm-hackers mailing list
Received on 2010-01-06 11:00:03

Archive generated by hypermail 2.2.0.