ALP to find average of two numbers
DATA SEGMENT
SERIES DW 1234H, 1378H,
AVG DW 01H DUP(?)
DATA ENDS
CODE SEGMENT
START: MOV AX, DATA
MOV DS, AX
MOV CL, 02H
LEA SI, SERIES
MOV AX, [SI]
MOV BX, [SI + 2]
ADD AX, BX
DIV CL
LEA DI, AVG
MOV [DI], AX
MOV AH, 4CH
INT 21H
CODE ENDS
END START
No comments:
Post a Comment