Home > other >  Is there a person how do output N and SUM, something about how to write code, thank you
Is there a person how do output N and SUM, something about how to write code, thank you

Time:10-20

The DATA SEGMENT
The SUM DW?
N the DW?
The DATA ENDS
CODE SEGMENT
ASSUME the DS: DATA, CS: CODE
START:
MOV AX, DATA
MOV DS, AX
MOV AX, 0
MOV BX, 0

LOP: INC BX
The ADD AX, BX
CMP AX, 2000
JBE LOP

MOV SUM, AX
MOV N, BX
MOV DL, N

MOV AH, 02 h
INT 21 h

MOV AX, 4 c00h
INT 21 h
CODE ENDS
The END START

CodePudding user response:

Output value, can take a look at this web page: https://zhidao.baidu.com/question/156376433.html
Mainly in outputNumber procedure,
  • Related