I'm new to x86 assembly. My output currently looks like this:
1|*
2|** ...
8|********
9|*********
10|**********
11|***********
I want there to be a space in 1-9 so that it forms a straight line. Like this:
9|
10|
11|
I don't know how to do it. I was thinking maybe using printChar (I want it in x86 assembly)
My code for printing the stars and lines:
beginLoop: dec numItems
push numItems
call printInt //Prints 'numItems' number
mov al,'|'
push al
call printChar //Prints bar line next to number
starLoop: mov al, '*'
push al
call printChar //Prints a single star
mov [numStars], 0
inc numStars //numStars increases by 1
mov ecx, [esi] //ebx knows inputted value
cmp [numStars], ecx //numStars must equal value inputted
jne starLoop
nextValue : call printNewLine
add esi, 4 //Move to next number
cmp[esi], [items]
jne beginLoop