Created
December 3, 2012 21:28
-
-
Save 4lex1v/4198242 to your computer and use it in GitHub Desktop.
Solution
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
_DATA SEGMENT | |
TriTable \ | |
BYTE 64 | |
BYTE 45,63 | |
BYTE 75,09,91 | |
...et cetera | |
_DATA ENDS | |
mov ebx, 0FFFFFFh ; path ;) | |
xor ebp, ebp ; max total | |
next: mov ecx, ebx | |
xor edx, edx | |
xor edi, edi | |
shl ecx, 32-24 | |
mov esi, 0 | |
@@: inc esi | |
shl ecx, 1 | |
movzx eax, [TriTable][edx] | |
adc edx, esi | |
add edi, eax | |
cmp esi, 25 | |
jne @B | |
; max path total | |
cmp ebp, edi | |
cmovc ebp, edi | |
dec ebx | |
jns next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment