1 / 8

汇编语言练习

汇编语言练习. 1 、下列指令中,不影响进位的指令是()。 A. ADD AX,10 B. SAL AL,1       C. INC CX D. SUB AX,BX 2 、 下列指令中 , 有语法错误的指令是()。 A. MOV AX,[BX][SI]      B. LEA DI,[2000H]      C. OUT DX,AL D. SHL BX,2 3 、不需要访问内存的寻址方式是 _______ A .直接寻址 B. 立即寻址 C. 间接寻址 D. 变址寻址

dawson
Download Presentation

汇编语言练习

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 汇编语言练习

  2. 1、下列指令中,不影响进位的指令是()。 A. ADD AX,10 B. SAL AL,1       C. INC CX D. SUB AX,BX 2、 下列指令中,有语法错误的指令是()。 A. MOV AX,[BX][SI]      B. LEA DI,[2000H]      C. OUT DX,AL D. SHL BX,2 3、不需要访问内存的寻址方式是_______ A.直接寻址 B.立即寻址 C.间接寻址 D. 变址寻址 4、下列逻辑部件中,_______不包括在运算器内。 A. 状态条件寄存器 B. 指令寄存器 C. ALU D. 累加器 5、在8086CPU的引脚中,用于接收硬件中断请求信号的引脚有。 A.1个 B.2个 C.8个 D.15个 6、8086CPU的寄存器中,通常用作数据寄存器,且隐含用法为I/O端口的间址寄存器的是。 A.AX B.BX C.CX D.DX 7、8086CPU系统最小工作方式时,为了实现地址锁存,至少需配置地址锁存器芯片74LS373 (或8282)的片数是。 A.l B.2 C.3 D..4

  3. 画图表示以下数据段在存储器中的存放形式:(10分)画图表示以下数据段在存储器中的存放形式:(10分) DATA SEGMENT ORG 100H DATA1 DB ’BYTE’,12,12H,2 DUP(0,?,3) DATA2 DW 2 DUP(42H) DATA3 DW 4 DUP(0,1,2),?,-5,256H DATA4 EQU 12 DATA5 DD ABCDH DATA ENDS

  4. 请写出下列指令单独执行后,有关寄存器及存储单元的内容。请写出下列指令单独执行后,有关寄存器及存储单元的内容。 假设指令执行前(SS)=7100H,(DS)=(ES)=3000H, (AX)=2000H, (BX)=1200H, (SI)=2, (31200H)=2400H, (31202H)=90F7H, (72200H)=47H, (72201H)=03H • (1)ADD ES:[BX],900H 答: • (2)MUL WORD PTR [BX+SI] 答:

  5. 分析计算并填空:(20分,每空1分) • MOV AX,3380H • MOV CX, 0F000H • MOV DS,AX • MOV SI,CX • SUB CX,AX ; CX=___BC80H______ CF=__0____ • MOV [SI],CX ;[SI]=____80H_____,[SI+1]=___BCH_____ • SBB [SI],AL ;[SI]=___00H_____,[SI+1]=___BCH______ • INC BYTE PTR[SI] ;[SI]=___01H______,ZF CF PF=__000__ • MOV AL,08 • SBB AX,09 ;AX=____32FFH______,CF AF=_01____ • AAS ;AX=___3109H_______,CF AF=_11____ • SUB AL,68H ;AL=__A1H________,CF AF=_10____ • DAS ;AL=___41H_______, • AND AL,0FH • MOV BX,-10 • NEG BX ;BX=___000AH_____ • MOV DL,60H • MUL DL ;AX=___0060H______ • OR AX,0FF00H • CWD ;AX=__FF60H_______ • IDIV BX ;AX=___FFF0H______; DX=___0000H______ • MOV AH,4CH • INT 21H

  6. 请把下列程序填写完整,并回答问题 TITLE EXAMPLE.ASM DATA SEGMENT A DW 0 B DW 0 C DW 230,20,54 ; CODE SEGMENT ASSUME PROG PROC FAR START: PUSH DS MOV AX,0 MOV AX,DATA MOV BX, C MOV AX,[BX] MOV B,AX MOV AX,2[BX] ADD AX,B MOV A,AX EXIT: CODE ENDS DATA ENDS CS:CODE, DS:DATA PUSH AX MOV DS,AX OFFSET RET PROG ENDP END START

  7. 编程题 DATA SEGMENT W DW XX QUOT DW ? REMA DB ? DATA ENDS CODE SEGMENT MOV AX,W SHR AX,1 RCR REMA,1 SHR AX,1 RCR REMA,1 SHR AX,1 RCR REMA,1 SHR AX,1 RCR REMA,1 MOV QUOT,AX MOV CL,4 SHR REMA,CL CODE ENDS • 编写程序段实现将字变量W中的无符号数除以16,商和余数分别放人字变量QUOT和字节变量REMA中。(仅能用移位指令和传送指令,不能使用乘法指令)

More Related