DATAS SEGMENT
bdata db 01h,02h,03h,04h,05h,06h,07h,08h,09h,0ah
sum db 00h
DATAS ENDS
STACKS SEGMENT
;此处输入堆栈段代码
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
;此处输入代码段代码
xor si,si
mov al,bdata[si]
mov bl,0
mov cx,10
again:
add bl,bdata[si]
inc si
loop again
mov sum,bl
mov al,[sum]
and al,0f0h
mov cl,4
shr al,cl
add al,30h
cmp al,39h
jbe next
add al,07h
next: mov ah,02h
mov dl,al
int 21h
mov al,[sum]
and al,0fh
add al,30h
cmp al,39h
jbe next1
add al,07h
next1: mov ah,02h
mov dl,al
int 21h
MOV AH,4CH
INT 21H
CODES ENDS
END START
你妹啊 好好读书 小飞哥很生气的