- 1、本文档共24页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Ch4 Datamovement instructions(数据传送指令)
Chapter 4 Data movement instructions contents 4-1 MOV revisited 4-2 PUSH/POP 4-3 Load effective address 4-4 string data transfer 4-5 miscellaneous data transfer instructions 4-6 segment override 4-7 assembler detail Machine code for MOV instruction MOV revisited Machine language Native binary code for microprocessors Figure 4-1 the formats of the 8086-Pentium II instructions MOV MOV between: Register / register Register / immediate Register / memory Register / segment register Operand word length Word (16-bit) Byte (8-bit) Source and destination word lengths should match 4-2 PUSH/POP PUSH/POP Register Memory Segment register Flags Operand word length Word (16-bit) 4-3 Load effective address LEA Load effective address What is effective address? MOV AX, [BX+SI+100H] ; The displacement for memory addressing mode is “effective address” LEA BX,[BX+SI+100H]; load effective address as BX+SI+100H into BX. Example: BX=0100H,SI=1234H, then: BX=BX+SI+100H =0100H+1234H+0100H = 1434H Send a message toWrite the BX after the following instruction is executed: LEA BX,[BP+SI+100H];BP=1000H,SI=1234H 4-4 string data transfers DI and SI Automatically increase or decrease after string operation The direction flag (D flag) D=0: SI , DI increment D=1: SI, DI decrement Load string/store string/move string LODS LODSB ; DS:[SI]-AL, SI±1 LODSW ; DS:[SI]-AX, SI±2 STOS STOSB ;AL-ES:[DI]; DI±1 STOSW ;AX-ES:[DI]; DI±2 MOVS MOVSB ;DS:[SI]-ES:[DI] ;DI±1 MOVSW ;DS:[SI]-ES:[DI] ;DI±2 Repeat prefix REP Repeat following instructions CX is used as counter REPE ;repeat while equal (Z=1) REPNE ;repeat while not equal (Z=0) Segment override prefix MOV AX,[BP] ; default seg is SS MOV AX,DS:[BP] ; override by DS MOV AX,[1000H] ; default seg is DS MOV AX,SS:[1000H]; override by SS 4-7 assembler detail *.asm *.obj *.exe Assembly Link How to use MASM.exe source editorSource file prog1.asm MASM (assembler) prog1.obj LINK(link
文档评论(0)