在课堂上给出了以下代码,并且应该在右侧的注释中描述每一行的含义。它是否正确?
MOVE.B #20,D0 //Move 20 into D0
MOVEA.L #$1000,A0 //Move the contents of address 1000 into A0
CLR.B D1 //Set D1 to 0
Again CMP.B (A0)+,D2 //Compare A0 to D2, then increment A0 by 1
BNE NEXT //If A0 and D2 are not equal, go to NEXT, otherwise continue
ADD.B #1,D1 //Add 1 to D1
NEXT SUB.B #1,D0 //Subtract 1 from D0
BNE Again //Branch to AGAIN if contents of A0 is not equal to D2