Uploaded by Rowaifa Akhter

New Text Document

advertisement
org 0x0
mov R2,#72H ;ascii of small r
mov R0,#2H
mov A,#00
mov R7,#00 ;my counter
cjne R0,#2,not_equal
mov DPTR,#list_1
alpha:
movc A,@A+DPTR
JZ here
CJNE A,02H,target
inc R7
target:
inc A
jmp alpha
not_equal:
CJNE R0,#5H,not_equal_2
mov DPTR,#list_2
beta:
movc A,@A+DPTR
JZ here
CJNE A,02H,target_1
inc R7
target_1:
inc A
jmp beta
not_equal_2:
jmp here
here:
jmp end_code
org 2
list_1: DB "rowaifa rowaifa",0
list_2: DB "rowaifa rowaifa rowaifa"
end_code:
end
Download