好文档 - 专业文书写作范文服务资料分享网站

微机原理与接口技术试题库(含答案)

天下 分享 时间: 加入收藏 我要投稿 点赞

AGAIN: CMP AL,ES:[DI] INC DI

LOOP AGAIN

五、是非判断题

(1)A(2)B(3)B(4)A(5)B(6)A(7)A(8)A(9)A(10)A 六、请阅读下列程序,分析其功能或结果

1、读取键盘输入,并显示在显示器上。 2、 在打印机一输出字符‘B’,并回车。

3、屏幕初始化,左上角行号为2,左上角列号为5,右下角行号为22,右下角列号为38,使用整个空白窗口。

4、在屏幕上输出PRESS ANY KEY并换行回车。 5、在屏幕上输出1 七、编写程序

1、答案: abc: mov ah,1 int 21h cmp al,’a’ jb stop cmp al,’z’ ja stop sub al,20h mov dl,al mov ah,2 int 21h jmp abc stop: ret 2、答案:

datarea segment string1 db ‘asfioa’ string2 db ‘xcviyoaf’ mess1 db ‘MATCH’,’$’ mess2 db ‘NO MATCH’,’$’ datarea ends prognam segment main proc far assume cs:prognam,ds:datarea start: push ds sub ax,ax push ax mov ax,datarea mov ds,ax mov es,ax begin:

mov cx, string2-string1 mov bx, mess1-string2 cmp bx,cx jnz dispno lea dx,addr lea si,string1 lea di,string2 repe cmpsb jne dispno mov ah,9 lea dx,mess1 int 21h ret dispno: mov ah, 9 lea dx, mess2 int 21h ret main endp prognam ends end start 3、答案: data segment array dw 3 dup(?) data ends code segment main proc far assume cs:code,ds:data start: push ds sub ax,ax push ax mov ax,data mov ds,ax mov cx,3 lea si,array begin: push cx mov cl,4 mov di,4 mov dl, ‘ ‘ mov ah,02 int 21h mov dx,0

input: mov ah,01 int 21h and al,0fh shl dx,cl or dl,al dec di jne input mov [si],dx add si,2 pop cx loop begin comp: lea si,array mov dl,0 mov ax,[si] mov bx,[si+2] cmp ax,bx jne next1 add dl,2 next1: cmp [si+4],ax jne next2 add dx,2 next2: cmp [si+4],bx jne num add dl,2 num: cmp dx,3 jl disp mov dl,3 disp: mov ah,2 add dl,30h int 21h ret

main endp code ends end start 4、答案: dseg segment a dw ? b dw ?

dseg ends cseg segment mainproc far

assume cs:cseg,ds:dseg start:push ds sub ax,ax push ax mov ax,dseg mov ds,ax begin: mov ax,a mov bx,b xor ax,bx test ax,0001 jz class test bx,0001 jz exit xchg bx,a mov b,bx jmp exit class: test bx,0001 jz exit inc b inc a exit: ret mainendp cseg ends end start 5、答案: dseg segment grade dw 30 dup(?) rank dw 30 dup(?) dseg ends cseg segment mainproc far

assume cs:cseg, ds:dseg, es:dseg start:push ds sub ax,ax push ax mov ax,dseg mov ds,ax mov es,ax begin: mov di,0 mov cx,30 loop1: push cx

mov cx,30 mov si,0 mov ax,grade[di] mov dx,0 loop2: cmp grade[si],ax jbe go_on inc dx go_on: add si,2 loop loop2 pop cx inc dx mov rank[di],dx sdd di,2 loop loop1 ret mainendp cseg ends end start 6、答案: mov si, 0 mov di, 0

test12: in al, 0024h test al, 08 jnz exit in al,0036h test al, 08 jnz exit dev1: in al, 0024h test al, 01 jz dev2 in al, 0026h mov buffer[si], al inc si dev2: in al, 0036h test al, 01 jz test12 in al, 0038h mov buff2[di],al inc di jmp test12 exit: ret 7、答案:

scode db 7,5,9,1,3,6,8,0,2,4 buffer db 10 dup(?)

微机原理与接口技术试题库(含答案)

AGAIN:CMPAL,ES:[DI]INCDILOOPAGAIN五、是非判断题(1)A(2)B(3)B(4)A(5)B(6)A(7)A(8)A(9)A(10)A六、请阅读下列程序,分析其功能或结果1、读取键盘输入,并显示在显示器上。2、在打印机一输出字符‘B’,并回
推荐度:
点击下载文档文档为doc格式
5s8dr93ewd99g5n14c1l
领取福利

微信扫码领取福利

微信扫码分享