ALP to add a series of numbers (8-BIT)
DATA
SEGMENT
SERIES
DB 12H, 13H, 22H, 23H, 32H
COUNT DB 05H
RESULT DW 01H DUP(?)
DATA ENDS
DATA ENDS
CODE
SEGMENT
START: MOV AX, DATA
MOV DS, AX
XOR AX, AX
XOR BX, BX
MOV
CL, COUNT
LEA
SI, SERIES
LOOP1: MOV BL, [SI]
ADD
AX, BX
INC
SI
DEC
CL
JNZ LOOP1
LEA DI, RESULT
MOV
[DI], AX
MOV AH, 4CH
INT 21H
CODE ENDS
END START
No comments:
Post a Comment