سؤال

I'm new to assembly language. Can someone just explain to me what the following code segment does? Thanks a lot for any help.

        MOVE.B  #20,D0
        MOVEA.L #$1000,A0
        CLR.B   D1
Again   CMP.B   (A0)+,D2
        BNE     NEXT
        ADD.B   #1,D1
NEXT    SUB.B   #1,D0
        BNE     Again
هل كانت مفيدة؟

المحلول

I am not sure what assembly is this (please specify the processor) probably some Motorolla 68000 or similar. But it searches the memory from address $1000 to $101f for byte $d2 and counts how many of them has been found in the register D1. "$" means hexadecimal number. "#" means immediate constant.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top