So I have a procedure here that should print an array initialized with "~". Since I want a 12x12 game board I use modular division on 144 by 12 and print a new line when the remainder is 0. I definitely have a problem somewhere though, my first hint is that it just crashes the second it goes to print the board.
displayBoard PROC
lea esi, dArray
mov eax, 144
.while eax > 0
xor edx, edx
mov ecx, 12
div ecx
.if edx == 0
print 0DH, 0AH
.endif
print esi
sub eax, 1
.endw
mov eax, input()
displayBoard ENDP