I am trying to iterate an array and find numbers less than, equal to, and more than to be stored. I want to store the count in the three results and if possible display the result
ORG $1000
START: ORG $2000 ; first instruction of program
LEA DATA,A0
MOVE.B #9,D0
CLR.B D1
CLR.B D2
CLR.B D3
LOOP: MOVE.B (A0)+,D4
CMP.B #50,D4
BGT GRT_50
BLT LESS_50
BEQ EQ2
LOOP
GRT_50: ADD.B #1,D3
BNE LOOP
LESS_50: ADD.B #1,D01
BNE LOOP
GRT_50: ADD.B #1,D2
BNE LOOP
STOP #2000
* Put variables and constants here
ORG $2000
DATA DC.B $55,$10,$20,$30,$40,$50,$60,$65,$70,$80
RESULT1 DC.B $0
RESULT2 DC.B $0
RESULT3 DC.B $0
END START ; last line of source