; CHECK-SUM PROGRAM TEST LDR R0,=ROM_ADDRESS ; pointer to data ROM LDR R2,=ROM_SIZE ; data size MOV R1,#0 ; R1 is used to hold the sum ; add the words including the check-sum word OVER LDR R3,[R0] ; load the word ADD R1,R3 ; add the word ADD R0,R0,#4 ; point to next one SUBS R2,R2,#1 ; decrement counter BNE OVER ; until all is done ; test it TST R1,R1 ; see if the sum is zero BEQ NO_ER ; if it is, go display the message ; display the message for error B . ; stay here NO_ER ;display the message for no error