[Coco] ASM question: LDA ,X

L. Curtis Boyle curtisboyle at sasktel.net
Wed Jan 23 15:50:06 EST 2019


No, auto inc/dec  “,x+”, “,x++”, “,-x” and “,—x” do not allow constant offsets as well.

L. Curtis Boyle
curtisboyle at sasktel.net

TRS-80 Color Computer Games website
http://www.lcurtisboyle.com/nitros9/coco_game_list.html



> On Jan 23, 2019, at 2:45 PM, Salvador Garcia via Coco <coco at maltedmedia.com> wrote:
> 
> Hi all,
> I have been looking at assembly language and have come across instructions such as:
> LDA , X
> LDA , X+
> I've seen LDA , X also expressed as LDA 0, X which means that an explicit offset of 0 is added to the X register. I assume that I can also do this with LDA , X+, that is, LDA 0, X+. What I can't seem to understand is why the ASM syntax requires that coma when there isn't any offset specified. For example, is something like this valid?
> LDA 20, X+
> Does this add 20 to X to get the data, then increments X? I have not seen this type of syntax in the docs that I am looking at. As always, thanks! Salvador
> 
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
> 



More information about the Coco mailing list