2个回答
展开全部
data segment
msg1 db 'before $'
msg2 db 'after $'
code segment
assume ds:data,cs:code
start:
mov ax,data
mov ds,ax
mov bx,0ffffH;运行时可以给不同的值
lea dx,msg1
mov ah,9
int 21h
call disp
test bx,8000h
jns plus
neg bx
plus:
lea dx,msg2
mov ah,9
int 21h
call disp
mov ah,1
int 21h
mov ax,4c00h
int 21h
disp proc near
mov ch,4
rotate:
mov cl,4
rol bx,cl
mov al,bl
and al,0fh
add al,30h
cmp al,3ah
jl printit
add al,7h
printit:
mov dl,al
mov ah,2
int 21h
dec ch
jnz rotate
ret
disp endp
code ends
end start
msg1 db 'before $'
msg2 db 'after $'
code segment
assume ds:data,cs:code
start:
mov ax,data
mov ds,ax
mov bx,0ffffH;运行时可以给不同的值
lea dx,msg1
mov ah,9
int 21h
call disp
test bx,8000h
jns plus
neg bx
plus:
lea dx,msg2
mov ah,9
int 21h
call disp
mov ah,1
int 21h
mov ax,4c00h
int 21h
disp proc near
mov ch,4
rotate:
mov cl,4
rol bx,cl
mov al,bl
and al,0fh
add al,30h
cmp al,3ah
jl printit
add al,7h
printit:
mov dl,al
mov ah,2
int 21h
dec ch
jnz rotate
ret
disp endp
code ends
end start
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询