2 years, 1 month ago
Why doesn't this assembly code execute like I think it should?
I'm trying to build a calculator in 68000 assembly. For this segment of code I just want the branch to work properly. D0 contains either a +,-,*,/ and D3 contains a +. D1 and D2 contain numbers. How can I make this properly branch so that ACTION1 isnt executed if D0 isnt a + ?
MOVE.B '+',D3
CMP.B D3,D0
BEQ ACTION1
ACTION1 ADD.B D2,D1
At the moment, ACTION! is being executed regardless of what D0 contains
MOVE.B '+',D3
CMP.B D3,D0
BEQ ACTION1
ACTION1 ADD.B D2,D1
At the moment, ACTION! is being executed regardless of what D0 contains
Separate topics with commas, or by pressing return. Use the delete or backspace key to edit or remove existing topics.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$