DATA SEGMENT
A DB 1,2,3,4,5,6,7,8,9,10
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV CL,10
LEA BX,A
MOV AH,00
MOV AL,00
L1: ADD AL,BYTE PTR[BX]
INC BX
DEC CL
CMP CL,00
JNZ L1
MOV AH,4CH
INT 21
CODE ENDS
END START
;OUTPUT:->
-R
AX=0000 BX=0000 CX=002C DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
DS=0B98 ES=0B98 SS=0BA8 CS=0BA9 IP=0000 NV UP EI PL NZ NA PO NC
0BA9:0000 B8A80B MOV AX,0BA8
-T
AX=0BA8 BX=0000 CX=002C DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
DS=0B98 ES=0B98 SS=0BA8 CS=0BA9 IP=0003 NV UP EI PL NZ NA PO NC
0BA9:0003 8ED8 MOV DS,AX
-T
AX=0BA8 BX=0000 CX=002C DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=0005 NV UP EI PL NZ NA PO NC
0BA9:0005 B10A MOV CL,0A
-T
AX=0BA8 BX=0000 CX=000A DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=0007 NV UP EI PL NZ NA PO NC
0BA9:0007 BB0000 MOV BX,0000
-T
AX=0BA8 BX=0000 CX=000A DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=000A NV UP EI PL NZ NA PO NC
0BA9:000A B400 MOV AH,00
-G CS: 0018
AX=0037 BX=000A CX=0000 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=0018 NV UP EI PL ZR NA PE NC
0BA9:0018 B44C MOV AH,4C