Okay, let's take a look at some of the mistakes here:
- Only one ORG statement at a time. Start with ORG $1000 or ORG $2000 but not both. Just make sure to use an address for data that won't overlap to avoid overwriting stuff.
- Use DBRA D0,LOOP to loop (in this case 10 times) to the LOOP label.
- Use BRA LOOP instead of BNE LOOP, as BNE is a conditional jump.
- MOVE #9,D0 without the .b to use it correctly with DBRA, because DBRA uses a word-sized counter. When you just write .b you can't be sure what the upper 8 bits of the word happen to be.
- At BEQ EQ2 you try to jump to the label EQ2, but there is no such.
- There is no D01 register, use ADD #1,D1. As already mentioned.
And some notes:
- I would skip the .b at "CLR.B" and "ADD.B" as it unnecessarily shrinks the counting variables from word to byte size. Note that the 68k can work with byte, word and long sizes, and defaults to word-size most of the time.
- As you use Hex Numbers in the data field, I think you want to compare it to Hex 50 (CMP #$50,D4) instead of decimal 50.
- The addresses $1100 and $1110 in my example code are arbitrary. In Easy68k they can nicely be observed in the memory window.
Many of these have already been stated in the comments, but I'm trying to summarize everything here.
There is still room for improvement, but I'd maybe write it like this:
ORG $1000
START:
LEA DATA,A0 ;set A0 to data address
MOVE #10-1,D0 ;setup for 10 iterations
LOOP:
MOVE.B (A0)+,D1 ;fetch byte
CMP.B #$50,D1 ;compare
BGT GRT_50 ;and branch conditionally
BLT LESS_50
BEQ EQUAL_50
CONT:
DBRA D0, LOOP ;come back here to loop
SIMHALT ;stop
GRT_50:
ADD #1, RESULT_G
BRA CONT
LESS_50:
ADD #1, RESULT_L
BRA CONT
EQUAL_50:
ADD #1, RESULT_E
BRA CONT
* data and vars
ORG $1100
DATA DC.B $55,$10,$20,$30,$40,$50,$60,$65,$70,$80
ORG $1110
RESULT_G DC.W $0
RESULT_L DC.W $0
RESULT_E DC.W $0
END Start