sseg segment stack
stk db 50 dup(0)
sseg ends
dseg segment
count equ 99
result dw ?
dseg ends
cseg segment
assume ds:dseg,cs:cseg,ss:sseg
start: mov ax,dseg
mov ds,ax
mov ax,sseg
mov ss,ax
mov sp,size stk
;==============================计算开始
mov cx,count
xor ax,ax ;ax清零
xor dx,dx
inc ax
sum: add dx,ax
inc ax
loop sum
mov result,dx ;把结果放在result中
call showD
mov ax,4c00h
int 21h
;显示10进制数子程序
showD proc near
mov cx,1000
call Show1
mov cx,100
call show1
mov cx,10
call show1
mov cx,1
call show1
ret
showD endp
show1 proc
mov ax,dx
xor dx,dx
div cx
push dx
add al,30h
mov dl,al
mov ah,2
int 21h
pop dx
ret
show1 endp
;======================结束
cseg ends
end start
dim sum,i
sum=0
for i = 1 to 99
sum=i + sum
next i
print "1+2+3....+99=" & sum
想用什么语言编写啊