TITLE Power

INCLUDE Irvine16.inc

.data
msg1 byte "Enter number for Base  : ", 0
msg2 byte "Enter number for Power : ", 0
msg3 byte "Result : ", 0
x    word ?
y    word ?

.code

main PROC

	mov ax,@data
	mov ds,ax

        call ClrScr

        ; Read Base Value
        mov  dx, offset msg1
        call WriteString
        call ReadInt
        call Crlf
        mov  x, ax

        ; Read Power Value
        mov  dx, offset msg2
        call WriteString
        call ReadInt
        call Crlf
        mov  y, ax

        mov  cx, y
        mov  ax, 1
        L1:
                mul x
                loop L1

        mov  dx, offset msg3
        call WriteString
        call WriteDec

	exit
main ENDP
END main
