I'm trying to print an equilateral triangle made of * in NASM based off of user input that can be from numbers 01 to 99. So if the user inputs 99 the bottom row of the triangle will have 99 stars, then the row above that would have 97 stars, then above that row 95 stars, etc. but it is only making a rectangle with the same width and length. How can I change my code so that it will print an equilateral triangle and not a rectangle? Thanks for the help.
section .data
star: db '*', 1                    
starLen1:  equ $-star  
;endl
newLineMsg: db 0xA, 0xD
newLineLen: equ $-newLineMsg
section .bss
TriangleSize resb 1               ;Holds width of triangle  
TriangleSize2 resb 1 
spacebewteenvalues resb 1   ;take space bwteen values   
loopcounter1 resb 2           ;hold count for first loop    
loopcounter2 resb 2          ;hold count for 2nd loop    
answer2 resb 2               ;hold first digital after times 10 for second input 
answer3 resb 2               ;hold value after plus 2nd digit
section .text
global _start
_start:
mov eax,3           
mov ebx,0         
mov ecx,TriangleSize        
mov edx,1      
int 80h     
mov eax,3           
mov ebx,0         
mov ecx,TriangleSize2        
mov edx,1      
int 80h     
;sub ascii from each digit
sub [TriangleSize], byte '0'
sub [TriangleSize2], byte '0'
;multiply first digit by 10
mov al, [TriangleSize] 
mov bl, 10
mul bl
;move into variable
mov [answer2], ax
;add 2nd digit
mov al, [answer2]
add al, [TriangleSize2]
;move both digit into variable
mov [answer3], al
;convert to decimal
add [answer3], byte '0'
    
;reset loop
mov [loopcounter1], byte '0'
mov [loopcounter2], byte '1'
    
;Start to cout *
jmp TriFunction1
;outputs first row
 TriFunction1:
;move counter into reigster
mov al, [loopcounter1]
;compare row length then jump to next row
cmp al, [answer3]
je CoutNewline           ;endl
;cout *
mov eax,4           
mov ebx,1          
mov ecx,star      
mov edx,1     
int 80h 
;inc the loop counter
add [loopcounter1], byte 1
;jump back to beginning
jmp TriFunction1
;goes to next row
TriFunction2:
;move 2nd loop counter into register
mov al, [loopcounter2]
;compare 
cmp al, [answer3]
je end      ;when rectangle has finished drawing go back to main
add [loopcounter2], byte 1
;output the next row of *
jmp TriFunction1
       
;endl
 CoutNewline:
;out \n
mov edx, newLineLen
mov ecx, newLineMsg
mov ebx, 1
mov eax, 4
int 0x80
;reset loop
mov [loopcounter1], word '0'
;check for next row
jmp TriFunction2
end:
mov eax,1            ; The system call for exit (sys_exit)
mov ebx,0            ; Exit with return code of 0 (no error)
int 80h;
  
;takes space between user input
takespacebetweennumbers:
mov eax,3            
mov ebx,0            
mov ecx,spacebewteenvalues      
mov edx,1     
int 80h 
ret            ;return back 
 
     
    