.MODEL SMALL
.DATA
BASE DB ?
POW DB ?
NL1 DB 0AH,0DH,'ENTER BASE:','$'
NL2 DB 0AH,0DH,'ENTER POWER:','$'
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
ENTER_BASE:
LEA DX,NL1
MOV AH,09H
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV BL,AL
MOV BASE,AL
ENTER_POWER:
LEA DX,NL2
MOV AH,09H
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV CL,AL
DEC CL
MOV AX,00
MOV AL,BASE
LBL1:
MUL BL
LOOP LBL1
MOV CL,10
DIV CL
ADD AX,3030H
MOV DX,AX
MOV AH,02H
INT 21H
MOV DL,DH
INT 21H
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
OUTPUT
***********
Z:\assembly\SYSTEM~1\AS1>ex12
ENTER BASE:3
ENTER POWER:3
27
Z:\assembly\SYSTEM~1\AS1>