I have a fairly simple question regarding assembly language. We are using SIC/XE architecture which is basically make believe and for educational purposes only, but does follow the common conventions of other architectures. Now for my question and first thoughts on the answer.
assume that the symbols ALPHA and BETA are labels in a source program. What is the difference between the following two sequences of statements?
A.) LDA ALPHA-BETA
B.) LDA ALPHA
SUB BETA
Just for clarity, LDA loads data into register A, which is used for arithmetic operations. And an operation like SUB, as seen here, or ADD, works on register A by default without having to declare it.
Now, at first glance, I am assuming both A and B are equivalent. My logic is pretty straightforward. Load into A the difference of ALPHA and BETA, or alternatively load into A, ALPHA, then subtract from ALPHA in register A, BETA. Which seems to me accomplishes the same exact thing? Am i missing some trivial detail or is it really as simple as it looks?