.MODEL SMALL
.DATA
BYTETABLE DB 1,9,2,4,5
NL DB 0AH,0DH,'ADDTION OF 1 9 2 4 5:->','$'
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
LEA DX,NL
MOV AH,09H
INT 21H
LEA BX,BYTETABLE
MOV AL,[BX]
MOV AH,00
MOV CL,4
L1:
INC BX
ADD AL,[BX]
LOOP L1
;----------------------------------------
;CONVERT INTO ASCII
;----------------------------------------
DISP:
MOV CL,10
MOV AH,00
DIV CL
MOV DX,AX
ADD DX,3030H
MOV AH,02H
INT 21H
MOV DL,DH
INT 21H
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
;*********************************************
; OUTPUT
;*********************************************
;ADDTION OF 1 9 2 4 5:->21