Advertisement
Shailrshah

Largest Number in External Memory

Aug 19th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     MOV R2, #4h             ;counter
  2.     MOV DPTR, #3000h        ;External Memory
  3.         MOVX A, @DPTR
  4. L1:     MOV B, A
  5. L2:     DJNZ R2, L3             ;counter check
  6.         SJMP STP
  7. L3:     INC DPTR
  8.         MOVX A, @DPTR
  9.         CJNE A, B, NEQ
  10.         SJMP L2
  11. NEQ:    JC L2
  12.         SJMP L1
  13. STP:    MOV R1, B
  14.         END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement