Kiểm tra giúp em code này:
ORG 0000H
start:
mov p0, #00000001b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00000010b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00000100b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00001000b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00001000b
mov p1, #11110110b
mov 2p, #01101111b
Lcall delay
mov p0, #00000100b
mov p1, #11110110b
mov p2, #01101111b
Lcall delay
mov p0, #00000010b
mov p1, #11110110b
mov p2, #01101111b
Lcall delay
mov p0, #00000001b
mov p1, #11110110b
mov p2, #01101111b
Lcall delay
Ljmp start
delay:
mov r1,#2
lap2:
mov r2,#200
lap1:
mov r3,#250
djnz r3,$
djnz r2,lap1
djnz r1,lap2
ret
end
ORG 0000H
start:
mov p0, #00000001b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00000010b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00000100b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00001000b
mov p1, #10011111b
mov p2, #11111001b
Lcall delay
mov p0, #00001000b
mov p1, #11110110b
mov 2p, #01101111b
Lcall delay
mov p0, #00000100b
mov p1, #11110110b
mov p2, #01101111b
Lcall delay
mov p0, #00000010b
mov p1, #11110110b
mov p2, #01101111b
Lcall delay
mov p0, #00000001b
mov p1, #11110110b
mov p2, #01101111b
Lcall delay
Ljmp start
delay:
mov r1,#2
lap2:
mov r2,#200
lap1:
mov r3,#250
djnz r3,$
djnz r2,lap1
djnz r1,lap2
ret
end
Comment