已阅读5页,还剩17页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1 2 1.8086CPU16CPU 168086CPU 8086CPU16 16 2.8086CPU Bus Interface UnitBIUExecution UnitEU BIUEUBIU CPU 3.8086CPU816 8086 AXBXCXDX168 80868 4.8086CPUIP IP IPCS 8086IP 5. CFPFAFZFSFOF CF CF=1CF=0 PF1 PF=1PF=0 AF4 AF=1AF=0 ZFZF=1ZF=0 SF OF OF=1OF=0 6.8 8 8 IP SF 2 190H+3CH23CH- 90H37DH- 9CH 1CCHCF=0 PF=1AF=0 ZF=0 SF=1 OF=0 CCHCF=0 PF=1AF=0 ZF=0 SF=1 OF=0 2ACHCF=1 PF=1AF=0 ZF=0 SF=1 OF=1 ACHCF=1 PF=1AF=0 ZF=0 SF=1 OF=0 3E1HCF=1 PF=1AF=0 ZF=0 SF=1 OF=1 E1HCF=1 PF=1AF=0 ZF=0 SF=1 OF=0 7.10000H 22Bb0 12H1004H- 10 420H12345678H0 1 22Bb0 10 000H 02H32H42H62H30H 2 12H1004H- 10 10000H12H04HFFH00H 10001H00H10HFFH00H 3 420H12345678H0 10001H20H78H00H 10002H04H56H00H 10003H00H34H00H 10004H00H12H00H 8.8086CPU 8086CPU2020bit8086 20 2B=1MB 9.8086 808616 16 2=64KB80861616 010H 10. 12H1004H- 1012H1004H- 10 10000H12H04HFFH00H10000H12H04HFFH00H 10001H00H10HFFH00H10001H00H10HFFH00H 420H12345678H0420H12345678H0 10001H20H78H00H10001H20H78H00H 10002H04H56H00H10002H04H56H00H 12H1004H- 1012H1004H- 10 10000H12H04HFFH00H10000H12H04HFFH00H 10001H00H10HFFH00H10001H00H10HFFH00H 420H12345678H0420H12345678H0 10001H20H78H00H10001H20H78H00H 10002H04H56H00H10002H04H56H00H 10003H00H34H00H10003H00H34H00H 10004H00H12H00H10004H00H12H00H 20 3 11.8086CPU 12. 8086 BIU4CSDSSSESCPU4 4 13.CS=7F00HIP=017CH CS*10H+IP=7F00H*10H+017CH=7F000H+017CH=7F17CH 14.DS=5C00HES=5D10H63654H DSES DSIP=63654H- DS*10H=63654H- 5C000H=7654H ESIP=63654H- ES*10H=63654H- 5D100H=6554H 15.I/O8086CPU I/O 8086I/O 16 2=64KB16 808616I/O 16.Intel3216 116163216 8 2IP1632EIP 316FSGS 4Flags1632EFLAGS 321616 32Intel 17.32 180868086 2 DSDS*10H=63654H- 5C000H=7654H*10H=63654H- 5C000H=7654H =63654H- ESES*10H=63654H- 5D100H=6554H*10H=63654H- 5D100H=6554H 000H+017CH=7F17CH000H+017CH=7F17CH 63654H63654H *10H=63654H- 5C000H=7654H*10H=63654H- 5C000H=7654H *10H=63654H- 5D100H=6554H*10H=63654H- 5D100H=6554H 80868086I/O I/OI/O 16 4 3808680868086 8086168086 32 18. 4KB 3 1. 2. 3. 4. MOV AX420H MOV BXSI MOV AX90 MOV DI+90AH MOV ALBP+SI+20 1)MOV AX, 420H 2)MOV BX, SI 3)MOV AX, 90 4)MOV DI+90, AH 5)MOV AL, BP+SI+20 1)MOV AX, 420H 5 2)MOV BX, SI 3)MOV AX, 90 4)MOV DI+90, AH 5)MOV AL, BP+SI+20 5. MOV AXSI+20H MOV AL1000H MOV AXES:BXSI MOV AXBP+1234H 1DS2DS3ES4SS 6.BX=2010HDI=0FFF0HBP=420H MOV AX2345H MOV AXBX MOV AXES:DI+200 MOV AXDS:BP+DI MOV AXBX+DI+114H 1)MOV AX, 2345H2345H 2)MOV AX, BX2010H 3)MOV AX, ES:DI+2000B8H 4)MOV AX, DS:BP+DI410H 5)MOV AX, BX+DI+114H2114H 7.MOV 1MOVALU 2MOV CS 8.8086 80868086 SSSPSPSS SP0SPSP 9.SS=0FF00HSP=00B0H8086H0F20HPUSH POP PUSH |0FF00HSS 1)MOV AX, 2345H2345H1)MOV AX, 2345H2345H 2)MOV AX, BX2010H2)MOV AX, BX2010H 3)MOV AX, ES:DI+2000B8H3)MOV AX, ES:DI+2000B8H 4)MOV AX, DS:BP+DI410H4)MOV AX, DS:BP+DI410H 5)MOV AX, BX+DI+114H2114H5)MOV AX, BX+DI+114H2114H ALUALU 6 |20H|0FFACHSP |0FH|0FFADH |86H|0FFAEH |80H|0FFAFH POP |0FF00HSS |86H|0FFAEHSP |80H|0FFAFH 10.BXSICX LEACXBX+SI 11.CFZFOFSF MOV BX40ABH ADDBL09CH MOV AL0E5H CBW ADDBHAL SBBBXAX ADCAX20H SUBBH9 MOV BX40ABH;40ABHBX ADDBL09CH;9CHABH47HBLCF=1ZF=0 ;OF=1SF=0 MOVAL0E5H;E5HAL CBW;ALAXFFE5H ADDBHAL;ALE5HBH40H25HBH ;CF=1ZF=0OF=1SF=0 SBBBXAX;BX2547HAXFFE5H ;CF=12561HBXCF=1ZF=0OF=1SF=0 ADCAX20H;AXFFE5H20HCF=10006H ;AXCF=1ZF=0OF=1SF=0 SUBBH9;BH25HF7H1BHBH CF=1 ;ZF=0;OF=1SF=0 12. 8168AL OFOF 40ABH 09CH;9CH9CH 7 816AX16AX 1632DX:AX816AX 88AL8AH1632DX:AX 1616AX16DX 13.DL MOVALDL IMULDL MULDL 14. DHBH DI51 AX031,7913150 BX2591 CX16111 AX029130 DX1411140 1MOVBHF8H ANDBHDH 2ORDIFFF8H 3ORAX000FH XORAX0380H ANDAX1FFFH 4MOVDXBX TESTDX0004H;ZF=021 TESTDX0020H;ZF=051 TESTDX0200H;ZF=091 5XOR CX0824H JEYES 6TESTDX0001H;ZF=100 0 0380H0380H 8 TESTDX0002H;ZF=120 TESTDX0200H;ZF=190 TESTDX2000H;ZF=1130 7XOR DX4812H JEYES 15.NOTNEGDXAX NOTNEG NOTAX NOTDX ADDAX1 ADCDX0 16.404922 MOVAX0028H;40AX SHLAX1;AX*2 MOVAX0028H;40AX SARAX1;AX/2 MOVAXFFCFH;- 49AX SHLAX1;AX*2 MOVAXFFCFH;- 49AX SARAX1;AX/2 17. MOV CL4 SHLDXCL MOV BL4H SHLAXCL SHRBLCL AXAX *2 4040AX - 49- 49AX AXAX*2*2 FFCFH; 9 ORDLBL MOVCL4;4CL SHLDXCL;DX*16 MOV BL4H;4HBL SHLAXCL;AX*16 SHRBLCL;BL40 ORDLBL;BL0DL 18.DF STDDF=1CLDDF 19.1000B00H1 20. CSIP CSIP 21. 5ZF CFOFSFPF CMPAX1;AX- 1 JZEqual;ZF=1Equal Equal 22.AXBXCXDX DXCXEXCEED BXAXEXCEED 10 CX=0ZERO BXAXOVERFLOW BXAXNOTBIG DXCXNOTBIG 1CMPDXCX JAEXCEED 2CMPBXAX JGEXCEED 3CMPCX0 JZZERO 4CMPBXAX JOOVERFLOW 5CMPBXAX JLENOTBIG 6CMPDXCX JBENOTBIG 23.1000B00H 1 LEASI0B00H MOVCX100 L1MOVAXSI INCAX MOVSIAX ADDSI2 LOOPL1 24. 11 25.CALLSUB1SUB1JMP PUSHIP JMPSUB1 26.SUB1RETJMP POPBX ;IP JMPBX 27.60H MOVAX,0 MOVES,AX;0 LDSSI,ES:60H*4;*44 ;LDS 28.1CH 0FA00:100H 4 1 1 23 4 1 23 1 2 ; ; 0 12 2 3END END1 ENDEND2END END 4 1B_VAR DB ABCD, 12, 12, 3 DUP (?, 0, 2 DUP ( 1, 2) 2W_VAR DW AB,256, 1, 5 DUP (?, 1, 2) 5 1 23 1 23 6 DATASEGMENT V1DW ? V2DB 16 DUP (?) V3DD ? DSIZE EQU $ V2 DATAENDS V1V2V3DSIZE V10V12 V22V21616V3 18V34422DSIZE$- V222- 2=20 7B1W120 DATAUNION B1DB 20DUP (?) W1 DW 10DUP(?) DATAENDS 8 EVEN 9MOV BX1 V1 13 BIPTR MOVWORDPTR BI,1 10MOV BX, VARMOV BX, OFFSET VARVAR MOVBX, VARVARBX MOVBX, OFFSEVARVARBX 11 VAR DWAB,256, 1, 5 DUP(?, 1, 2) 1VARAX 2VAR1AX 3VAR1BX 4VAR4AL 1MOVAX, OFFSEVAR 2MOVAX, OFFSEVAR+4 3MOVAX, OFFSEVAR+4 4MOV AL, OFFSEVAR+4 12VAR 1XOR BX, SIDI 2SUBSI, 91 3OUT 300H,AL 4JMP DWORD PTR BX 5MOVBX, SS:SP 6TESTAL, 8000H 7CMP BYTE PTR BX, BYTE PTR SI 8ANDVAR, OFFSET VAR 9SUBSI, 1 10ADD BX, SS:VAR 11MOVAX, BX SI 12MOV 25, BL 13SUB CX, $+10 14MOV DS, BP 15MOVAX, BX + VAR 1XORBX,SIDI 2SUBSI,- 91 3OUT300H,AL 4JMPDWORDPTRBX 5MOVBX,SS:SP 6TESTAL,8000H 7CMPBYTEPTRBX,BYTEPTRSI JMP DWORD PTR BXJMP DWORD PTR BX CMP BYTE PTR BX, BYTE PTR SICMP BYTE PTR BX, BYTE PTR SI ANDVAR, OFFSET VARANDVAR, OFFSET VAR ADD BX, SS:VARADD BX, SS:VAR 14 8ANDVAR,OFFSETVAR 9SUBSI,1 10ADDBX,SS:VAR 11MOVAX,BX- SI 12MOV 25,BL 13SUBCX,$+10 14MOV DS,BP 15MOVAX,BX+VAR 13DDVAR1 COUNT DATASEGMENT X DD 0FFFFFFFH XL EQU WORD PTR X XH EQU WORD PTR X+2 COUNT DW 0 DATAENDS STACK SEGMENT STACK DW 100H DUP(?) STACK ENDS CODE SEGMENT ASSUME CS:CODE DS:DATASS:STACK START:MOV AX,DATA MOV DS,AX;DATAAX MOV DX,XL MOV BX,8000H MOV CX,16 XLL:CALL COUNT0;COUNT LOOP XLL MOV DX,XH MOV BX,8000H MOV CX,16 XHH:CALL COUNT0 LOOP XHH MOV AX,COUNT MOV BL,10 DIV BL ADD AL,0;AL ADD AH,0;AH PUSH AX MOV DL,AL ASSUME CS:CODE DS:DATASS:STACKASSUME CS:CODE DS:DATASS:STACK START:MOV AX,DATA MOV DS,AX;DATA ASSUME CS:CODE DS:DATASS:STACKASSUME CS:CODE DS:DATASS:STACK MOV DS,AX;DATAMOV DS,AX;DATA MOV BX,8000H MOV CX,16MOV CX,16 XLL:CALL COUNT0;XLL:CALL COUNT0; LOOP XLLLOOP XLL 15 MOV AH,2 INT 21H POP AX MOV DL,AH MOV AH,2 INT 21H MOV AX,4C00H;DOS INT 21H COUNT0 PROC NEAR;1 MOV AX,DX OR AX,BX;1 CMP AX,DX ; JZ DONE K:SHR BX,1; RET DONE:INC COUNT;COUNT+1 JMP K COUNT0 ENDP CODE ENDS END START 14abc CF1CF0 15String0 DATASEGMENT STR DB “ABCDELP“,0 N EQU $- DATA DATAENDS STACK SEGMENT STACK DW 20 DUP(?) STACK ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOVAX,DATA MOV DS,AX CYCLE: LEABX,STR AGAIN: CMP BYTE PTR BX,0 16 JE EXIT CMP BYTE PTR BX,20H JNE NEXT DELETE: PUSH BX MOV DL,BX+1 MOV BX,DL INC BX CMPBX+1,0 JZ NEXT JMP DELETE NEXT: POP BX INC BX JMPAGAIN EXIT: MOV SI,0 CMPBYTE PTR SI,20H JE CYCLE LEABX,STR COMPARE: CMP BYTE PTR BX,20H JE PRINT INC BX JMP COMPARE PRINT: MOV BX,$ LEADX,STR MOVAH,09H INT 21H MOVAH,07H INT 21H MOVAX,4C00H INT 21H CODE ENDS END START 16Buff2000 N1N2N3 DATASEGMENT SAVE DB 3 DUP(?) 17 NUM DW 100 DUP(?) DATAENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START:MOVAX,DATA MOV DS,AX MOV CX,100 XOR BX,BX XOR DX,DX LEASI,NUM SUB SI,2 NEXT1:ADD SI,2 CMP SI,0 JNZ NZ INC BL ; JMP OK NZ:TEST SI,8000H JNZ N INC DH ; JMP OK N:INC DL ; OK:LOOP NEXT1 MOV SAVE,DH ; MOV SAVE+1,DL MOV SAVE+2,BL MOVAH,4CH INT 21H CODE ENDS END START 17Result45 18 CALL IPRETIP CSIPIPCS 19RET PROC RET 20 18 21 123 22 1ABS(x)=|x| 2F(x)=3x2+ 5x8 3strlen(String)0 23n1NUMFIB(n) RESULT Fibonacci STACKSEGMENT STACK STACK DW 32 DUP(0) STACKENDS DATASEGMENT ADB 8 DUP(0) OBFDB 3,0,3 DUP(0) DATAENDS CODESEG
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年自动化立体仓库项目评估分析报告
- 2019粤教版 高中美术 选择性必修6 现代媒体艺术《第二单元 前期的知识与技能》大单元整体教学设计2020课标
- 2024届果洛市重点中学高三普通高校统一招生考试仿真卷(一)数学试题试卷
- 2024届广西贺州市平桂区平桂高级中学高三下学期4月月考试题
- 财务审核合同批语
- 补漏项目合同
- 被迫解除劳动合同经济补偿金案例
- 保险免责赔偿申请书
- 山西省2024八年级物理上册第六章质量与密度第4节密度的应用课件新版新人教版
- 游戏动画设计规范
- GB/Z 43281-2023即时检验(POCT)设备监督员和操作员指南
- (完整)痔疮手术知情同意书
- 八年级上册英语Unit8写作课课件(人教版)
- 《简单教数学》读书 分享
- 国开2023秋《习近平总书记教育重要论述研究》形考任务四参考答案
- 腹腔镜手术的麻醉管理
- 青少年社会支持评定量表
- 幼儿园儿歌-《秋叶》课件
- (含解答)《新药研究与开发(本科)》2023年12月中医大作业考核试题
- 人教PEP版(2023版)小学英语六年级上册电子课本
- 江苏开放大学2023年秋《大学英语(B)(2) 060052 》过程性考核作业4(综合性大作业)(占全过程性考核总评成绩30%)(实践性作业)参考答案
评论
0/150
提交评论