汇编输出数字问题,请教高手,怎么把SUM输出到屏幕啊!
编写程序完成10个数的求和:SUM=a1+a2+.....+a10;DATA SEGMENT
BUFFER DW 1,2,3,4,5,6,7,8,9,10
SUM DW ?
DATA ENDS
STACK SEGMENT
DB 100 DUP(?)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA, SS:STACK
START:
MOV AX,DATA
MOV DS,AX
MOV AX,0
MOV DI,OFFSET SUM
MOV BX,OFFSET BUFFER
MOV CX,10
LOOP1:
ADD AX,[BX]
INC BX
INC BX
DEC CX
JNZ LOOP1
MOV [DI],AX
MOV AX,4C00H
INT 21H
CODE ENDS
END START
问题补充:
知道DOS调用,我不会写,出来的是乱码,就是DOS调用具体怎么写啊!?