I need to draw a square in assembly x86. I know how to draw a square but my problem is that I have a lot of variables and I don't want to make a procedure for each 2 variables (x and y). I added an example where I define the x and the y. This is what I tried to do:
proc ChangeColumn4Number4
inc [FourthColumnArray + 3]
mov [Player1Drawx], 85h
mov [Player1Drawy], 27h
jmp DrawPlayer1Disc
endp ChangeColumn4Number4
DrawPlayer1Loop:
mov bh,0h
mov cx,[Player1Drawx]
mov dx,[Player1Drawy]
mov al,[player1disccolor]
mov ah,0ch
int 10h
add [Player1Drawx], 1h
mov ax, dx
add ax, 14h
cmp dx, ax
jl DrawPlayer1Loop
DrawPlayer1Disc:
mov bh, 0h
mov dx, [Player1Drawy]
add [Player1Drawy], 1h
mov ax, dx
add ax, 14h
cmp dx, ax
jl DrawPlayer1Loop
Someone from this site guided to do it this way but it doesn't work. Thanks for help.