My code consists in obtaining the power of a number using only 8-bit registers for the base and the exponent, but giving a result in 16 bts ( my teacher wants it that way) , my problem is that when for example I calculate 3 ^ 10, after obtaining 729, the following result would have to be 2187 but instead the result is 651. I don't know how to solve this.
org 100h
mov cl, pot
mov al, bas
mov ah, 0
mov bh, 0
mov ch, 0
loopmul:
mov bl,bas
mul bl
loop loopmul
mov res,ax
ret
pot db 10 ;exponent
bas db 3 ;base
res dw 0