mvi b,09h ; load the number you want to sqaure
mov c,b ; c is the counter for repeating loop
mvi a,00h ; empty the contents of accumulator
repeat: add b ; add n to accumulator, n times e.g add 9, 9 times
dcr c
jnz repeat
hlt ; the answer lies in the accumulator, you can also store it at some mem location or output port