《微机原理与接口技术第四章答案计算机计算机原理计算机计算机原理.pdf》由会员分享,可在线阅读,更多相关《微机原理与接口技术第四章答案计算机计算机原理计算机计算机原理.pdf(3页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 习题4.1 data segment lp:mov al9si buf db ABCDE mov di,al bufr db 5 dup,$inc si data ends dec di dec ex code segment jnz Ip assume cs:code,ds:data lea dx,bufr startzmov ax,data mov ah,9 mov ds,ax lea si,buf int 21 h lea di,bufr mov ah,4ch add dijength bufr-1 int 21 h mov ex,length bufr code ends end s
2、tart 习题4.14 data segment buf db 9 db 0,1,2,3,1,0,0,3,2 data ends code segment assume cs:code,ds:data start:mov ax,data mov ds,ax xor ex,ex mov cl,buf lea si,buf+1 mov di,si11:mov al,si emp al,0 jz next mov di,al inc di jmp next2 next:dec buf next2:inc si dec ex jnzh mov ah,4ch int 21 h code ends end
3、 start 习题425 code segment assume cs:code startzmov bl,1 xor ax,ax xor ex,ex lp:mov al,bl mul al inc bl add ex,ax emp ex,2000 jle Ip dec bl mov dl,bl mov cl,4 shr dl,cl or dl,30h mov ah,2 int 21 h 习题4.35 data segment Ip1:inc si str1 db fabcA111cB7$f dec ex data ends jnzlp code segment lea dx,str1 ass
4、ume cs:code,ds:data mov ah,9 start:mov ax,data mov ds,ax int 21 h lea si,str1 mov ah,4ch int 21 h mov ex,9 code ends Ip:emp byte ptr si,60h end start jblpl emp byte ptr si,7Ah ja Ip1 and byte ptr si,5fh mov dl,bl and dl,Ofh or dl,30h mov ah,2 int 21 h mov dl/H*mov ah,2 int 21 h mov ah,4ch int 21 h c
5、ode ends end start data segment mov bx,number lea dx,str number dw 25afh and bx,OfOOh mov ah,9 strdb4dup(?);$*mov cl,8 int 21 h data ends shr bx,cl mov ah,4ch call hexasc int 21 h code segment assume cs:code,ds:data mov bx,number hexasc proc start:mov ax,data and bx,OOfOh cmp bl,Oah mov ds,ax mov cl,4 jb 11 shr bx,cl add bl,07h lea si9str call hexasc 11:add bl93Oh mov bx,number mov si,bl and bx9OfOOOh mov bx,number inc si mov cl,12 and bx,OOOfh ret shr bx,cl call hexasc hexasc endp call hexasc code ends end start
限制150内