Here is the code:
proc ChangeColumnNumber1
inc [FirstColumnArray]
mov [Player1Drawx], 25h
mov [Player1Drawy], 87h
jmp DrawPlayer1Disc
endp ChangeColumnNumber1
DrawPlayer1Loop:
mov bh,0h
mov cx,[Player1Drawx]
mov dx,[Player1Drawy]
mov al,[player1disccolor]
mov ah,0ch
int 10h
inc [Player1Drawx]
cmp cx, [Player1Drawx + 14h]
jl DrawPlayer1Loop
DrawPlayer1Disc:
mov bh, 0h
inc [Player1Drawy]
cmp dx, [Player1Drawy + 14h]
jl DrawPlayer1Loop
proc CheckPlayer2Number
mov ah, 7
int 21h
cmp al, 31h
je Player2CheckColumn1
jmp CheckPlayer2Number
endp CheckPlayer2Number
proc Player2CheckColumn1
cmp [FirstColumnArray], 0
je ChangeColumnNumber2
cmp [FirstColumnArray + 1], 0
je ChangeColumnNumber2
endp Player2CheckColumn1
proc ChangeColumnNumber2
inc [FirstColumnArray + 1]
mov [Player2Drawx], 25h
mov [Player2Drawy], 60h
jmp DrawPlayer2Disc
endp ChangeColumnNumber2
DrawPlayer2Loop:
mov bh,0h
mov cx,[Player2Drawx]
mov dx,[Player2Drawy]
mov al,[player2disccolor]
mov ah,0ch
int 10h
inc [Player2Drawx]
cmp cx, [Player2Drawx + 14h]
jl DrawPlayer2Loop
DrawPlayer2Disc:
mov bh, 0h
inc [Player2Drawy]
cmp dx, [Player2Drawy + 14h]
jl DrawPlayer2Loop
When I execute it I am supposed to press '1'. When I do that it is supposed to draw a square and when I am supposed to press '1' again, it doesn't draw the second square. I don't understand why it doesn't work. Before that I had a mov command which moves a value into, for example, Player1Drawx but it won't work with my new code so I deleted it.
Thanks for any help I get.