Advertisement
MichaelPetch

Untitled

Dec 3rd, 2023 (edited)
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. .386
  2. .model flat, C
  3.  
  4. .data
  5.  
  6. DifferentInputs PROTO val1:DWORD, val2:DWORD, val3:DWORD
  7.  
  8. .code
  9.  
  10. main PROC
  11. INVOKE DifferentInputs,1,2,3
  12. ; Equivalent to doing
  13. ; push 3
  14. ; push 2
  15. ; push 1
  16. ; call DifferentInputs
  17. ; add esp, 3*4
  18.  
  19. ; INVOKE ExitProcess, 0
  20. ret
  21. main ENDP
  22.  
  23. ;Takes 3 inputs and checks to see if any of them are the same
  24. DifferentInputs PROC, val1:DWORD, val2:DWORD, val3:DWORD
  25. mov eax, val1
  26. cmp eax, val2
  27.  
  28. ret
  29. DifferentInputs ENDP
  30.  
  31.  
  32. End main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement