急!!!!求解微机原理编程题

2024-12-28 05:52:26
推荐回答(1个)
回答1:

1. mov cx,bx
2. mov bl,al
or bl,0F0H
shr bl,4
call ascii
mov ASC,bl
mov bl,al
or bl,0fH
call ascii
mov ASC+1,bl
3.mov cx,100
mov bx,N
mov dx,M
begin:
mov al,[bx]
inc al
mov [dx],al
inc bx
inc dx
loop begin
4.mov bx,N
mov dx,'$'
mov cx,0
begin:
mov ax,[bx]
cmp ax,dx
je next
inc cx
inc bx
jmp begin
next:
mov dx,M
mov [dx],cx
5.
mov dx,046H
mov al,11010100B
out dx,al
6.mov dx,034H
begin:
in al,dx
or al,10000B
je zero
mov al,0ffH
out 035H,al
jmp begin
zero:
mov al,0
out 035H,al
jmp begin
7.
mov dx,087H
mov al,10010110B
out dx,al

可能有小错误,请多指教