资源描述:
《汇编语言课后习题答案.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Chapt31、指针值指针堆栈1FFCH5000H1FFEHSP3000H2000HSP①1FFEH②1FFEH(AX)=5000H(BX)=5000H2、不正确movax,ds:[2000hMovds:[1000h],ax]3、①movax,2a79hMovdx,7b1dhSubax,345fhSbbdx,53e2h②假定字在AX中则Movbx,axMovcl,4Shlax,clShlbx,1Addax,bx③不要求④MOVCL,4SHLAX,CLANDAX,0FF00HSHLBX,CLANDBX,0F0HROLDX,CLANDDX,
2、0FHADDAX,BXADDAX,DX⑤MOVAL,[BX]XCHGAL,[BX+3]MOV[BX],ALMOVAL,[BX+1]XCHGAL,[BX+2]MOV[BX+1],AL⑥MOVAL,BHMOVCL,4SHRAL,CLANDBH,0FHMOVDL,BLSHRBL,CLANDDL,0FHMOVCL,BLMOVBL,BHP44T1ops opd① 立即数寻址 R寻址② R间接寻址 R寻址③ 变址寻址 R寻址④基址加变址寻址 R寻址⑤ R寻址 变址寻址⑥ 立即数寻址 R寻址⑦ 基
3、址加变址寻址 R寻址 T2指令是否正确OPD地址执行前执行后Movax,3√AX0AAH3Sub[ax],3×Subbx,ax√BX0BBH0AAHAddbx,2√BX0BBH0BDHSubbp,2√BP5000H4FFEHSub[cx],2×Adddi,2√DI6000H6002HMov[bx],bx√100BBH200H00BBHMoves:[dx],bx×Movdx,bx√DX0DDH0BBHSub2[dx],ax×Add500h[bp],ax√35500H355H3FFHSub[si-300h],ax√13D00H0F13D
4、H0F073HMov[ax+2],bx×T3 ①(AX)=1200H ②(AX)=0100H ③(AX)=1200H④(AX)=3412H ⑤(AX)=4C2AH ⑥(AX)=7856H⑦(AX)=65B7HT4①× 类型不一致 MOV AX,BX②√ ③× 无类型 INC BYTE PTR [BX]④×立即数不能为目的操作数 moval,5⑤× 两个操作数不能同时为存储器操作数 movax,[si]mov[bx],ax⑥√⑦√⑧×CS不能为目的操作数⑨× 立即数不能传送给段寄存器操作数 Movax,3278hMove
5、x,ax⑩×堆栈为字操作,AL为字节寄存器 pushaxChapt4P57T2参考4.4.4T300da101da241h241h30441h506adr0718094100h的字单元有2个 偏移为1 和4T4 16个T5 var1dw‘ba’,’dc’,’fe’,’hg’,’ji’或var2db‘badcfehgji’P63T2(AX)=3433hP65T101h0x02h103h258h3y34h4(Z)=302hT201h0x02h103h2358h4y34h5T3y=($-x)/2T4①1 data1db0fh2Movax
6、,data1②1data2db,10h2movbl,data2③1data3db‘EFDABC’2DATA3DW‘FE’,’AD’,’CB’④1DATA4DW3E2H2DATA4DB0E2H,3⑤1ASSUMECS:COSEG,DS:DASEG12ASSUMECS:COSEG,DS:DASEG2.ES:DASEG1T5ORG16或db16dup(?)ORG32或 db12dup(?)或 align16Chapt6P93T1① CMP CX,DXJA LL② CMP AX,BXJNG LL③ CMP DX,0 JE LL④ CMP C
7、X,DX JBE LLT2 DATA SEGMENT A DW X B DW X C DW XMSG1 DB ‘Yes$’MSG2DB‘NO$’DATA ENDSCODE SEGMENT ASSUME DS:DATA,CS:CODESTART:MOVAX,DATAMOVDS,AXMOVAX,AMOVBX,BMOVCX,CADDAX,BXCMPAX,CXJLELLNADDBX,CXCMPBX,AJLELLNADDCX,ACMPCX,BJLELLNLEADX,MSG1JMPEXIT0LLN:LEADX,MSG2EXIT0:MO
8、VAH,9INT21HMOVAH,4CHINT21HCODEENDSENDSTARTT3:DATASEGMENTBUFFERDBX,X,XDATAENDSCODESEGMENTASSUMEDS:DATA,C