bsee08's Avatar
bsee08 4
32 Asked
47 Answered
11 Best
1
No one has voted on this question yet :(
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
Tip for best answer: M$0.11
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$

What is Your Answer?

0
0
0

Learn something new with our FREE educational apps!

Private lessons in the comfort of your own home. Get back in shape or finally pick up a guitar with our great experts guiding you the whole way!
Learn Guitar
Learn Hip Hop
Learn Pilates