daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .DATA
  3.  
  4. Str1    db "bcdfcdgdrt"
  5. Str2    db "bydfcygdrx"
  6. Result  db "0000000000"
  7. C       db 0
  8.  
  9. .CODE
  10. .STARTUP
  11.  
  12. COMPARE MACRO S1, S2
  13. LOCAL L1, L2
  14.  
  15. LEA SI, S1
  16. LEA DI, S2
  17. MOV CX, 10
  18.  
  19. L1:
  20. MOV AL, [SI]
  21. MOV BL, [DI]
  22. CMP AL, BL
  23. JNE L2
  24.  
  25. PUSH SI
  26. LEA SI, Result
  27. MOV DX, 10
  28. SUB DX, CX
  29. ADD SI, DX
  30. MOV BL, "1"
  31. MOV [SI], BL
  32. POP SI
  33.  
  34. L2:
  35. INC SI
  36. INC DI
  37. LOOP L1
  38.  
  39. COMPARE ENDM  
  40.  
  41. COMPARE Str1, Str2  
  42.    
  43. .EXIT
  44. END
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top