《组成实验报告.docx》由会员分享,可在线阅读,更多相关《组成实验报告.docx(10页珍藏版)》请在课桌文档上搜索。
1、上海理工大学光电信息与计算机工程学院计算机组成实验报告专业计算机科学与技术姓名陈晓阳学号1512480225年级2015级指导教师郭春学成绩:教师签字:目录实验一汇褊实验一4实验二汇编实验二8实蛤三S1.编实验三14!cfI三D01SayrtcB32coaand.cobxIds-2954BX-000CX-R33ES-2944SS-2954955:00RE2A063SUBD-BR0ASP-CS-295SIP-IA1.,(03)BP-WWOS!Af1.0DI-0WR0NUUPEIP1.HZNAPENCDSc03-04-00FFBX-0BCX-033DX-0000SP-0000S-2954ES-29
2、44SS-29S4CS-295S1P-012955:00128A1E040HOUB1.,0041BP-0000HUUPEIDI-0000ACPECVDS:0004-01WX-80FFBX-801CX-033fos-2954ES-2944SS-2954P?55:0016021E0500ADDDX-0000SP-000CS-2955IP-016B1.,(005BP-0000SI-000DI-0000NUUPEINGNZACPECYDS:0005-04AX-00FFBX-005foS-2954ES-2944P955:001AF6F3CX-033SS-2954D1.UD-800CS-2955B1.SP
3、-00IP-M1.ABP-00SI-00NUUPEIP1.NZIIDINAPEftX-0033BX-0O5DS-2954ES-29442955:00ICA26U0CX-033SS-2954KoUD-WW00CS-295SSP-0UIP-M1.C(0U6).A1.BP-000US!-0U00DI-WWNUUPE1.P1.NZNAPENCDS:0UH6-00广C:VmOVSsystB32couand.cob一回X-80FFBX-W01C-0U33DX-UHOHSP-HO的)S-2954ES-2944SS-2954CS-2955IP-mi6295S:016021E050UADDBP-800U$1-W
4、M0D1.必叫NUUPEIMGNZACPECYDS0U5-B4X-00FFBX-005JS-2954ES-2944?955:001AFGF3CX-0033DX-000SS-2954CS-2955DIUB1.SP-00IP-M1.ABP-000SI-000DI-0000NUUPEIP1.NZNRPENCW29S4RX-JWWSES2944295S01CA2060-61133D-0RR=2954CS=295SHOUSP-0AAIP-M1.C(0006),A1.BP-A00SI-AARADI-011AHNUUPEIP1.HZNAPENCDS:0006-00-8H33BX-00U5-2954ES294
5、455:0U1FB44CC-033D-m0SP网的SS2954CS-2955HOU1P-(W1F4CB2图则S1.-0000D1.-0(MWNUUPE1.P1.HZNAPENCXTC33DX-0005S-2954ES-2944955:9021CD21INT21CX-0033DX-0000SPSS-2954CS-2955IP-BP-0060SI-NUUPEIP1.DI-0B0NAPENCIC:WIRDOVSVsyffteB32couand.cob-口XAX-033BX-0005DS-2954ES-29442955:AA1.CA206A0CX-0033DX-000SP-0000SS-2954CS-
6、2955IP-001CMOU(RmGbA1.BP-0000SI-0000NUUPEIP1.NZIIDI-000NAPENCISz0Af1.6-Wift-0033B=000SDS29S4ES=294429SS=001FB44CCX=0033D-090SP-0000SS=2954CS=2955IP=1.FMOUAH4CBP000NUUPESI-0000D1.000IP1.NZNaPEMCAXTC33BX-0005DS-2954ES-29442955:8021CD21-dds:029S4xA0AA2:A01AB84:9034:00304C4:0M0ID4:0H5U574:006U434:007018
7、CX-0033DX-0000SPSS-2954CS-2955IP-INT21BP-0080SI-00DINUUPE1.P1.HZNAPE2950K)E92F8S001005E73m1.23r8ECH3H0B132器蹲038D72%“mb5m60ixa375m5MEEDf?f16BCo1.3e500)91.3BtB28235ER140D61CERSC29A2图必需Ts需第A第690WE2282停200G3E146RA11115292取悻黑器A6F3679APP2U3W0268964FnHPBEF7303GS3BE98AER1S20Eu.su.JC.r09hint21h1.eadx,stringm
8、ovah,09hint21h;输出加密后的密文movex,51.oop2:movb,cmova1.,stringbx-1.ora1.,keybx-1.movstringbx-1.ja1.1.oop100P2;解密密文1.ead,msg1.movah,09hint21h1.ead,stringmovah,09hint21h;输出解密的明文movah,4chint21hcodeendsendstart2) datasegmentstringdbHe11o*;待加密明文keydb-2,2,1,0,-1;密钥msg1.dbmingwen:$msg2dbmiwen:$dataendsstacksegme
9、nt;inputstacksegmentcodeherestackendscodesegmentassumecs:code,ds:data,ss:stackstart:movax,datamovds,ax1.eadx,msg1.movah,09hint21h1.eadx,stringmovah,09hint2Ih;输出加箔前的明文movex,5mova1.,0100p1.:movbx,cxpushex;对CX压栈movc1.jkeybx-1.cmpc1.,a1.j1.t1.;假设密钥小于。那么跳转到t1.ro1.StringbxT,c1.;密钥不小于。那么左循环移位jmpsi;跳至sit1.:
10、negc1.;假设密糊小于0,那么取补,变为正数进行操作norStringbx-1.,c1.;右循环移位si:popex;弹栈1.oop100p1.1.eadx,msg2movah,09hint21h1.eadx,stringmovah,09hint21h;输出加密后的密文movex,5mova1.,0100p2:movbx,cxpushcx;JK栈movc1.,keybx-1.cmpc1.,a1.;比拟密钢与。的大小jgt2;假设密钥大于。那么执行t2negc1.;密钥不大于。那么对CI取补ro1.Stringbx-1.,c1.;对密文左循环移位jmps2t2:rorStringbx-1.,
11、c1.;密钥大于对密文右循环移位s2:popex;弹栈1.oop1.oop21.eadx,msg1.movah,9hint21h1.eadx,stringmovah,09hint21h;输出解密后的明文movah,4chint21hcodeendsendstart1)IcC:fINDOfSsystB32coBBand.coaningwen:Hc1.1.omiwen:SVSduPressenykeytoexit.ningWCn:HCIIocC:fINDOfS3ystCB32coaningwe11sHe1.1.oniwenst61.11ningwen:He1.1.oP*essanykeytoexit.