Last active
May 8, 2022 15:51
-
-
Save xl00t/510c6f6912e8418f0861b4020c8c04be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.386 | |
.model flat | |
.data | |
array DWORD 7,8,9,0,64,10,0,147,14 | |
.code | |
main proc | |
xor ecx, ecx | |
xor eax, eax | |
lea esi, array | |
OurLoop: | |
mov ebx, [esi + ecx * TYPE array] | |
cmp ebx, eax | |
jge moveax | |
here: | |
inc ecx | |
cmp ecx, LENGTHOF array | |
jne OurLoop | |
ret | |
moveax: | |
mov eax, ebx | |
jmp here | |
main endp | |
end main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.386 | |
.model flat | |
.data | |
array DWORD 1, 2, 5, 0, 189, 1337, 142, 88 | |
.code | |
checkgreater proto | |
main proc | |
xor ecx, ecx | |
xor eax, eax | |
lea esi, array | |
OurLoop: | |
mov ebx, [esi + ecx * TYPE array] | |
invoke checkgreater | |
inc ecx | |
cmp ecx, LENGTHOF array | |
jne OurLoop | |
ret | |
main endp | |
checkgreater proc | |
cmp ebx, eax | |
jg moveeax | |
ret | |
moveeax: | |
mov eax, ebx | |
ret | |
checkgreater endp | |
end main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment