Skip to content

Instantly share code, notes, and snippets.

@josejuan
Created June 16, 2012 23:03
Show Gist options
  • Save josejuan/2942750 to your computer and use it in GitHub Desktop.
Save josejuan/2942750 to your computer and use it in GitHub Desktop.
3 en raya check
# %edi es el parámetro
movl %edi, %edx
movl %edi, %eax
andl $7, %edx
cmpb $7, %dl
je .L9
movl %edi, %edx
andl $56, %edx
cmpb $56, %dl
je .L9
movl %edi, %edx
andw $448, %dx
cmpw $448, %dx
je .L9
movl %edi, %edx
andl $73, %edx
cmpb $73, %dl
je .L9
movl %edi, %edx
andl $-110, %edx
cmpb $-110, %dl
je .L9
movl %edi, %edx
andw $292, %dx
cmpw $292, %dx
je .L9
andw $273, %di
cmpw $273, %di
je .L9
andl $84, %eax
cmpb $84, %al
sete %al
movzbl %al, %eax
ret
.L9:
movl $1, %eax
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment