jmp near start
title db '1+...+10000'
start:
mov ax,0xb800
mov es,ax
mov ax,0x7c0 ;07c0
mov ds,ax
mov si,title
mov di,0 ;估计是地址递增
mov cx,start-title
@dp:
mov al,[si]
mov [es:di],al
inc di zx
mov byte [es:di],0x07
inc di
inc si
loop @dp
mov bx,1
save:
mov ax,0
mov cx,10000
add ax,bx
inc bx
adc dx,0
loop save
xor cx,cx
mov ss,cx ;栈段
mov sp,cx ; 改成mov sp,0呢
mov bx,10
input:
inc cx ;for output
mov bp,ax
mov ax,dx
xor dx,dx
div bx
xchg bp,ax
div bx
or dl,0x30
push dx
mov dx,bp
cmp dx,0
jne input
cmp ax,0
jne input
output:
pop dx
mov [es:di],dl
inc di
mov byte [es:di],0x07
inc di
loop output
times 510-($-$$) db 0
db 0x55,0xaa
放在主引导扇区里面 只会显示 1+...+10000 前辈帮忙啊啊啊