Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openP1 proc
- push ebp
- mov ebp, esp
- push eax
- call calcIndexP1
- mov ebx, 0
- mov eax, indexMat
- mov bl, [gameCards+eax]
- cmp tauler[eax], ' '
- jne fi
- ;mov tauler[eax], 'X'
- mov carac, bl
- call printch
- cmp cardTurn, 0
- jne cardDos
- mov edx, 0
- mov dl, carac
- mov firstVal, edx
- mov ebx, [row]
- mov firstRow, ebx
- mov ecx, 0
- mov cl, [col]
- mov firstCol, cl
- mov cardTurn, 1
- jmp fi
- cardDos:
- cmp tauler[eax], ' '
- jne trobat
- mov cardTurn, 0
- mov edx, firstVal
- mov ecx, 0
- mov cl, carac
- cmp edx, ecx
- jne cerrarDos
- dec totalPairs
- jmp fi
- cerrarDos:
- call getch
- mov carac, ' '
- mov tauler[eax], ' '
- call posCurScreenP1
- call printch
- call posCurScreenP1
- dec totalTries
- mov eax, [row]
- mov bl, [col]
- mov ecx, firstRow
- mov [row], ecx
- mov edx, 0
- mov dl, firstCol
- mov [col], dl
- call posCurScreenP1
- call printch
- call posCurScreenP1
- fi:
- call updateScore
- trobat:
- pop eax
- mov esp, ebp
- pop ebp
- ret
- openP1 endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement