[Coco] ASM question: LDA ,X

Salvador Garcia salvadorgarciav at yahoo.com
Wed Jan 23 15:45:27 EST 2019


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




More information about the Coco mailing list