网站大量收购闲置独家精品文档,联系QQ:2885784924

《80x86课程英文版的课件Chapter3ElementsofAssemblyLanguage.ppt

《80x86课程英文版的课件Chapter3ElementsofAssemblyLanguage.ppt

  1. 1、本文档共48页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Chapter 3 Elements of Assembly Language How to develop assembly Language Programs Directives in MASM Contents Types and formats of statements in MASM Example program for how to assemble, link, and execute Structure of assembly language program Constant operands (操作数) and instruction operands 3.2 A Complete Example Purpose: prompt for (提示输入) two numbers and then find and display their sum. Pseudocode design for the program Prompt for the first number; Input ASCII characters representing the first number; Convert the characters to a 2’s complement double word Store the first number in memory; Prompt for the second number; Input ASCII characters representing the first number; Convert the characters to a 2’s complement double world Add the first number to the second number; Convert the sum to a string of ASCII characters; Display a label and the characters representing the sum; Structure of the program(2) ExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORD INCLUDE io.h ; header file for input/output cr EQU 0dh ; carriage return character Lf EQU 0ah ; line feed Structure of the program(3) .DATA ; reserve storage for data number1 DWORD ? number2 DWORD ? Structure of the program(4) prompt1 BYTE Enter first number: , 0 prompt2 BYTE Enter second number: , 0 string BYTE 40 DUP (?) label1 BYTE cr, Lf, The sum is sum BYTE 11 DUP (?) BYTE cr, Lf, 0 Template for assembly language 3.1 Assembly Language Statements Length: up to 512 If not enough, use backslash(\) character at the end of a line Comments: Begin with the semicolon(;) and extends until the end of the line Three types of functional assembly language statements Instructions(真指令) Can be translated into machine code( object code) Directives(伪指令) Tell the assembler to take some action , not result in machine code macros(宏) Shorthand for a sequence of other statements Components of a stat

文档评论(0)

you9391 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档