汇编中如何显示某个寄存器中的内容
答案:1 悬赏:40
解决时间 2021-10-18 02:25
- 提问者网友:黑米和小志
- 2021-10-17 18:24
汇编中如何显示某个寄存器中的内容
最佳答案
- 二级知识专家网友:天凉才是好个秋
- 2021-10-17 19:21
谢谢……我是来拿分的
data segment
str db '1+2+3+4+...+100=$'
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
lea dx,str
mov ah,9
int 21h
xor ax,ax
mov cx,100
next:
add ax,cx
loop next
call display
mov ah,4ch
int 21h
display proc near
xor cx,cx
mov bx,10
continue1:
xor dx,dx
div bx
push dx
inc dx
inc cx
cmp ax,0
jnz continue1
continue2:
pop dx
add dl,30h
mov ah,2
int 21h
loop continue2
ret
display endp
code ends
end start
data segment
str db '1+2+3+4+...+100=$'
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
lea dx,str
mov ah,9
int 21h
xor ax,ax
mov cx,100
next:
add ax,cx
loop next
call display
mov ah,4ch
int 21h
display proc near
xor cx,cx
mov bx,10
continue1:
xor dx,dx
div bx
push dx
inc dx
inc cx
cmp ax,0
jnz continue1
continue2:
pop dx
add dl,30h
mov ah,2
int 21h
loop continue2
ret
display endp
code ends
end start
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息