org 100h
.data
dt1 db 1,2,3,4,5,6,7,8,9,10
dt2 db 2 DUP(0)
.code
mov ax,@data
mov ds,ax
mov si,offset dt1
mov di,offset dt2
MOV CX,0aH
MOV Ax,0000H
MOV BX,0000H
label:
MOV Bl,[si]
ADD Ax,Bx
INC SI
LOOP label
MOV [DI],Ax
MOV BL,0ah
DIV BL
inc di
MOV [DI],Ax
hlt
0 التعليقات:
إرسال تعليق