Advertisement
Guest User

openp1

a guest
Dec 1st, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. openP1 proc
  2.     push ebp
  3.     mov  ebp, esp
  4.  
  5.     push eax
  6.  
  7.     call calcIndexP1
  8.     mov ebx, 0
  9.     mov eax, indexMat
  10.     mov bl, [gameCards+eax]
  11.     cmp tauler[eax], ' '
  12.     jne fi
  13.     ;mov tauler[eax], 'X'
  14.     mov carac, bl
  15.     call printch
  16.  
  17.     cmp cardTurn, 0
  18.     jne cardDos
  19.     mov edx, 0
  20.     mov dl, carac
  21.     mov firstVal, edx
  22.  
  23.     mov ebx, [row]
  24.     mov firstRow, ebx
  25.  
  26.    
  27.     mov ecx, 0
  28.     mov cl, [col]
  29.     mov firstCol, cl
  30.     mov cardTurn, 1
  31.     jmp fi
  32.  
  33.     cardDos:
  34.     cmp tauler[eax], ' '
  35.     jne trobat
  36.     mov cardTurn, 0
  37.     mov edx, firstVal
  38.     mov ecx, 0
  39.     mov cl, carac
  40.     cmp edx, ecx
  41.     jne cerrarDos
  42.     dec totalPairs
  43.     jmp fi
  44.  
  45.     cerrarDos:
  46.     call getch
  47.     mov carac, ' '
  48.     mov tauler[eax], ' '
  49.     call posCurScreenP1
  50.     call printch
  51.     call posCurScreenP1
  52.     dec totalTries
  53.  
  54.     mov eax, [row]
  55.     mov bl, [col]
  56.     mov ecx, firstRow
  57.     mov [row], ecx
  58.     mov edx, 0
  59.     mov dl, firstCol
  60.     mov [col], dl
  61.     call posCurScreenP1
  62.     call printch
  63.     call posCurScreenP1
  64.  
  65.  
  66.     fi:
  67.     call updateScore
  68.     trobat:
  69.     pop eax
  70.  
  71.     mov esp, ebp
  72.     pop ebp
  73.     ret
  74. openP1 endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement