2 Introduction to Assembly Language Programming
- 格式:pdf
- 大小:306.14 KB
- 文档页数:15
微机原理及应用(双语)知到章节测试答案智慧树2023年最新山东科技大学第一章测试1.What kind of device does the MCS-51 microcontroller belong to? ( )参考答案:8-bit device2.The operation of taking a number from memory into the CPU is called ( ).参考答案:READ3.The 8951 microcontroller contains ()参考答案:EEPROM4.What is the highest address in a memory system with 16 data lines? ()参考答案:655355.What are the basic actions that a microprocessor can carry out?参考答案:Taking a number from memory (READ);Arithmeticoperations; Putting a number into memory (WRITE);Making decisions about the program route (jumps and subroutine calls);Logicaloperations (bit manipulation)第二章测试1.In internal RAM, only one of the four register banks is in used at any timewhen the program is running. ()参考答案:对2.When using an external crystal for the 8051 clock, what values of capacitorsshould be connected to it? ()参考答案:30 pF3.On the 8051 what is the storage size (in bits) of accumulator A? ( )参考答案:8 bit4.Which port has alternate function pins? ( )参考答案:Port 35.Which type of memory organization is used by the MCS-51 microcontrollers?参考答案:Harvard第三章测试1.What is the jump range of instruction LJMP? ()参考答案:64KB2.What is the addressing mode of the second operand in the instruction MOVXA, @DPTR ? ()参考答案:Indirect3.If MOV (direct) is used for address 87h which type of memory is accessed?()参考答案:SFRs4.The Stack Pointer will be decremented when a PUSH operation is made? ( )参考答案:错5.Which instruction will clear the low nibble of A if A = C5h?参考答案:ANL A, #0F0h第四章测试1.What is the jump range of instruction CJNE or DJNZ ? ()参考答案:256B2.What is the address of the second operand in the instruction:MOVC A,@A+DPTR ?Assume DPTR=1000h, A=80h. ()参考答案:1080h3.Which programming types does the assembly language belong to? ()参考答案:Linear4.What are the basci program sturcture in assembly language? ( )参考答案:Subroutine structure;Branching structure;Sequential structure;Loop structure5.Which Pseudo-instruction can put bytes in ROM memory? ( )参考答案:DB---------------------------------------------------------------------------------------------------------------------------------第五章测试1.How many interrupt sources are there in 8051 ? ()参考答案:52.The EA bit in IE register does not actually enable all interrupts, but allowsthem to be enabled separately. ()参考答案:对3.For 8051, each interrupt causes the program to jump directly to an addressat which an ISR is located. ()参考答案:对4.In an ISR (Interrupt Service Routine), which of the following instructionsmust be included? ()参考答案:Return from interrupt instruction5.How many interrupts are enabled after running this instruction “MOV IE,#05h”?参考答案:第六章测试1.For timers, which mode produces an 8-bit auto-reload timer? ()参考答案:Mode 22.Which register can we use to set up the mode of operation of Timer 0? ()参考答案:TCON3.For the serial port, which mode is an 8-bit UART? ()参考答案:Mode 14.Where is the parity bit in an RS232 packet? ()参考答案:After data bits5.How many modes can we use in a timer/counter ?参考答案:4第七章测试 the three types of bus which are used when external memory isconnected to the 8051.( )参考答案:Address bus;Control bus;Data bus2.When using external RAM, which port is used for the low address byte? ()参考答案:Port 03.If we need to expand an 8031 by adding 32Kbytes of code memory EPROM,how many address lines should be connected between the 8031 and theEPROM? ()参考答案:154.If an 8031 chip is connected to an external EPROM, Which line can generate asignal to enable reading of data from the EPROM? ()参考答案:/PSEN5.If the program is stored entirely in an external EPROM, what voltage must beapplied to the /EA PIN on the 8051? ()参考答案:0 volts第八章测试1.There are 8 analog input channels that be connected to the ADC0809. ()参考答案:对2.How many bits are required to select which analog channel is active on theADC0809? ()参考答案:33.In order to use the DAC0832, an external operational amplifier must beconnected. ()参考答案:对4.How many port pins would be used to connect a 6*4 matrix keypad to an8051 (excluding the interrupt input)? ()参考答案:105.What are the common forms that the internal wiring of the 7-segmentdisplay can take?( )参考答案:Common anode;Common cathode---------------------------------------------------------------------------------------------------------------------------------第九章测试1.In almost all cases, except completely trivial instances, the design of amicrocontroller-based system must be a top-down activity. This means that one must look first at the broad picture and then refine it down to systemsand sub-systems in both hardware and software. ()参考答案:对2.The lowest level of errors comprises those that result from incorrect use ofthe assembly language, and these are known as syntax errors. ()参考答案:对3.Which errors belong to syntax error of assembly language? ( )参考答案:Symbol not define;Wrong representation of numbers;Misspelling of instructions;Incorrect addressing modes4.The basic steps of microcontroller system design are: Requirement analysis,functional specification, design, implementation, system testing,documentation, and installation. ()参考答案:对5.The function of WDT(Watchdog Timer) is to do the syntax error detection.()参考答案:错。
计算机科学与技术专业Specialty in Computer Science & Technology一、培养目标Ⅰ。
Educational Objectives培养德、智、体全面发展,具有计算机科学与计算机工程领域系统、扎实的理论基础,知识结构合理,具有创新能力和国际竞争力的高素质的科技人才。
本专业的学生在信息的获取、传递、处理及应用等方面具有较宽广的专业知识、掌握现代计算机科学及工程中计算机硬件和计算机系统软件的基本原理、计算机应用技术,并具有较强的工程实践能力,具备设计、开发计算机硬件、计算机系统软件和应用软件的能力.要求本专业学生具有较强的英语语言能力、良好的人文素质和创新精神,并在计算机科学、嵌入式系统、操作系统、自动控制、计算机网络、信息安全、软件工程、信息处理及其相关领域中的一个或两个方向具有特色。
毕业生能在科研部门、教育单位、企业、事业、技术和行政管理部门等单位从事计算机教学、科学研究和应用的高级研究型及应用型人才.This program is designed to provide a thorough grounding in the theoretical principles and knowledge of information retrieval, transformation, processing and application。
It remains committed to systematic education for high—level researchers and doers, who have the personality of innovation and the desire for international competition.Students shall be equipped with a professional education of principles and technology in the field of computer hardware & software. Moreover, the proficiency in engineering practice and the ability in development of hardware & software are required. Students with good command of English and personality of innovation shall be expert in one or two of the following fields: Computer Science, Embedded Systems, Operating System, Automatic Control, Computer Network, Information Security, Software Engineering, Information Processing and other related fields. Students can be prepared for any professional role they might choose—education, research & design, practice in research institutes, universities, industries, the professions and other community groups。
GRE出国考试词汇辅导:GRE单词记忆新法(2)说明:1.所有单词取自《红宝书》(49list“667页版),所谓第二版其实就是加了一些以前没有想到的单词的记忆方法(红色),添加时偶尔没有严格按照单词拼写排列,为疏忽或有意为之.2.对于其中大量的源自记忆法游戏、影视、运动等方面的记忆法,据搜集到的意见褒贬不一。
但考虑到此下流文字主要通过网络传播,估计无此类业余爱好的学习天神们也无缘淘神看到,故依然保留此部分共绝大部分的正常大学生参考.3.单词意思限于篇幅没有写出,也请不要指望用这个东西背单词,将你觉得有用的部分转抄到自己的单词书上才是王道.4.词根记忆明显的单词没有总结,但如nonplus一类虽有词根、但难以由词根推出意思有所总结5.第一版原文分段在网上发表,后放出WORD版,删去了所有包含个人感情色彩的因素,但至今本人WORD水平依然很臭,排版参次不齐,宛如蚯蚓拱沙,敬请谅解6.免费使用、传播.7.谢谢支持,英语是很多人从接触以来就视为累赘的的课程,希望在备战GRE的道路上能真正喜欢上它.List 1abominate (war3)undead的憎恶:abominationaccelerate 物理中用a表示加速度(acceleration)access CDMA(码分复用):code division multiple access(编码分割多重通信)accolade 中间有瓶可乐(cola):很推崇他,给他可乐喝accomplish 军方语言:mission accomplished(任务达成)acolyte (war3)和peasent,wisp以及peon一起记:四个种族的农民.adept (war3)法师专家级训练:xxx adept trainingList 2adobe 世界的软件公司Adobeadore 和worship一起记:歌曲”fly me to the moon”中有”you are all I long for, all I worship and adore”(你是我的渴望、尊敬和偶像)adulterate 与adulate区分:后面有个rate(纯度):搀假影响纯度agile (war3)英雄的属性(attribute)中“敏捷”就是agilityagony 和ecstasy一起记,电影”The agony and theecstasy”(痛苦与狂喜)描述了米开朗基罗(Michelangelo)画梵地冈西斯庭教堂屋顶壁画的经历.align [概率统计]中用A表示排列,用C表示选择ambivalent ambi(二)+valent看作valantine(情人):脚踏两只船,不知道选哪个好。
x86Assembly Language ReferenceManual Sun Microsystems,Inc.4150Network CircleSanta Clara,CA95054U.S.A.Part No:817–5477–10January2005Copyright2005Sun Microsystems,Inc.4150Network Circle,Santa Clara,CA95054U.S.A.All rights reserved.This product or document is protected by copyright and distributed under licenses restricting its use,copying,distribution,and decompilation.No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors,if any. Third-party software,including font technology,is copyrighted and licensed from Sun suppliers.Parts of the product may be derived from Berkeley BSD systems,licensed from the University of California.UNIX is a registered trademark in the U.S. and other countries,exclusively licensed through X/Open Company,Ltd.Sun,Sun Microsystems,the Sun logo,,AnswerBook,AnswerBook2,and Solaris are trademarks or registered trademarks of Sun Microsystems,Inc.in the U.S.and other countries.The OPEN LOOK and Sun™Graphical User Interface was developed by Sun Microsystems,Inc.for its users and licensees.Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry.Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface,which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.ernment Rights–Commercial ernment users are subject to the Sun Microsystems,Inc.standard license agreement and applicable provisions of the FAR and its supplements.DOCUMENTATION IS PROVIDED“AS IS”AND ALL EXPRESS OR IMPLIED CONDITIONS,REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT,ARE DISCLAIMED,EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.Copyright2005Sun Microsystems,Inc.4150Network Circle,Santa Clara,CA95054U.S.A.Tous droits réservés.Ce produit ou document est protégépar un copyright et distribuéavec des licences qui en restreignent l’utilisation,la copie,la distribution,et ladécompilation.Aucune partie de ce produit ou document ne peutêtre reproduite sous aucune forme,par quelque moyen que ce soit,sansl’autorisation préalable etécrite de Sun et de ses bailleurs de licence,s’il y en a.Le logiciel détenu par des tiers,et qui comprend la technologie relative aux polices de caractères,est protégépar un copyright et licenciépar des fournisseurs de Sun.Des parties de ce produit pourrontêtre dérivées du système Berkeley BSD licenciés par l’Universitéde Californie.UNIX est une marque déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company,Ltd.Sun,Sun Microsystems,le logo Sun,,AnswerBook,AnswerBook2,et Solaris sont des marques de fabrique ou des marques déposées,de Sun Microsystems,Inc.aux Etats-Unis et dans d’autres pays.L’interface d’utilisation graphique OPEN LOOK et Sun™aétédéveloppée par Sun Microsystems,Inc.pour ses utilisateurs et licenciés.Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d’utilisation visuelle ou graphique pour l’industrie de l’informatique.Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox,cette licence couvrantégalement les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre se conforment aux licencesécrites de Sun. CETTE PUBLICATION EST FOURNIE“EN L’ETAT”ET AUCUNE GARANTIE,EXPRESSE OU IMPLICITE,N’EST ACCORDEE,Y COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE,L’APTITUDE DE LA PUBLICATION A REPONDRE A UNE UTILISATION PARTICULIERE,OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS.CE DENI DE GARANTIE NES’APPLIQUERAIT PAS,DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU.040910@9495ContentsPreface71Overview of the Solaris x86Assembler11Assembler Overview11Syntax Differences Between x86Assemblers12Assembler Command Line122Solaris x86Assembly Language Syntax13Lexical Conventions13Statements13Tokens15Instructions,Operands,and Addressing17Instructions17Operands18Assembler Directives203Instruction Set Mapping25Instruction Overview25General-Purpose Instructions26Data Transfer Instructions26Binary Arithmetic Instructions30Decimal Arithmetic Instructions31Logical Instructions32Shift and Rotate Instructions32Bit and Byte Instructions333Control Transfer Instructions35String Instructions38I/O Instructions39Flag Control(EFLAG)Instructions40Segment Register Instructions41Miscellaneous Instructions41Floating-Point Instructions42Data Transfer Instructions(Floating Point)42Basic Arithmetic Instructions(Floating-Point)43Comparison Instructions(Floating-Point)45Transcendental Instructions(Floating-Point)46Load Constants(Floating-Point)Instructions47Control Instructions(Floating-Point)47SIMD State Management Instructions49MMX Instructions49Data Transfer Instructions(MMX)50Conversion Instructions(MMX)50Packed Arithmetic Instructions(MMX)51Comparison Instructions(MMX)52Logical Instructions(MMX)53Shift and Rotate Instructions(MMX)53State Management Instructions(MMX)54SSE Instructions54SIMD Single-Precision Floating-Point Instructions(SSE)55MXCSR State Management Instructions(SSE)6164–Bit SIMD Integer Instructions(SSE)61Miscellaneous Instructions(SSE)62SSE2Instructions63SSE2Packed and Scalar Double-Precision Floating-Point Instructions63SSE2Packed Single-Precision Floating-Point Instructions70SSE2128–Bit SIMD Integer Instructions70SSE2Miscellaneous Instructions72Operating System Support Instructions7364–Bit AMD Opteron Considerations75Index774x86Assembly Language Reference Manual•January2005TablesTABLE3–1Data Transfer Instructions26TABLE3–2Binary Arithmetic Instructions30TABLE3–3Decimal Arithmetic Instructions32TABLE3–4Logical Instructions32TABLE3–5Shift and Rotate Instructions33TABLE3–6Bit and Byte Instructions34TABLE3–7Control Transfer Instructions36TABLE3–8String Instructions38TABLE3–9I/O Instructions40TABLE3–10Flag Control Instructions40TABLE3–11Segment Register Instructions41TABLE3–12Miscellaneous Instructions42TABLE3–13Data Transfer Instructions(Floating-Point)42TABLE3–14Basic Arithmetic Instructions(Floating-Point)44TABLE3–15Comparison Instructions(Floating-Point)45TABLE3–16Transcendental Instructions(Floating-Point)46TABLE3–17Load Constants Instructions(Floating-Point)47TABLE3–18Control Instructions(Floating-Point)47TABLE3–19SIMD State Management Instructions49TABLE3–20Data Transfer Instructions(MMX)50TABLE3–21Conversion Instructions(MMX)50TABLE3–22Packed Arithmetic Instructions(MMX)51TABLE3–23Comparison Instructions(MMX)52TABLE3–24Logical Instructions(MMX)53TABLE3–25Shift and Rotate Instructions(MMX)53TABLE3–26State Management Instructions(MMX)54TABLE3–27Data Transfer Instructions(SSE)555TABLE3–28Packed Arithmetic Instructions(SSE)56TABLE3–29Comparison Instructions(SSE)58TABLE3–30Logical Instructions(SSE)59TABLE3–31Shuffle and Unpack Instructions(SSE)59TABLE3–32Conversion Instructions(SSE)60TABLE3–33MXCSR State Management Instructions(SSE)61TABLE3–3464–Bit SIMD Integer Instructions(SSE)61TABLE3–35Miscellaneous Instructions(SSE)62TABLE3–36SSE2Data Movement Instructions64TABLE3–37SSE2Packed Arithmetic Instructions65TABLE3–38SSE2Logical Instructions66TABLE3–39SSE2Compare Instructions67TABLE3–40SSE2Shuffle and Unpack Instructions67TABLE3–41SSE2Conversion Instructions68TABLE3–42SSE2Packed Single-Precision Floating-Point Instructions70TABLE3–43SSE2128–Bit SIMD Integer Instructions71TABLE3–44SSE2Miscellaneous Instructions72TABLE3–45Operating System Support Instructions736x86Assembly Language Reference Manual•January2005PrefaceThe x86Assembly Language Reference Manual documents the syntax of the Solaris™x86 assembly language.This manual is provided to help experienced programmers understand the assembly language output of Solaris compilers.This manual is neither an introductory book about assembly language programming nor a reference manual for the x86architecture.Note–In this document the term“x86”refers to64-bit and32-bit systems manufactured using processors compatible with the AMD64or Intel Xeon/Pentium product families.For supported systems,see the Solaris10Hardware Compatibility List.Who Should Use This BookThis manual is intended for experienced x86assembly language programmers who are familiar with the x86architecture.Before You Read This BookYou should have a thorough knowledge of assembly language programming in general and be familiar with the x86architecture in specific.You should be familiar with the ELF objectfile format.This manual assumes that you have the following documentation available for reference:I IA-32Intel Architecture Software Developer’s Manual(Intel Corporation,2004).Volume1:Basic Architecture.Volume2:Instruction Set Reference A-M.Volume3: Instruction Set Reference N-Z.Volume4:System Programming Guide.7I AMD64Architecture Programmer’s Manual(Advanced Micro Devices,2003).Volume1:Application Programming.Volume2:System Programming.Volume3:General-Purpose and System Instructions.Volume4:128-Bit Media Instructions.Volume5:64-Bit Media and x87Floating-Point Instructions.I Linker and Libraries GuideI Sun Studio9:C User’s GuideI Sun Studio9:Fortran User’s Guide and Fortran Programming GuideI Man pages for the as(1),ld(1),and dis(1)utilities.How This Book Is OrganizedChapter1provides an overview of the x86functionality supported by the Solaris x86assembler.Chapter2documents the syntax of the Solaris x86assembly language.Chapter3maps Solaris x86assembly language instruction mnemonics to the nativex86instruction set.Accessing Sun Documentation OnlineThe SM Web site enables you to access Sun technical documentationonline.You can browse the archive or search for a specific book title orsubject.The URL is .Ordering Sun DocumentationSun Microsystems offers select product documentation in print.For a list ofdocuments and how to order them,see“Buy printed documentation”at.8x86Assembly Language Reference Manual•January2005Typographic ConventionsThe following table describes the typographic changes that are used in this book. TABLE P–1Typographic ConventionsTypeface or Symbol Meaning ExampleAaBbCc123The names of commands,files,anddirectories,and onscreen computeroutput Edit your.loginfile.Use ls-a to list allfiles. machine_name%you have mail.AaBbCc123What you type,contrasted with onscreencomputer output machine_name%su Password:AaBbCc123Command-line placeholder:replace witha real name or value The command to remove afile is rmfilename.AaBbCc123Book titles,new terms,and terms to beemphasized Read Chapter6in the User’s Guide.Perform a patch analysis.Do not save thefile.[Note that some emphasized items appear bold online.]Shell Prompts in Command ExamplesThe following table shows the default system prompt and superuser prompt for theC shell,Bourne shell,and Korn shell.TABLE P–2Shell PromptsShell PromptC shell prompt machine_name%C shell superuser prompt machine_name#Bourne shell and Korn shell prompt$9TABLE P–2Shell Prompts(Continued)Shell PromptBourne shell and Korn shell superuser prompt#10x86Assembly Language Reference Manual•January2005CHAPTER1Overview of the Solaris x86AssemblerThis chapter provides a brief overview of the Solaris x86assembler as.This chapterdiscusses the following topics:I“Assembler Overview”on page11I“Syntax Differences Between x86Assemblers”on page12I“Assembler Command Line”on page12Assembler OverviewThe Solaris x86assembler as translates Solaris x86assembly language into Executableand Linking Format(ELF)relocatable objectfiles that can be linked with other objectfiles to create an executablefile or a shared objectfile.(See Chapter7,“Object FileFormat,”in Linker and Libraries Guide,for a complete discussion of ELF objectfileformat.)The assembler supports macro processing by the C preprocessor(cpp)or them4macro processor.The assembler supports the instruction sets of the followingCPUs:Intel8086/8088processorsIntel286processorIntel386processorIntel486processorIntel Pentium processorIntel Pentium Pro processorIntel Pentium II processorPentium II Xeon processorIntel Celeron processorIntel Pentium III processorPentium III Xeon processorAdvanced Micro Devices Athlon processor11Advanced Micro Devices Opteron processorSyntax Differences Between x86AssemblersThere is no standard assembly language for the x86architecture.Vendorimplementations of assemblers for the x86architecture instruction sets differ in syntaxand functionality.The syntax of the Solaris x86assembler is compatible with thesyntax of the assembler distributed with earlier releases of the UNIX operating system(this syntax is sometimes termed“AT&T syntax”).Developers familiar with otherassemblers derived from the original UNIX assemblers,such as the Free SoftwareFoundation’s gas,willfind the syntax of the Solaris x86assembler verystraightforward.However,the syntax of x86assemblers distributed by Intel and Microsoft(sometimestermed“Intel syntax”)differs significantly from the syntax of the Solaris x86assembler.These differences are most pronounced in the handling of instructionoperands:I The Solaris and Intel assemblers use the opposite order for source and destinationoperands.I The Solaris assembler specifies the size of memory operands by adding a suffix tothe instruction mnemonic,while the Intel assembler prefixes the memoryoperands.I The Solaris assembler prefixes immediate operands with a dollar sign($)(ASCII0x24),while the Intel assembler does not delimit immediate operands.See Chapter2for additional differences between x86assemblers.Assembler Command LineDuring the translation of higher-level languages such as C and Fortran,the compilersmight invoke as using the alias fbe(“Fortran back end”).You can invoke theassembler manually from the shell command line with either name,as or fbe.See theas(1)man page for the definitive discussion of command syntax and command lineoptions.12x86Assembly Language Reference Manual•January2005CHAPTER2Solaris x86Assembly Language SyntaxThis chapter documents the syntax of the Solaris x86assembly language.I“Lexical Conventions”on page13I“Instructions,Operands,and Addressing”on page17I“Assembler Directives”on page20Lexical ConventionsThis section discusses the lexical conventions of the Solaris x86assembly language.StatementsAn x86assembly language program consists of one or morefiles containing statements.A statement consists of tokens separated by whitespace and terminated by either anewline character(ASCII0x0A)or a semicolon(;)(ASCII0x3B).Whitespace consists ofspaces(ASCII0x20),tabs(ASCII0x09),and formfeeds(ASCII0x0B)that are notcontained in a string or comment.More than one statement can be placed on a singleinput line provided that each statement is terminated by a semicolon.A statement canconsist of a comment.Empty statements,consisting only of whitespace,are allowed.CommentsA comment can be appended to a statement.The comment consists of the slashcharacter(/)(ASCII0x2F)followed by the text of the comment.The comment isterminated by the newline that terminates the statement.13LabelsA label can be placed at the beginning of a statement.During assembly,the label isassigned the current value of the active location counter and serves as an instructionoperand.There are two types of lables:symbolic and numeric.Symbolic LabelsA symbolic label consists of an identifier(or symbol)followed by a colon(:)(ASCII0x3A).Symbolic labels must be defined only once.Symbolic labels have global scopeand appear in the objectfile’s symbol table.Symbolic labels with identifiers beginning with a period(.)(ASCII0x2E)areconsidered to have local scope and are not included in the objectfile’s symbol table.Numeric LabelsA numeric label consists of a single digit in the range zero(0)through nine(9)followedby a colon(:).Numeric labels are used only for local reference and are not included inthe objectfile’s symbol table.Numeric labels have limited scope and can be redefinedrepeatedly.When a numeric label is used as a reference(as an instruction operand,for example),the suffixes b(“backward”)or f(“forward”)should be added to the numeric label.Fornumeric label N,the reference N b refers to the nearest label N defined before thereference,and the reference N f refers to the nearest label N defined after the reference.The following example illustrates the use of numeric labels:1:/define numeric label"1"one:/define symbolic label"one"/...assembler code...jmp1f/jump to first numeric label"1"defined/after this instruction/(this reference is equivalent to label"two")jmp1b/jump to last numeric label"1"defined/before this instruction/(this reference is equivalent to label"one")1:/redefine label"1"two:/define symbolic label"two"jmp1b/jump to last numeric label"1"defined/before this instruction/(this reference is equivalent to label"two")14x86Assembly Language Reference Manual•January2005TokensThere arefive classes of tokens:I Identifiers(symbols)I KeywordsI Numerical constantsI String ConstantsI OperatorsIdentifiersAn identifier is an arbitrarily-long sequence of letters and digits.Thefirst character must be a letter;the underscore(_)(ASCII0x5F)and the period(.)(ASCII0x2E)are considered to be letters.Case is significant:uppercase and lowercase letters are different.KeywordsKeywords such as x86instruction mnemonics(“opcodes”)and assembler directives are reserved for the assembler and should not be used as identifiers.See Chapter3for a list of the Solaris x86mnemonics.See“Assembler Directives”on page20for the list of as assembler directives.Numerical ConstantsNumbers in the x86architecture can be integers orfloating point.Integers can be signed or unsigned,with signed integers represented in two’s complement representation. Floating-point numbers can be:single-precisionfloating-point;double-precisionfloating-point;and double-extended precisionfloating-point.Integer ConstantsIntegers can be expressed in several bases:I Decimal.Decimal integers begin with a non-zero digit followed by zero or moredecimal digits(0–9).I Binary.Binary integers begin with“0b”or“0B”followed by zero or more binarydigits(0,1).I Octal.Octal integers begin with zero(0)followed by zero or more octal digits(0–7).I Hexadecimal.Hexadecimal integers begin with“0x”or“0X”followed by one ormore hexadecimal digits(0–9,A–F).Hexadecimal digits can be either uppercase or lowercase.Chapter2•Solaris x86Assembly Language Syntax15Floating Point ConstantsFloating point constants have the following format:I Sign(optional)–either plus(+)or minus(–)I Integer(optional)–zero or more decimal digits(0–9)I Fraction(optional)–decimal point(.)followed by zero or more decimal digitsI Exponent(optional)–the letter“e”or“E”,followed by an optional sign(plus orminus),followed by one or more decimal digits(0–9)A validfloating point constant must have either an integer part or a fractional part.String ConstantsA string constant consists of a sequence of characters enclosed in double quotes(")(ASCII0x22).To include a double-quote character("),single-quote character(’),orbackslash character(\)within a string,precede the character with a backslash(\)(ASCII0x5C).A character can be expressed in a string as its ASCII value in octalpreceded by a backslash(for example,the letter“J”could be expressed as“\112”).Theassembler accepts the following escape sequences in strings:Escape Sequence Character Name ASCII Value(hex)\n newline0A\r carriage return0D\b backspace08\t horizontal tab09\f form feed0C\v vertical tab0BOperatorsThe assembler supports the following operators for use in expressions.Operators haveno assigned precedence.Expressions can be grouped in square brackets([])toestablish precedence.+Addition-Subtraction\*Multiplication\/Division&Bitwise logical AND16x86Assembly Language Reference Manual•January2005|Bitwise logical OR>>Shift right<<Shift left\%Remainder!Bitwise logical AND NOT^Bitwise logical XORNote–The asterisk(*),slash(/),and percent sign(%)characters are overloaded.When used as operators in an expression,these characters must be preceded by the backslash character(\).Instructions,Operands,and Addressing Instructions are operations performed by the CPU.Operands are entities operated upon by the instruction.Addresses are the locations in memory of specified data.InstructionsAn instruction is a statement that is executed at runtime.An x86instruction statement can consist of four parts:I Label(optional)I Instruction(required)I Operands(instruction specific)I Comment(optional)See“Statements”on page13for the description of labels and comments.The terms instruction and mnemonic are used interchangeably in this document to refer to the names of x86instructions.Although the term opcode is sometimes used as a synonym for instruction,this document reserves the term opcode for the hexadecimal representation of the instruction value.Chapter2•Solaris x86Assembly Language Syntax17For most instructions,the Solaris x86assembler mnemonics are the same as the Intelor AMD mnemonics.However,the Solaris x86mnemonics might appear to bedifferent because the Solaris mnemonics are suffixed with a one-character modifier thatspecifies the size of the instruction operands.That is,the Solaris assembler derives itsoperand type information from the instruction name and the suffix.If a mnemonic isspecified with no type suffix,the operand type defaults to long.Possible operandtypes and their instruction suffixes are:b Byte(8–bit)w Word(16–bit)l Long(32–bit)(default)q Quadword(64–bit)The assembler recognizes the following suffixes for x87floating-point instructions:[no suffix]Instruction operands are registers onlyl(“long”)Instruction operands are64–bits(“short”)Instruction operands are32–bitSee Chapter3for a mapping between Solaris x86assembly language mnemonics andthe equivalent Intel or AMD mnemonics.OperandsAn x86instruction can have zero to three operands.Operands are separated bycommas(,)(ASCII0x2C).For instructions with two operands,thefirst(lefthand)operand is the source operand,and the second(righthand)operand is the destinationoperand(that is,source→destination).Note–The Intel assembler uses the opposite order(destination←source)for operands.Operands can be immediate(that is,constant expressions that evaluate to an inlinevalue),register(a value in the processor number registers),or memory(a value stored inmemory).An indirect operand contains the address of the actual operand value.Indirect operands are specified by prefixing the operand with an asterisk(*)(ASCII0x2A).Only jump and call instructions can use indirect operands.I Immediate operands are prefixed with a dollar sign($)(ASCII0x24)I Register names are prefixed with a percent sign(%)(ASCII0x25)18x86Assembly Language Reference Manual•January2005I Memory operands are specified either by the name of a variable or by a register thatcontains the address of a variable.A variable name implies the address of avariable and instructs the computer to reference the contents of memory at that address.Memory references have the following syntax:segment:offset(base,index,scale).I Segment is any of the x86architecture segment registers.Segment is optional:ifspecified,it must be separated from offset by a colon(:).If segment is omitted,the value of%ds(the default segment register)is assumed.I Offset is the displacement from segment of the desired memory value.Offset isoptional.I Base and index can be any of the general32–bit number registers.I Scale is a factor by which index is to be multipled before being added to base tospecify the address of the operand.Scale can have the value of1,2,4,or8.Ifscale is not specified,the default value is1.Some examples of memory addresses are:movl var,%eaxMove the contents of memory location var into number register%eax.movl%cs:var,%eaxMove the contents of memory location var in the code segment(register%cs)into number register%eax.movl$var,%eaxMove the address of var into number register%eax.movl array_base(%esi),%eaxAdd the address of memory location array_base to the contents of numberregister%esi to determine an address in memory.Move the contents of thisaddress into number register%eax.movl(%ebx,%esi,4),%eaxMultiply the contents of number register%esi by4and add the result to thecontents of number register%ebx to produce a memory reference.Move thecontents of this memory location into number register%eax.movl struct_base(%ebx,%esi,4),%eaxMultiply the contents of number register%esi by4,add the result to thecontents of number register%ebx,and add the result to the address ofstruct_base to produce an address.Move the contents of this address intonumber register%eax.Chapter2•Solaris x86Assembly Language Syntax19Assembler DirectivesDirectives are commands that are part of the assembler syntax but are not related to thex86processor instruction set.All assembler directives begin with a period(.)(ASCII0x2E)..align integer,padThe.align directive causes the next data generated to be aligned modulo integerbytes.Integer must be a positive integer expression and must be a power of2.Ifspecified,pad is an integer bye value used for padding.The default value of pad forthe text section is0x90(nop);for other sections,the default value of pad is zero(0)..ascii"string"The.ascii directive places the characters in string into the object module at thecurrent location but does not terminate the string with a null byte(\0).String mustbe enclosed in double quotes(")(ASCII0x22).The.ascii directive is not valid forthe.bss section..bcd integerThe.bcd directive generates a packed decimal(80-bit)value into the currentsection.The.bcd directive is not valid for the.bss section..bssThe.bss directive changes the current section to.bss..bss symbol,integerDefine symbol in the.bss section and add integer bytes to the value of the locationcounter for.bss.When issued with arguments,the.bss directive does notchange the current section to.bss.Integer must be positive..byte byte1,byte2,...,byteNThe.byte directive generates initialized bytes into the current section.The.bytedirective is not valid for the.bss section.Each byte must be an8-bit value..2byte expression1,expression2,...,expressionNRefer to the description of the.value directive..4byte expression1,expression2,...,expressionNRefer to the description of the.long directive..8byte expression1,expression2,...,expressionNRefer to the description of the.quad directive..comm name,size,alignmentm directive allocates storage in the data section.The storage is referencedby the identifier name.Size is measured in bytes and must be a positive integer.Name cannot be predefined.Alignment is optional.If alignment is specified,theaddress of name is aligned to a multiple of alignment..dataThe.data directive changes the current section to.data.20x86Assembly Language Reference Manual•January2005。
英文字母开头的课程:ALGOL语言 ALGOL LanguageBASIC & FORTRAN 语言 BASIC Language & FORTRAN LanguageBASIC 语言 BASIC LanguageBASIC 语言及应用 BASIC Language & ApplicationC 语言 C LanguageC++程序设计 C++ Program DesigningCAD 概论 Introduction to CADCAD/CAM CAD/CAMCET-4 College English Test (Band 4)CET-6 College English Test (Band 6)COBOL语言 COBOL LanguageCOBOL语言程序设计 COBOL Language Program DesigningC与UNIX环境 C Language & Unix EnvironmentC语言科学计算方法 Scientific Computation Method in CC语言与生物医学信息处理 C Language & Biomedical Information ProcessingdBASE Ⅲ课程设计 Course Exercise in dBASE ⅢFORTRAN 77 语言 FORTRAN 77 LanguageFORTRAN语言 FORTRAN LanguageFoxBase程序设计 FoxBase ProgrammingHopf代数 Hopf AlgebraHopf代数与代数群量子群 Hopf Algebra , Algebraic Group and Qua ntum GroupIBM-PC/XT Fundamentals of Microcomputer IBM-PC/XTIBM-PC微机原理 Fundamentals of Microcomputer IBM-PCIBM汇编及高级语言的接口 IBM Assembly & its Interfaces with Advanced Programming LanguagesInternet与Intranet技术 Internet and Intranet TechnologyLSI设计基础 Basic of LSI DesigningOS/2操作系统 OS/2 Operation SystemPASCAL大型作业 PASCAL Wide Range WorkingPASCAL课程设计 Course Exercise in PASCALPASCAL语言 PASCAL LanguagePC机原理 Principle of PCUnix编程环境 Unix Programming EnvironmentUnix操作系统分析 Analysis of Unix SystemVLSI的EDA技术 EDA Techniques for VLSIVLSI技术与检测方法 VLSI Techniques & Its ExaminationVLSI设计基础 Basis of VLSI DesignWindows系统 Windows Operation SystemX光分析 X-ray AnalysisX射线金属学 X-Ray & MetallographyX射线与电镜 X-ray & Electric MicroscopeZ-80汇编语言程序设计 Z-80 Pragramming in Assembly LanguagesB开头的课程:板壳非线性力学 Nonlinear Mechanics of Plate and Shell板壳理论 Plate Theory , Theory of Plate and Shell板壳力学 Plate Mechanics办公自动化 Office Automatization办公自动化系统毕业设计 Office Automatization Thesis办公自动化系统设计 Office Automatization Design半波实验 Semiwave Experiment半导体变流技术 Semiconductor Converting Technology半导体材料 Semiconductor Materials半导体测量 Measurement of Semiconductors半导体瓷敏元件 Semiconductor Porcelain-Sensitive Elements半导体光电子学 Semiconductor Optic Electronics半导体化学 Semiconductor Chemistry半导体激光器 Semiconductor Laser Unit半导体集成电路 Semiconductor Integrated Circuitry半导体理论 Semi-conductive Theory半导体器件 Semiconductor Devices半导体器件工艺原理 Technological Fundamentals of Semiconductor Device半导体器件课程设计 Course Design of Semiconductor Devices半导体物理 Semiconductor Physics半导体专业 Semi-conduction Specialty半导体专业实验 Specialty Experiment of Semiconductor半群理论 Semi-group Theory保健食品监督评价 Evaluation and Supervision on Health Food s保险学 Insurance保险学 Insurance报告文学专题 Special Subject On Reportage报刊编辑学 Newspaper & Magazine Editing报刊选读 Selected Readings of Newspaper & Magazine报纸编辑学 Newspaper Editing泵与风机 Pumps and Fans泵与水机 Pumps & Water Turbines毕业论文 Graduation Thesis毕业设计 Graduation Thesis毕业实习 Graduation Practice编译方法 Compilation Method编译方法 Methods of Compiling编译技术 Technique of Compiling编译原理 Fundamentals of Compiling, Principles of Compiler编译原理课程设计 Course Design of Compiling变电站的微机检测 Computer Testing in Transformer Substation变电站的微机检测与控制 Computer Testing & Control in Transformer Substation变分法与张量 Calculus of Variations & Tensor变分学 Calculus of Variations变流技术 Semiconductor Converting Technology变质量系统热力学与新型回转压 Variable Quality System Thermal Mechanics & NeoRo 表面活性剂化学及应用 Chemistry and Application of Surfactant表面活性物质 Surface Reactive Materials并行处理 Parallel Processing并行处理与并行程序设计 Parallel Processing and Parallel Programming并行算法 Parallel Algorithmic波谱学 Spectroscopy, Wave Spectrum波谱学实验 Spectroscopic Experiment薄膜光学 Film Optics薄膜物理 Thin Film Physics不育症的病因学 Etiology of InfertilityC开头的课程:材料的力学性能测试 Measurement of Material Mechanical Performance材料化学 Material Chemistry材料力学 Mechanics of Materials财税法规与税务会计 Laws and Regulations of Finance and Taxes财务案例分析 Case Analysis of Finance Management财务案例分析 Case Analysis of Financial Management财务报告分析 Analysis of Financial Statement财务成本管理 Financial Cost Management财务管理 Financial Management, Financial Cost Management财务管理与分析 Financial Management and Analysis财务会计 Financial Accountancy财政学 Public Finance财政与金融 Finance & Banking财政与税收 Finance & Revenue财政与税收理论 Theories on Public Finance and Tax Revenue财政与信贷 Finance & Credit操作系统 Disk Operating System (DOS)操作系统课程设计 Course Design in Disk Operating System操作系统与编译原理 Disk Operating System & Fundamentals of Compiling操作系统原理 Fundamentals of Disk Operating System, Principles of Operating System 测量技术基础 Foundation of Measurement Technology测量原理与仪器设计 Measurement Fundamentals & Meter Design测试技术 Testing Technology测试与信号变换处理 Testing & Signal Transformation Processing策波测量技术 Technique of Whip Wave Measurement策略管理 Strategic Management产品学 Production产业经济学 Industrial Economy产业组织 Industrial Organization产业组织学 Industrial Organization Technology常微分方程 Ordinary Differential Equations场论 Field Theory超导磁体及应用 Superconductive Magnet & Application超导及应用 Superconductive & Application超高真空科学与技术 Science and Technology of Ultrahigh Vacuum 60超精密加工和微细加工 Super-Precision & Minuteness Processing超精微细加工 Super-Precision & Minuteness Processing超声及应用 Supersonics Application成本会计 Cost Accounting成像原理与技术 Principles & Technique of Imaging成组技术 Grouping Technique城市规划原理 Fundamentals of City Planning城市社会学 Urban Sociology程控数字交换 Program Controlling of Digital Exchange程序设计 Program Designing程序设计方法学 Methodology of Programming, Methods of Programming程序设计及算法语言 Program Designing & Algorithmic Language程序设计语言 Programming Language齿轮啮合原理 Principles of Gear Connection冲击测量及误差 Punching Measurement & Error冲压工艺 Sheet Metal Forming Technology抽象代数 Abstract Algebra初等数学 Primary Mathematics传坳概论 Introduction to Pass Col传动概论 Introduction to Transmission传感技术 Sensor Technique传感技术及应用 Sensor Technique & Application传感器及应用 Sensors & Application传感器与检测技术 Sensors & Testing Technology传感器原理 Fundamentals of Sensors传感器原理及应用 Fundamentals of Sensors & Application传热学 Heat Transfer船舶操纵 Ship Controlling船舶电力系统 Ship Electrical Power System船舶电力系统课程设计 Course Exercise in Ship Electrical Power System 船舶电气传动自动化 Ship Electrified Transmission Automation船舶电站 Ship Power Station船舶动力装置 Ship Power Equipment船舶概论 Introduction to Ships船舶焊接与材料 Welding & Materials on Ship船舶机械控制技术 Mechanic Control Technology for Ships船舶机械拖动 Ship Mechanic Towage船舶建筑美学 Artistic Designing of Ships船舶结构 Ship Structure船舶结构力学 Structural Mechanics for Ships船舶结构与制图 Ship Structure & Graphing船舶静力学 Ship Statics船舶强度与结构设计 Designing Ship Intensity & Structure船舶设计原理 Principles of Ship Designing船舶推进 Ship Propelling船舶摇摆 Ship Swaying船舶摇摆与操纵 Ship Swaying & Manipulating船舶振动 Ship Vibration船舶阻力 Ship Resistance船体建造工艺 Ship-Building Technology船体结构 Ship Structure船体结构图 Ship Structure Graphing船体结构与制图 Ship Structure & Graphing船体振动学 Ship Vibration船体制图 Ship Graphing船用电器设备 Marine Electrical Equipment创造心理学 Creativity Psychology词汇学 Lexicology磁测量技术 Magnetic Measurement Technology磁传感器 Magnetic Sensor磁存储设备设计原理 Fundamental Design of Magnetic Memory Equipment 磁记录 Magnetographic磁记录技术 Magnetographic Technology磁记录物理 Magnetographic Physics磁路设计与场计算 Magnetic Path Designing & Magnetic Field Calculati 磁盘控制器 Magnetic Disk Controler磁性材料 Magnetic Materials磁性测量 Magnetic Measurement磁性物理 Magnetophysics磁原理及应用 Principles of Catalyzation & Application催化原理 Principles of CatalysisD开头的课程:大电流测量 Super-Current Measurement大电源测量 Super-Power Measurement大机组协调控制 Coordination & Control of Generator Networks大跨度房屋结构 Large-Span House structure大型锅炉概况 Introduction to Large-Volume Boilers大型火电机组控制 Control of Large Thermal Power Generator Networks大型数据库原理与高级开发技术 Principles of Large-Scale Data-Bas e and Advanced Development Technology大学德语 College German大学俄语 College Russian大学法语 College French大学日语 College Japanese大学生心理学 Psychology Introduction大学物理 College Physics大学物理实验 Experiment of College Physics大学英语 College English大学语文 College Chinese大众传播学 Mass Media代数几何 Algebraic Geometry代数几何Algebraic Geometry代数曲面 Algebraic Surfaces代数图论 Algebraic Graph Theory代数拓扑 Algebraic Topology代数学 Algebra代用燃料 Substitute Fuel代用运放电路 Simulated Transmittal Circuit单片机与接口技术 Mono-Chip Computers & Interface Technique单片机原理 Fundamentals of Mono-Chip Computers单片机原理及应用 Fundamentals of Mono-Chip Computers & Applications弹塑性力学 Elastic-Plastic Mechanics弹性波 Elastic Waves弹性力学 Elastic Mechanics, Theory of Elastic Mechanics弹性元件的理论及设计 Theory and Design of Elastic Element蛋白质结构基础 Principle of Protein Structure蛋白质生物化学技术 Biochemical Technology of Protein当代国际关系 Contemporary International Relationship当代国外社会思维评价 Evaluation of Contemporary Foreign Social Thought当代文学 Contemporary Literature当代文学专题 Topics on Contemporary Literature当代西方哲学 Contemporary Western Philosophy当代戏剧与电影 Contemporary Drama & Films当代资本主义经济 Contemporary Capitalist Economy党史 History of the Party导波光学 Wave Guiding Optics德育 Moral Education等离子体工程 Plasma Engineering低频电子线路 Low Frequency Electric Circuit低温测试技术 Cryo Testing Technique低温传热学 Cryo Conduction低温固体物理 Cryo Solid Physics低温技术原理与装置 Fundamentals of Cryo Technology & Equipment低温技术中的微机原理 Priciples of Microcomputer in Cryo Technology 低温绝热 Cryo Heat Insulation低温气体制冷机 Cryo Gas Refrigerator低温热管 Cryo Heat Tube低温设备 Cryo Equipment低温生物冻干技术 Biological Cryo Freezing Drying Technology低温生物学原理与应用 Principle & Application of Cryobiology低温实验技术 Cryo Experimentation Technology低温物理导论 Cryo Physic Concepts低温物理概论 Cryo Physic Concepts低温仪表及测试 Cryo Meters & Measurement低温原理 Cryo Fundamentals低温原理与设备 Cryo Fundamentals & Equipment低温制冷机 Cryo Refrigerator低温中的微机应用 Application of Microcomputer in Cryo Technology低温装置 Cryo Equipment低噪声电子电路 Low-Noise Electric Circuit低噪声电子设计 Low-Noise Electronic Designing低噪声放大与弱检 Low-Noise Increasing & Decreasing低噪声与弱信号检测 Detection of Low Noise & Weak Signals地基基础课程设计 Course Design of Groundsill Basis地理 Geography第二次世界大战史 History of World War II典型计算机分析 Classical Computer Analysis电测量技术 Electric Measurement Technology电厂计算机控制系统 Computer Control System in Power Plants电磁测量实验技术 Electromagnetic Measurement Experiment & Technology 电磁场计算机 Electromagnetic Field Computers电磁场理论 Theory of Electromagnetic Fields电磁场数值计算 Numerical Calculation of Electromagnetic Fields电磁场与电磁波 Electromagnetic Fields & Magnetic Waves电磁场与微波技术 Electromagnetic Fields & Micro-Wave Technology电磁场中的数值方法 Numerical Methods in Electromagnetic Fields电磁场中的数值计算 Numerical Calculation in Electromagnetic Fields 电磁学 Electromagnetics电动力学 Electrodynamics电镀 Plating电分析化学 Electro-Analytical Chemistry电工材料 Electrical Materials电工测量技术基础 Measurement Technology of Electrical Engineering电工测试技术基础 Testing Technology of Electrical Engineering电工产品学 Electrotechnical Products电工电子技术基础 Electrical Technology & Electrical Engineering电工电子学 Electronics in Electrical Engineering电工基础 Fundamental Theory of Electrical Engineering电工基础理论 Fundamental Theory of Electrical Engineering电工基础实验 Basic Experiment in Electrical Engineering电工技术 Electrotechnics电工技术基础 Fundamentals of Electrotechnics电工实习 Electrical Engineering Practice电工实验 Experiment of Electrical Engineering电工实验技术基础 Experiment Technology of Electrical Engineering电工学 Electrical Engineering电工与电机控制 Electrical Engineering & Motor Control电弧电接触 Electrical Arc Contact电弧焊及电渣焊 Electric Arc Welding & Electroslag Welding电化学测试技术 Electrochemical Measurement Technology电化学工程 Electrochemical Engineering电化学工艺学 Electrochemical Technology电机 Motor电机测试技术 Motor Measuring Technology电机电磁场的分析与计算 Analysis & Calculation of Electrical Motor &电机电磁场的数值计算 Calculation of Electrical Motor & Electromagnetic Fields 电机电磁场理论 Theory of Electrical Moto & Electromagnetic Fields电机电器与供电 Motor Elements and Power Supply电机矩阵分析法 Analysis of Electrical Motor Matrix电机课程设计 Course Exercise in Electric Engine电机绕组理论 Theory of Motor Winding电机绕组理论及应用 Theory & Application of Motor Winding电机设计 Design of Electrical Motor电机瞬变过程 Electrical Motor Change Processes电机统一理论 Theory of Electrical Motor Integration电机学 Electrical Motor电机学及控制电机 Electrical Machinery Control & Technology电机与拖动 Electrical Machinery & Towage电机原理 Principle of Electric Engine电机原理与拖动 Principles of Electrical Machinery & Towage电机专题 Lectures on Electric Engine电接触与电弧 Electrical Contact & Electrical Arc电介质物理 Dielectric Physics电镜 Electronic Speculum电力电子电路 Power Electronic Circuit电力电子电器 Power Electronic Equipment电力电子器件 Power Electronic Devices电力电子学 Power Electronics电力工程 Electrical Power Engineering电力企业管理 Management of Electrical Enterprise电力生产技术 Technology of Electrical Power Generation电力生产优化管理 Optimal Management of Electrical Power Generation电力拖动 Electric Traction电力拖动基础 Fundamentals for Electrical Towage电力拖动控制系统 Electrical Towage Control Systems电力拖动与电气控制 Electrical Towage & Electrical Control电力系统 Power Systems电力系统电源最优化规划 Optimal Planning of Power Source in a Power System 电力系统短路 Power System Shortcuts电力系统分析 Power System Analysis电力系统规划 Power System Planning电力系统过电压 Hyper-Voltage of Power Systems电力系统继电保护原理 Power System Relay Protection电力系统经济分析 Economical Analysis of Power Systems电力系统经济运行 Economical Operation of Power Systems电力系统可靠性 Power System Reliability电力系统可靠性分析 Power System Reliability Analysis电力系统课程设计 Course Design of Power Systems电力系统无功补偿及应用 Non-Work Compensation in Power Systems & Applicati 电力系统谐波 Harmonious Waves in Power Systems电力系统优化设计 Optimal Designing of Power Systems电力系统远动 Operation of Electric Systems电力系统远动技术 Operation Technique of Electric Systems电力系统运行 Operation of Electric Systems电力系统自动化 Automation of Electric Systems电力系统自动装置 Power System Automation Equipment电力系统最优规划 Optimal Planning in Power System电力装置课程设计 Course Design of Power Equipment电力装置与系统 Power Equipment & System电路测量与实验 Circuit Measurement & Experiment电路测试技术 Circuit Measurement Technology电路测试技术基础 Fundamentals of Circuit Measurement Technology电路测试技术及实验 Circuit Measurement Technology & Experiments电路分析基础 Basis of Circuit Analysis电路分析基础实验 Basic Experiment on Circuit Analysis电路分析实验 Experiment on Circuit Analysis电路和电子技术 Circuit and Electronic Technique电路基本理论 Basis Theory of Circuitry电路及电子线路CAD Circuitry CAD电路理论 Theory of Circuit电路理论基础 Fundamental Theory of Circuit电路理论实验 Experiments in Theory of Circuct电路设计与测试技术 Circuit Designing & Measurement Technology电气测量技术 Electrical Measurement Technology电气传动 Electrified Transmission电气控制技术 Electrical Control Technology电器设计 Electrical Appliances Designing电器学 Electrical Appliances电器与控制 Electrical Appliances & Control电生理技术基础 Basics of Electricphysiological Technology电视传感器图象显示 Television Sensor Graphic Display电视接收技术 Television Reception Technology电视节目 Television Programs电视节目制作 Television Program Designing电视新技术 New Television Technology电视新闻 Television News电视原理 Principles of Television电网调度自动化 Automation of Electric Network Management电学实验 Electrical Experiment电影艺术 Art of Film Making电站微机检测控制 Computerized Measurement & Control of Power Statio电子材料与元件测试技术 Measuring Technology of Electronic Material and Element 电子材料元件 Electronic Material and Element电子材料元件测量 Electronic Material and Element Measurement电子测量与实验技术 Technology of Electronic Measurement & Experiment电子测试 Electronic Testing电子测试技术 Electronic Testing Technology电子测试技术与实验 Electronic Testing Technology & Experiment电子测试实验 Electronic Testing Experiment电子测试与实验技术 Electronic Testing Technology & Experiment电子机械运动控制技术 Technology of Electronic Mechanic Movement Control电子技术 Technology of Electronics电子技术腐蚀测试中的应用Application of Electronic Technology in Erosion Measurement电子技术基础 Basic Electronic Technology电子技术基础与实验 Basic Electronic Technology & Experiment电子技术课程设计 Course Exercise in Electronic Technology电子技术实验 Experiment in Electronic Technology电子技术综合性设计实验 Experiment in Electronic Technology电子理论实验 Experiment in Electronic Theory电子商务 Electronic Commerce电子系统的ASIC技术 ASIC Design Technologies电子显微分析 Electronic Micro-Analysis电子显微镜 Electronic Microscope电子线路 Electronic Circuit电子线路的计算机辅助设计 Computer Associate Design of Electronic Circuit电子线路课程设计 Course Design of Electronic Circuit电子线路设计与测试技术 Electronic Circuit Design & Measurement Technology电子线路设计与测试实验 Electronic Circuit Design & Measurement Experiment 电子线路实验 Experiment in Electronic Circuit电子学 Electronics电子学课程设计 Course Design of Electronics电子照相技术 Electronic Photographing Technology雕塑艺术欣赏 Appreciation of Sculptural Art调节原理 Principles of Regulation调节装置 Regulation Equipment动力机械CAD Dynamical Machine CAD动力学 Dynamics动态规划 Dynamic Programming动态无损检测 Dynamic Non-Destruction Measurement动态信号 Dynamic Signal动态信号分析与仪器 Dynamic Signal Analysis & Apparatus动物病害学基础 Basis of Animal Disease动物免疫学 Animal Immunology动物生理与分子生物学 Animal Physiology and Molecular Biochemistry动物学 Zoology动物遗传工程 Animal Genetic Engineering毒理遗传学 Toxicological Genetics断裂力学 Fracture Mechanics断裂疲劳力学 Fatigue Fracture Mechanics锻压测试技术 Forging Testing Technique锻压工艺 Forging Technology锻压机械液压传动 Hydraulic Transmission in Forging Machinery锻压加热设备 Forging Heating Equipment锻压设备专题 Lectures on Forging Press Equipments锻压系统动力学 Dynamics of Forging System锻造工艺 Forging Technology锻造加热设备 Forging Heat Equipment对外贸易保险 International Trade Insurance对外贸易地理 International Marketing Geography对外贸易概论 Introduction to International Trade对外贸易运输 International Trade Transportation多层网络方法 Multi-Layer Network Technology多复变函数 Analytic Functions of Several Complex Variables多媒体计算机技术 Multimedia Computer Technology多媒体技术 Multimedia Technology多目标优化方法 Multipurpose Optimal Method多项距阵 Multi-Nominal Matrix多元统计分析 Multivariable StatisticsF开头的课程:发电厂 Power Plant发电厂电气部分 Electric Elements of Power Plants发电厂电气部分与动力部分 Electric Elements & Dynamics of Power Plants发电厂电气部分与热力设备 Electric Elements & Thermodynamics Equipment of Power Plants发电厂计算机控制 Computer Control in Power Plant发酵工程 Zymolysis Engineering发育生物学原理与实验技术 Principle and Experimental Technology of Development 发展经济学 Evolutive Economics法理学 Nomology法律基础 Fundamentals of Law法学概论 An Introduction to Science of Law法学基础 Fundamentals of Science of Law翻译 Translation翻译理论与技巧 Theory & Skills of Translation反不正当经济法 Anti-malfeasance Economic Law泛读 Extensive Reading泛函分析 Functional Analysis泛函分析 Functional Analysis房屋建筑学 Architectural Design & Construction房屋建筑学课程设计 Course Design of House Architecture仿真与辅助设计 Simulation & Computer Aided Design放射生物学 Radiation Biology放射学 Radiology非电量测量 Non-Electricity Measurement非金属材料 Non-Metal Materials非线性采样系统 Non-Linear Sampling System非线性方程组的数值解法 Numerical Methods for No-linear System s of Equations 非线性光学 Nonlinear Optics非线性规划 Non-Linear Programming非线性控制理论 Non-Linear Control Theory非线性双曲型守恒律解的存在性 The Existence of Solutions for Non -linear Hyperbolic Conservation Laws非线性物理导论 Introduction to Nonlinear Physics非线性振荡 Non-Linear Oscillation非线性振动 Nonlinear Vibration废水处理工程 Technology of Wastewater Treatment废水处理与回用 Sewage Disposal and Re-use沸腾燃烧 Boiling Combustion分布式计算机系统 Distributed Computer System / Distributed System分布式系统与分布式处理 Distributed Systems and Distributed Processing分离科学 Separation Science分析化学 Analytical Chemistry分析化学实验 Analytical Chemistry Experiment分析力学 Analytic Mechanics分析生物化学 Analytical Biochemistry分析生物化学 Analytical Biochemistry分子病毒学 Molecular Virology分子进化工程 Engineering of Molecular Evolution分子生物学 Molecular Biology分子生物学技术 Protocols in Molecular Biology分子遗传学 Molecular Genetics风机调节 Fan Regulation风机调节.使用.运转 Regulation, Application & Operation of Fans风机三元流动理论与设计 Tri-Variant Movement Theory & Design of Fans风能利用 Wind Power Utilization风险投资分析 Analysis of Risk Investment服务业营销 Service Industry Marketing辅助机械 Aided Machine腐蚀电化学实验 Experiment in Erosive Electrochemistry复变函数 Complex Variables Functions复变函数与积分变换 Functions of Complex Variables & Integral Transformation 复合材料结构力学 Structural Mechanics of Composite Material复合材料力学 Compound Material Mechanics傅里叶光学 Fourier OpticsG开头的课程:概率论 Probability Theory概率论与数理统计 Probability Theory & Mathematical Statistics概率论与随机过程 Probability Theory & Stochastic Process概率与统计 Probability & Statistics钢笔画 Pen Drawing钢的热处理 Heat-Treatment of Steel钢结构 Steel Structure钢筋混凝土 Reinforced Concrete钢筋混凝土及砖石结构 Reinforced Concrete & Brick Structure钢砼结构 Reinforced Concrete Structure钢砼结构与砌体结构 Reinforces Structure and Monsary Structure钢砼课程设计 Reinforced Concrete Course Design钢砼设计 Experiment of Reinforced Concrete Structure高层建筑基础 Tall Building Foundation高层建筑基础设计 Designing bases of High Rising Buildings高层建筑结构设计 Designing Structures of High Rising Buildings高等材料力学 Advanced Material Mechanics高等代数 Advanced Algebra高等发光分析 Advanced Luminescence Analysis高等分析化学 Advanced Analytical Chemistry高等工程力学 Advanced Engineering Mechanics高等光学 Advanced Optics高等环境微生物 Advanced Environmental Microorganism高等教育管理 Higher Education Management高等教育史 History of Higher Education高等教育学 Higher Education高等量子力学 Advanced Quantum Mechanics高等生物化学 Advanced Biochemistry高等数理方法 Advanced Mathematical Method高等数学 Advanced Mathematics高等数值分析 Advanced Numeric Analysis高等土力学 Advanced Soil Mechanics高等无机化学 Advanced Inorganic Chemistry高等有机化学 Advanced Organic Chemistry高电压测试技术 High-Voltage Test Technology高电压技术 High-Voltage Technology高电压技术与设备 High-Voltage Technology and Device高电压绝缘 High-Voltage Insulation高电压实验 High-Voltage Experiment高分子材料 High Polymer Material高分子材料及加工 High Polymer Material & Porcessing高分子化学 High Polymer Chemistry高分子化学实验 High Polymer Chemistry Experiment高分子化学与物理 Polymeric Chemistry and Physics高分子物理 High Polymer Physics高分子物理实验 High Polymer Physics Experiment高级程序设计语言的设计与实现Advanced Programming Language's Design & Implementation高级管理信息系统 Advanced Management Information Systems高级计算机体系结构 Advanced Computer Architecture高级计算机网络 Advanced Computer Networks高级计算机网络与集成技术 Advanced Computer Networks and Integration Technology 高级经济计量 Advanced Economic Metrology高级软件工程 Advanced Software Engineering高级生化技术 Advanced Biochemical Technique高级生物化学 Advanced Biochemistry高级食品化学 Advanced Food Chemistry高级视听 Advanced Videos高级数据库 Advanced Database高级数理逻辑 Advanced Numerical Logic高级水生生物学 Advanced Aquatic Biology高级英语听说 Advanced English Listening & Speaking高级植物生理生化 Advanced Plant Physiology and Biochemistry高能密束焊 High Energy-Dense Beam Welding高频电路 High-Frequency Circuit高频电子技术 High-Frequency Electronic Technology高频电子线路 High-Frequency Electronic Circuit高维代数簇 Algebraic Varieties of Higher Dimension高压测量技术 High-Voltage Measurement Technology高压测试技术 High-Voltage Testing Technology高压电场的数值计算 Numerical Calculation in High-Voltage Electronic Field 高压电工程 High-Voltage Engineering高压电技术 High-Voltage Technology高压电器 High-Voltage Electrical Appliances高压绝缘 High-Voltage Insulation高压实验 High-Voltage Experimentation高压实验设备测量 High-Voltage Experimentation Equipment Measurement高压试验技术 High-Voltage Experimentation Technology工厂电气设备 Electric Equipment of Plants工厂供电 Factory Electricity Supply工程材料的力学性能测试 Mechanic Testing of Engineering Materials工程材料及热处理 Engineering Material and Heat Treatment工程材料学 Engineering Materials工程测量 Engineering Surveying工程测量实习 Engineering Measuring Practice工程测试技术 Engineering Testing Technique工程测试实验 Experiment on Engineering Testing工程测试信息 Information of Engineering Testing工程测试与信号处理 Engineering Testing & Signal Processing工程地质 Engineering Geology工程动力学 Engineering Dynamics工程概论 Introduction to Engineering工程概预算 Project Budget工程经济学 Engineering Economics工程静力学 Engineering Statics工程力学 Engineering Mechanics工程热力学 Engineering Thermodynamics工程数学 Engineering Mathematics工程项目概预算 Engineering Project Estimate & Budget工程项目评估 Engineering Project Evaluation工程优化方法 Engineering Optimization Method工程运动学 Engineering Kinematics工程造价管理 Engineering Cost Management工程制图 Graphing of Engineering工业产品学 Industrial Products工业电子学 Industry Electronics工业分析 Industrial Analysis工业锅炉 Industrial Boiler工业会计学 Industrial Accounting工业机器人 Industrial Robot工业技术基础 Basic Industrial Technology工业技术经济 Industrial Technology Economics工业建筑设计原理 Principles of Industrial Building Design工业经济理论 Industrial Economic Theory工业经济学 Industrial Economics工业美术设计 Art Designing in Industry工业企业财务管理 Industrial Enterprise Financial Management工业企业财务会计 Accounting in Industrial Enterprises工业企业管理 Industrial Enterprise Management工业企业经营管理 Industrial Enterprise Administrative Management工业社会学 Industrial Sociology工业心理学 Industrial Psychology工业窑炉 Industrial Stoves工艺过程自动化 Technics Process Automation工艺设计 Technics Design工艺实习 Technics Practice工艺原理与研究方法 Principles & Research of Technics公差 Common Difference公差测试实验 Common Difference Testing Experiment公差技术测量 Technical Measurement with Common Difference公差与配合 Common Difference & Cooperation公共关系 Public Relationship公共关系学 Public Relations公司法 Corporation Law公司组织与管理 Organization and Management公司组织与管理 Organization and Management of Corporate公文写作 Document Writing功能材料原理与技术 Principle and Technology of Functional Materials 功能高分子 Functional Polymer功能性食品 Function Foods古代汉语 Ancient Chinese古典文学作品选读 Selected Readings in Classical Literature骨科医学 Osteopathic Medicine固体磁性理论 Theory of Magnetism in Solid固体激光 Solid State Laser固体激光器件 Solid Laser Elements固体激光与电源 Solid State Laser & Power Unit固体理论 Solid State Theory固体物理 Solid-State Physics故障诊断与容错技术 Malfunction Diagnoses & Tolerance Technology关税 Tariff管理概论 Introduction to Management管理沟通 Management Communication, Management Negotiation管理会计 Managerial Accounting管理经济学 Management Economics管理科学专题 Management Science Special Subject管理数学 Management Mathematics管理系统FOXBASE Management System of FOXBASE管理系统模拟 Management System Simulation管理心理学 Management Psychology管理信息系统 Management Information System管理学 Management Theory, Principles of Management管理学 Principles of Management光波导理论 Light Wave Guide Theory光电技术 Photoelectric Technology光电检测与信号处理 Optoelectronic Detection and Processing光电课程设计 Photoelectric Course Exercise光电摄像技术 Photoelectric Photographing Technique光电探测及信号处理 Photoelectric Inspect & Signal Processing光电系统课程设计 Photoelectric System Course Design光电信号处理 Photoelectric Signal Processing光电信号与系统分析 Photoelectric Signal & Systematic Analysis光电信息计算机处理 Computer Processing in Photoelectric Information光电子技术 Photoelectronic Technique光电子学与光电信息技术 Optoelectronics and Optoelectronic Information Technology 光辐射探测技术 Ray Radiation Detection Technology光接入网技术 Technology of Light Access Network光谱 Spectrum光谱分析 Spectral Analysis光谱学 Spectroscopy光纤传感 Fibre Optical Sensors光纤传感器 Fibre Optical Sensors光纤传感器基础 Fundamentals of Fibre Optical Sensors光纤传感器及应用 Fibre Optical Sensors & Applications光纤光学 Fiber Optics光纤光学课程设计 Course Design of Fibre Optical光纤技术实验 Experiments in Fibre Optical Technology光纤实验 Experiments in Fibre Optical光纤通信基础 Basis of Fibre Optical Communication光纤通信技术 Fibre Optical Communication Technology光纤通信网络 Networks of Fiber Communications光纤通信系统 Fibre Optical Communication System, System of Fiber Communications 光纤原理与技术 Fibre Optical Operation & Technology光学 Optics光学测量 Optical Measurement光学分析法 Optical Analysis Method。
1 . Introduction To Objects1.1The progress of abstractionAll programming languages provide abstractions. It can be argued that the complexity of the problems you’re able to solve is directly related to the kind and quality of abstraction。
By “kind” I mean,“What is it that you are abstracting?” Assembly language is a small abstraction of the underlying machine. Many so—called “imperative” languages that followed (such as FORTRAN,BASIC, and C) were abstractions of assembly language。
These languages are big improvements over assembly language,but their primary abstraction still requires you to think in terms of the structure of the computer rather than the structure of the problem you are trying to solve。
The programmer must establish the association between the machine model (in the “solution space,” which is the place where you’re modeling that problem, such as a computer) and the model of the problem that is actually being solved (in the “problem space,” which is the place where the problem exists). The effort required to perform this mapping, and the fact that it is extrinsic to the programming language,produces programs that are difficult to write and expensive to maintain,and as a side effect created the entire “programming methods” industry.The alter native to modeling the machine is to model the problem you’re trying to solve。
A2A integration [,inti'ɡreiʃən]A2A整合abstract ['æbstrækt, æb'strækt]抽象的abstract base [beis] class (ABC)抽象基类abstract class 抽象类abstraction [æb'strækʃən]抽象、抽象物、抽象性access ['ækses, 'æksəs, æk'ses]存取、访问access level['levəl]访问级别access function ['fʌŋkʃən]访问函数account [ə'kaunt]账户action ['ækʃən]动作activate ['æktiveit]激活active ['æktiv]活动的actual parameter ['æktʃuəl] [pə'ræmitə]实参adapter [ə'dæptə]适配器add-in 插件address [ə'dres]地址address space 地址空间address-of operator ['ɔpəreitə]取地址操作符ADL (argument-dependent lookup) ['ɑ:ɡjumənt] [di'pendənt]ADO(ActiveX Data Object)ActiveX数据对象advanced [əd'vænst]高级的aggregation [,æɡri'ɡeiʃən]聚合、聚集1algorithm ['ælgə'rɪðəm]算法alias [ˈeɪli:əs]别名align [ə'lain]排列、对齐allocate [ˈæləkeit]分配、配置allocator['æləukeitə]分配器、配置器angle bracket['æŋɡl]['brækit]尖括号annotation [,ænəu'teiʃən]注解、评注API (Application Programming Interface) 应用(程序)编程接口app domain (application domain) [æp] [do'men]应用域application [,æpli'keiʃən]应用、应用程序application framework ['freimwə:k]应用程序框架appearance [ə'piərəns]外观append [ə'pend]附加architecture ['ɑ:kitektʃə]架构、体系结构archive file ['ɑ:kaiv] ['fail]归档文件、存档文件argument['ɑ:ɡjumənt]引数(传给函式的值)。
Chapter 1arbitrary Describes the property of language, including sign language, whereby there is no natural or intrinsic relationship between the way a word is pronounced (or signed)and its meaning.descriptive grammar A linguist’s description or model of the mental grammar, including the units, structures, and rules. An explicit statement of what speakers know about their language. Cf. prescriptive grammar, teaching grammar.grammar The mental representation of a speaker’s linguistic competence; what a speaker knows about a language, including its phonology, morphology, syntax, semantics,and lexicon. A linguistic description of a speaker’s mental grammar.lexicon The component of the grammar containing speakers’ knowledge about morphemes and words; a speaker’s mental dictionary.morphology The study of the structure of words; the component of the grammar that includes the rules of word formation.phonology The sound system of a language; the component of a grammar that includes the inventory of sounds (phonetic and phonemic units) and rules for their combinationand pronunciation; the study of the sound systems of all languages.semantics The study of the linguistic meaning of morphemes, words, phrases, and sentences.sign languages The languages used by deaf people in which linguistic units such as morphemes and words as well as grammatical relations are formed by manual and other bodymovements.syntax The rules of sentence formation; the component of the mental grammar thatrepresents speakers’ knowledge of the structure of phrases and sentences.Universal Grammar (UG) The innate principles and properties that pertain to the grammars of all human languages.Chapter 2anomia A form of aphasia in which patients have word-finding difficulties.aphasia Language loss or disorders following brain damage.cortex The approximately ten billion neurons that form the outside surface of the brain; also referred to as gray matter.critical age hypothesis The theory that states that there is a window of time between early childhood and puberty for learning a first language, and beyond which first language acquisition is almost always incomplete.lateralization, lateralized Term used to refer to cognitive functions localized to one or the other side of the brain.magnetic resonance A technique to investigate the molecular structures in human organs including the brain, which may be used to identify sites of brain lesions.imaging (MRI)neurolinguistics The branch of linguistics concerned with the brain mechanisms that underlie the acquisition and use of human language; the study of the neurobiology of language.positron-emission tomography (PET) Method to detect changes in brain activities and relate these changes to localized brain damage and cognitive tasks.savant Individual who shows special abilities in one cognitive area while being deficient in others. Linguistic savants have extraordinary language abilities but are deficient ingeneral intelligence.specific language impairment (SLI) Difficulty in acquiring language faced by certain children with no other cognitive deficits.Chapter 3acronym Word composed of the initials of several words, e.g., PET scan frompositron-emission tomography scan.compound A word composed of two or more words, e.g., washcloth, childproof cap.form Phonological or gestural representation of a morpheme or word.lexicon The component of the grammar containing speakers’ knowledge about morpheme s and words; a speaker’s mental dictionary.meaning The conceptual or semantic aspect of a sign or utterance that permits us tocomprehend the message being conveyed. Expressions in language generally haveboth form — pronunciation or gesture — and meaning. Cf. extension, intension,sense, reference.morpheme Smallest unit of linguistic meaning or function, e.g., sheepdogs contains three mormorphologicalrulesRules for combining morphemes to form stems and words.morphology The study of the structure of words; the component of the grammar that includes the rules of word formation.open class The class of lexical content words; a category of words that commonly adds new words, e.g., nouns, verbs.orthography The written form of a language; spelling.Chapter 4complement The constituent(s) in a phrase other than the head that complete(s) the meaning of the phrase. In the verb phrase found a puppy, the noun phrase a puppy is acomplement of the head verb found.deep structure Any phrase structure tree generated by the phrase structure rules of atransformational grammar. The basic syntactic structures of the grammar.direct object The grammatical relation of a noun phrase when it appears immediately below the verb phrase (VP) and next to the verb in deep structure; the noun phrasecomplement of a transitive verb, e.g., the puppy in the boy found the puppy.functional category One of the categories of function words, including determiner, aux, complementizer, and preposition. These categories are not lexical or phrasal categories. Cf. lexical categories, phrasal categories.lexicon The component of the grammar containing speakers’ knowledge about morphemes and words; a speaker’s mental dictionary.phrase structure tree A tree diagram with syntactic categories at each node that reveals both the linear and hierarchical structure of phrases and sentences.rules of syntax Principles of grammar that account for the grammaticality of sentences, theirhierarchical structure, their word order, whether there is structural ambiguity, etc. Cf.phrase structure rules, transformational rules.structure dependent (1) A principle of Universal Grammar that states that the application of transformational rules is determined by phrase structure properties, as opposed to structureless sequences of words or specific sentences; (2) the way children construct rules using their knowledge of syntactic structure irrespective of the specific words in the structure or their meaning.surface structure The structure that results from applying transformational rules to a deep structure. It is syntactically closest to actual utterances. Cf. transformational rule.transformational rule, transformation A syntactic rule that applies to an underlying phrase structure tree of a sentence (either deep structure or an intermediate structure already affected by a transformation) and derives a new structure by moving or inserting elements, e.g., the transformational rules of wh movement and do insertion relate the deep structure sentence John saw who to the surface structure Who did John see.Chapter 5coreferential Describes noun phrases (including pronouns) that refer to the same entity.heteronyms Different words spelled the same (i.e., homographs) but pronounced differently, e.g.bass, meaning either ―low tone‖ [bes] or ―a kind of fish‖ [bœs].homographs Words spelled identically, and possibly pro nounced the same, e.g., bear meaning ―to tolerate,‖ and bear the animal; or lead the metal and lead, what leaders do.hyponyms Words whose meanings are specific instances of a more general word, e.g., red, white, and blue are hyponyms of the word color; triangle is a hyponym of polygon.lexical semantics The subfield of semantics concerned with the meanings of words and the meaning relationships among words.pragmatics The study of how context and situation affect meaning.semantic features A notational device for expressing the presence or absence of semantic properties by pluses and minuses, e.g., baby is [+ young], [+ human], [– abstract], etc.semantic properties The components of meaning of a word, e.g., ―young‖ is a semantic property of baby, colt, puppy.semantics The study of the linguistic meaning of morphemes, words, phrases, and sentences. Chapter 7accidental gap Phonological or morphological form that constitutes possible but nonoccurring lexical items, e.g., blick, unsad.complementary distribution The situation in which phones never occur in the same phonetic environment, e.g., [p] and [ph] in English. Cf. allophones.epenthesis The insertion of one or more phones in a word, e.g., the insertion of [E] in children to produce [CIlEdrEn] instead of [CIldrEn].free variation Alternative pronunciations of a word in which one sound is substituted for another without changing the word’s meaning, e.g., pronunciation of bottle as [batEl] or[ba/El].geminate A sequence of two identical sounds; a long vowel or long consonant denoted either by writing the phonetic symbol twice as in [biiru], [sakki] or by use of a colon [bi:ru],[sak:i].intonation Pitch contour of a phrase or sentence.length A prosodic feature referring to the duration of a segment. Two sounds may contrast in length, e.g., i n Japanese the first vowel is [+ long} in /biiru/ ―beer‖ but [– long],therefore short, in /biru/ ―building.‖metathesis The phonological process that reorders segments, often by transposing twosequential sounds, e.g., the pronunciation of ask /œsk/ in some English dialects as[œks].minimal pair (or set) Two (or more) words that are identical except for one phoneme that occurs in the same position in each word, e.g., pain /pen/, bane /ben/, main /men/.phonetic features Phonetic properties of segments (e.g., voice, nasal, alveolar) that distinguish one segment from another.Chapter 8babbling Sounds produced in the first few months after birth that gradually come to include only sounds that occur in the language of the household. Deaf children babble withhand gestures.bilingual language acquisition The (more or less) simultaneous acquisition of two or more languages before the age of three years such that each language is acquired with native competency.holophrastic The stage of child language acquisition in which one word conveys a complex message similar to that of a phrase or sentence.interlanguage grammars The intermediate grammars that second language learners create on their way to acquiring the (more or less) complete grammar of the target language.motherese, child directed speech The special intonationally exaggerated speech that some adults sometimes use to speak with small children, sometimes called baby talk.(CDS)overgeneralization Children’s treatment of irregular verbs and nouns as if they were regular, e.g.,bringed, goed, foots, mouses, for brought, went, feet, mice. This shows that the childhas acquired the regular rules but has not yet learned that there are exceptions.poverty of the stimulus, impoverished data Refers to the incomplete, noisy, and unstructured utterances that children hear, including slips of the tongue, false starts, and ungrammatical and incomplete sentences, together with a lack of concrete evidence about abstract grammatical rules and structure.second language acquisition The acquisition of another language or languages after first language acquisition is under way or completed. Also L2 acquisition.sign languages The languages used by deaf people in which linguistic units such as morphemes and words as well as grammatical relations are formed by manual and other bodymovements.telegraphic stage The period of child language acquisition that follows the two-word stage and consists primarily of telegraphic speech.Chapter 9blend A word composed of the parts of more than one word, e.g., smog from smoke + fog.computational linguistics A subfield of linguistics and computer science that is concerned with computer processing of human language.formant In the frequency analysis of speech, a band of frequencies of higher intensity than surrounding frequencies, which appears as a dark line on a spectrogram. Individualvowels display different formant patterns.fundamental frequency In speech, the rate at which the vocal cords vibrate, symbolized as F0, called F-zero, perceived by the listener as pitch.lexical decision Task of subjects in psycholinguistic experiments who on presentation of a spoken or printed stimulus must decide whether it is a word or not.parse The act of determining the grammaticality of sequences of words according to rules of syntax, and assigning a linguistic structure to the grammatical ones.primes The basic formal units of sign languages that correspond to phonological elements of spoken language.psycholinguistics The branch of linguistics concerned with linguistic performance, languageacquisition, and speech production and comprehension.spectrogram A visual representation of speech decomposed into component frequencies, with time on the x axis, frequency on the y axis, and intensity portrayed on a gray scale —the darker, the more intense. Also called voiceprint.spoonerism A speech error in which phonemic segments are reversed or exchanged, e.g., you have hissed my mystery lecture for the intended you have missed my history lecture;named after the Reverend William Archibald Spooner, a nineteenth-century OxfordUniversity professor. Chapter 10African American English (AAE) Dialects of English spoken by some Americans of African descent, or by any person raised from infancy in a place where AAE is spoken. Cf. Ebonics.Chicano English (ChE) A dialect of English spoken by some bilingual Mexican Americans in the western and southwestern United States.code-switching The movement back and forth between two languages or dialects within the same sentence or discourse.dialect A variety of a language whose grammar differs in systematic ways from othervarieties. Differences may be lexical, phonological, syntactic, and semantic. Cf.regional dialect, social dialect, prestige dialect.dialect map A map showing the areas where specific dialectal characteristics occur in the speech of the region.idiolect An individual’s way of speaking, reflecting that person’s grammar.isogloss A geographic boundary that separates areas with dialect differences, e.g., a line ona map on one side of which most people say faucet and on the other side of whichmost people say spigot.lingua franca A language common to speakers of diverse languages that can be used forcommunication and commerce, e.g., English is the lingua franca of internationalairline pilots.pidgin A simple but rule-governed language developed for communication among speakers of mutually unintelligible languages, often based on one of those languages.Standard American English (SAE) An idealized dialect of English that some prescriptive grammarians consider the proper form of English.Chapter 11analogic change A language change in which a rule spreads to previously unaffected forms, e.g., the plural of cow changed from the earlier kine to cows by the generalization of the pluralformation rule or by analogy to regular plural forms. Also called internal borrowing.assimilation rules/assimilation A phonological process that changes feature values of segments to make them more similar, e.g., a vowel becomes [+nasal] when followed by [+ nasal] consonant. Also called feature spreading rules.ease of articulation The tendency of speakers to adjust their pronunciation to make it easier, or more efficient, to move the articulators. Phonetic and phonological rules are often the result of ease of articulation, e.g., the rule of English that nasalizes vowels when they precede a nasal consonant.genetically related Describes two or more languages that developed from a common, earlier language,e.g., French, Italian, and Spanish, which all developed from Latin.Great Vowel Shift A sound change that took place in English sometime between 1400 and 1600 C.E. in which seven long vowel phonemes were changed.Indo-European The descriptive name given to the ancestor language of many modern language families, including Germanic, Slavic, and Romance. Also calledProto-Indo-European.Proto-Germanic The name given by linguists to the language that was an ancestor of English,German, and other Germanic languages.protolanguage The first identifiable language from which genetically related languages developed.regular sound correspondence The occurrence of different sounds in the same position of the same word in different languages or dialects, with this parallel holding for a significant number of words, e.g., [aj] in non-Southern American English corresponds to [a:] in Southern American English. Also found between newer and older forms of the same language.sound shift Historical phonological change.Chapter 12alphabetic writing A writing system in which each symbol typically represents one sound segment. consonantalalphabetThe symbols of a consonantal writing system.cuneiform A form of writing in which the characters are produced using a wedge-shaped stylus. hieroglyphics A pictographic writing system used by the Egyptians around 4000 B.C.Eideogram, ideograph A character of a word-writing system, often highly stylized, that represents a concept, or the pronunciation of the word representing that concept.logograms The symbols of a word-writing or logographic writing system.logographic, word writing A system of writing in which each character represents a word or morpheme of the language, e.g., Chinese.pictogram A form of writing in which the symbols resemble the objects represented; anonarbitrary form of writing.rebus principle In writing, the use of a pictogram for its phonetic value, e.g., using a picture of a bee to represent the verb be or the sound [b].syllabic A phonetic feature of those sounds that may constitute the nucleus of syllables; all vowels are syllabic, and liquids and nasals may be syllabic in such words as towel,button, bottom.。
Assembly Language的特点1. 什么是Assembly LanguageAssembly Language(汇编语言)是一种低级别的编程语言,用于与计算机硬件进行直接交互。
与高级编程语言相比,汇编语言更接近计算机底层的操作。
它使用符号化的操作码和指令,以及寄存器和内存地址来执行底层的计算机指令。
2. Assembly Language的特点2.1 与机器语言直接对应汇编语言是与机器语言直接对应的,每条汇编指令都对应着一条机器指令。
因此,使用汇编语言编写的程序在执行时可以更直接地操作计算机硬件,达到更高的执行效率。
2.2 可读性较低相比高级编程语言,汇编语言的可读性较低,代码通常包含大量的操作码和内存地址。
编写汇编语言程序需要对计算机硬件有深入的了解,以及对内存布局和寄存器的使用有清晰的概念。
2.3 直接访问硬件资源汇编语言程序可以直接访问计算机的硬件资源,如寄存器和特定的存储地址。
这使得汇编语言程序在对硬件进行底层操作时更加灵活和高效。
2.4 性能优化能力由于汇编语言可以直接操作硬件资源,并与机器语言直接对应,因此它具有很强的性能优化能力。
程序员可以通过精确控制资源的使用和优化算法,达到更高的性能水平。
2.5 灵活性高汇编语言具有很高的灵活性,程序员可以根据具体需求来编写自定义的指令,以及实现更为复杂的算法和数据结构。
这在一些特定的应用场景下非常有用,例如编写嵌入式系统或实现底层驱动程序等。
3. Assembly Language的应用虽然汇编语言的学习曲线较陡峭,但它在一些特定的领域仍然得到了广泛的应用。
3.1 嵌入式系统开发嵌入式系统通常具有限制的资源和特定的实时需求,因此需要高效且直接地与硬件进行交互。
汇编语言可以满足这种需求,因此在嵌入式系统开发中被广泛使用。
3.2 驱动程序开发操作系统的驱动程序需要直接与硬件设备进行交互,并且要求高度的性能和可靠性。
编写驱动程序时,汇编语言可为程序员提供更精确的控制和优化能力,以实现对硬件的最佳操作。
普通语言学教程英文名标题:Introduction to General Linguistics正文:Introduction to General Linguistics is an essential textbook that provides a comprehensive overview of the fundamental concepts and theories in the field of linguistics. This course aims to introduce students to the scientific study of language and its various components, such as phonetics, phonology, morphology, syntax, and semantics.The textbook covers a wide range of topics, starting with an introduction to the nature of language and its role in communication. It explores the ways in which languages differ from one another and how they are structured. Students will learn about the sounds of language (phonetics) and how these sounds are organized into meaningful units (phonology). They will also delve into the study of word formation (morphology) and the rules that govern sentence structure (syntax). Additionally, the book discusses the meaning of words and sentences (semantics) and how meaning is conveyed throughcontext.Throughout the course, students will engage in practical exercises and examples to reinforce their understanding of linguistic concepts. They will analyze language data, apply theoretical frameworks, and learn how to conduct linguistic research. The textbook also highlights the interdisciplinary nature of linguistics, showing how it intersects with fields such as psychology, anthropology, and computer science.Furthermore, the book incorporates case studies from various languages worldwide, providing a global perspective on linguistic diversity and language typology. It explores the evolution of languages, language acquisition in children, and the sociolinguistic aspects of language, including language variation and language change.Introduction to General Linguistics is designed to be accessible to students with no prior background in linguistics. It provides a solid foundation for further studies in linguistics or related fields. The book is an invaluable resource for undergraduate students, language enthusiasts, andanyone interested in understanding the underlying principles of human language and communication.。
外文原文:The Art of Assembly Language1. What's Wrong With Assembly Language?2. What's Right With Assembly Language?1. What's Wrong With Assembly LanguageAssembly language has a pretty bad reputation. The common impression about assembly languageprogrammers today is that they are all hackers or misguided individuals who need enlightenment.Here are the reasons people give for not using assembly: (1)Assembly is hard to learn.(2)Assembly is hard to read and understand.(3)Assembly is hard to debug.(4)Assembly is hard to maintain.(5)Assembly is hard to write.(6)Assembly language programming is time consuming.(7)Improved compiler technology has eliminated the need for assembly language.(8)Today, machines are so fast that we no longer need to use assembly.(9)If you need more speed, you should use a better algorithm rather than switch to assembly language.(10)Machines have so much memory today, saving space using assembly is not important.(11)Assembly language is not portable.These are some strong statements indeed!Given that this is a book which teaches assembly language programming, written for college level students, written by someone who appears to know what he's talking about, your natural tendency is to believe something if it appears in print. Having just read the above, you're starting to assume that assembly must be pretty bad. And that, dear friend, is eighty percent of what's wrong with assembly language. That is, people develop some very strong misconceptions about assembly language based on what they've heard from friends, instructors, articles, and books. Oh, assembly language is certainly not perfect. It does have many real faults.Those faults, however, are blown completely out of proportion by those unfamiliar with assembly language. The next time someone starts preaching about the evils of assembly language, ask, "how many years of assembly language programming experience do you have?" Of course assembly is hard to understand if you don't know it. It is surprising how many people are willing to speak out against assembly language based only on conversations they've had or articles they've read.Assembly language users also use high level languages (HLLs); assembly's most outspoken opponents rarely use anything but HLLs. Who would you believe, an expert well versed in both types of programming languages or someone who has never taken the time to learn assembly language and develop an honest opinion of its capabilities?In a conversation with someone, I would go to great lengths to address each of the above issues.Indeed, in a rough draft of this chapter I spent about ten pages explaining what is wrong with each of the above statements. However, this book is long enough and I felt that very little was gained by going on and on about these points. Nonetheless, a brief rebuttal to each of the above points is in order, if for no other reason than to keep you from thinking there isn't a decent defense for these statements. Assembly is hard to learn. So is any language you don't already know. Try learning (really learning) APL, Prolog, or Smalltalk sometime. Once you learn Pascal, learning another language like C, BASIC, FORTRAN, Modula-2, or Ada is fairly easy because these languages are quite similar to Pascal. On the other hand, learning a dissimilar language like Prolog is not so simple.Assembly language is also quite different from Pascal. It will be a little harder to learn than one of the other Pascal-like languages. However, learning assembly isn't much more difficult than learning your first programming language.Assembly is hard to read and understand. It sure is, if you don't know it. Most people who make this statement simply don't know assembly. Of course, it's very easy to write impossible-to-read assembly language programs. It's also quite easy to write impossible-to-read C, Prolog, and APL programs. With experience, you will find assembly as easy to read as other languages.Assembly is hard to debug. Same argument as above. If you don't have muchexperience debugging assembly language programs, it's going to be hard to debug them. Remember what it was like finding bugs in your first Pascal (or other HLL) programs? Anytime you learn a new programming language you'll have problems debugging programs in that language until you gain experience.Assembly is hard to maintain. C programs are hard to maintain. Indeed, programs are hard to maintain period. Inexperienced assembly language programmers tend to write hard to maintain programs. Writing maintainable programs isn't a talent. It's a skill you develop through experience. Assembly language is hard. This statement actually has a ring of truth to it. For the longest time assembly language programmers wrote their programs completely from scratch, often "re-inventing the wheel." HLL programmers, especially C, Ada, and Modula-2 programmers, have long enjoyed the benefits of a standard library package which solves many common programming problems. Assembly language programmers, on the other hand, have been known to rewrite an integer output routine every time they need one. This book does not take that approach. Instead, it takes advantage of some work done at the University of California, Riverside: the UCR Standard Library for 80x86 Assembly Language Programmers. These subroutines simplify assembly language just as the C standard library aids C programmers. The library source listings are available electronically via Internet and various other communication services as well as on a companion diskette.Assembly language programming is time consuming. Software engineers estimate that developers spend only about thirty percent of their time coding a solution to a problem. Even if it took twice as much time to write a program in assembly versus some HLL, there would only be a fifteen percent difference in the total project completion time. In fact, good assembly language programmers do not need twice as much time to implement something in assembly language. It is true using a HLL will save some time; however, the savings is insufficient to counter the benefits of using assembly language.Improved compiler technology has eliminated the need for assembly language. This isn't true and probably never will be true. Optimizing compilers are getting better every day. However, assembly languageprogrammers get better performance by writing their code differently than they would if they were using some HLL. If assembly language programmers wrote their programs in C and then translated them manually into assembly, a good C compiler would produce equivalent, or even better, code. Those who make this claim about compiler technology are comparing their hand-compiled code against that produced by a compiler. Compilers do a much better job of compiling than humans. Then again, you'll never catch an assembly language programmer writing "C code with MOV instructions." After all, that's why you use C compilers.Today, machines are so fast that we no longer need to use assembly. It is amazing that people will spend lots of money to buy a machine slightly faster than the one they own, but they won't spend any extra time writing their code in assembly so it runs faster on the same hardware. There are many raging debates about the speed of machines versus the speed of the software, but one fact remains: users always want more speed. On any given machine, the fastest possible programs will be written in assembly language.If you need more speed, you should use a better algorithm rather than switch to assembly language. Why can't you use this better algorithm in assembly language? What if you're already using the best algorithm you can find and it's still too slow? This is a totally bogus argument against assembly language. Any algorithm you can implement in a HLL you can implement in assembly. On the other hand, there are many algorithms you can implement in assembly which you cannot implement in a HLL. Assembly language is not portable. This is an undeniable fact. An 80x86 assembly language program written for an IBM PC will not run on an Apple Macintosh. Indeed, assembly language programs written for the Apple Macintosh will not run on an Amiga, even though they share the same 680x0 microprocessor. If you need to run your program on different machines, you'll have to think long and hard about using assembly language. Using C (or some other HLL) is no guarantee that your program will be portable.C programs written for the IBM PC won't compile and run on a Macintosh. And even if they did, most Mac owners wouldn't accept the result. Portability is probably the biggest complaint people have against assembly language. They refuse to use assembly because it is not portable,and then they turn around and write equally non-portable programs in C. Yes, there are lots of lies, misconceptions, myths, and half-truths concerning assembly language. Whatever you do, make sure you learn assembly language before forming your own opinions. Speaking out in ignorance may impress others who know less than you do, but it won't impress those who know the truth.2 What's Right With Assembly Language?An old joke goes something like this: "There are three reasons for using assembly language: speed,speed, and more speed." Even those who absolutely hate assembly language will admit that ifspeed is your primary concern, assembly language is the way to go. Assembly language has several benefits:(1)Speed. Assembly language programs are generally the fastest programs around.(2)Space. Assembly language programs are often the smallest.(3)Capability. You can do things in assembly which are difficult or impossible in HLLs.(4)Knowledge. Your knowledge of assembly language will help you write better programs, even when using HLLs.Assembly language is the uncontested speed champion among programming languages. An expertassembly language programmer will almost always produce a faster program than an expert C programmer. While certain programs may not benefit much from implementation in assembly, you can speed up many programs by a factor of five or ten over their HLL counterparts by careful coding in assembly language; even greater improvement is possible if you're not using an optimizing compiler. Alas, speedups on the order of five to ten times are generally not achieved by beginning assembly language programmers. However, if you spend the time to learn assembly language really well, you too can achieve these impressive performance gains. Despite some people's claims that programmers no longer have to worry about memory constraints, there are many programmers who need to write smaller programs. Assembly language programs are often less than one-half the size of comparable HLL programs. This is especially impressive when you considerthe fact that data items generally consume the same amount of space in both types of programs, and that data is responsible for a good amount of the space used by a typical application. Saving space saves money. Pure and simple. If a program requires 1.5 megabytes, it will not fit on a 1.44 Mbyte floppy. Likewise, if an application requires 2 megabytes RAM, the user will have to install an extra megabyte if there is only one available in the machine. Even on big machines with 32 or more megabytes, writing gigantic applications isn't excusable. Most users put more than eight megabytes in their machines so they can run multiple programs from memory at one time. The bigger a program is, the fewer applications will be able to coexist in memory with it. Virtual memory isn't a particularly attractive solution either. With virtual memory, the bigger an application is, the slower the system will run as a result of that program's size.Capability is another reason people resort to assembly language. HLLs are an abstraction of a typical machine architecture. They are designed to be independent of the particular machine architecture. As a result, they rarely take into account any special features of the machine, features which are available to assembly language programmers. If you want to use such features, you will need to use assembly language. A really good example is the input/output instructions available on the 80x86 microprocessors. These instructions let you directly access certain I/O devices on the computer. In general, such access is not part of any high level language. Indeed, some languages like C pride themselves on not supporting any specific I/O operations. In assembly language you have no such restrictions. Anything you can do on the machine you can do in assembly language. This is definitely not the case with most HLLs.Of course, another reason for learning assembly language is just for the knowledge. Now some of you may be thinking, "Gee, that would be wonderful, but I've got lots to do. My time would be better spent writing code than learning assembly language." There are some practical reasons for learning assembly, even if you never intend to write a single line of assembly code. If you know assembly language well, you'll have an appreciation for the compiler, and you'll know exactly what the compiler is doing with all those HLL statements. Once you see how compilerstranslate seemingly innocuous statements into a ton of machine code, you'll want to search for better ways to accomplish the same thing. Good assembly language programmers make better HLL programmers because they understand the limitations of the compiler and they know what it's doing with their code. Those who don't know assembly language will accept the poor performance their compiler produces and simply shrug it off. Yes, assembly language is definitely worth the effort. The only scary thing is that once you learn it really well, you'll probably start using it far more than you ever dreamed you would. That is a common malady among assembly language programmers. Seems they can't stand what the compilers are doing with their programs.中文译文:汇编语言的艺术1.汇编语言的不足之处是什么?2.汇编语言的优势是什么?1.汇编语言的不足是什么汇编语言现在的名声很不好,人们对汇编程序员普遍的印象是:他们不是黑客就是一些受到错误思想指引的,需要别人开导的人。
Experiment 2:Introduction to Assembly Language ProgrammingThis experiment is the gateway to all that you do in this course, both inside and outside the Laboratory. It lays the foundation for everything that is to come in the programmer’s view of computer architecture, showing you some important principles and guiding you through some of the details of programming for microcontroller-based systems.AimsThis experiment aims to:introduce simple ARM assembly language instructions,show the process of hand-compilation from C to assembly language,show the programmer’s view of the register and memory,show the basics of writing and debugging assembly language program for the ARM microprocessor, andteach you “best practice” techniques for formatting your code (also known as program-ming style rules).PreparationIt is important that you prepare for each laboratory experiment, so that you can use your time (and your partner’s time) most effectively. For this particular experiment, you should do the following before coming in to the Laboratory:get your own copy of this Laboratory Manual, as well as the accompanying CD-ROM,read through this experiment in detail, trying to understand what you will be doing,quickly read through the relevant material from your lecture notes for this course, and quickly skim through An Introduction to the GNU Assembler and An Introduction to the GNU Debugger. You can find these documents on your CD-ROM.If you are keen (and you should be!), you could also:browse through the Companion CD-ROM,install the software on the CD-ROM onto your computer at home,type up or modify the necessary files in this experiment, to save time in class, andrun through the experiment at home using the simulator.Getting StartedOnce you arrive at the Laboratory, find a spare workbench and log into the Host PC. Next, create a new directory for this experiment. Then, copy all of the files in the directory ~elec2041/ unsw/elec2041/labs-src/exp2 on the Laboratory computers into this new directory. You can do all of this by opening a Unix command-line shell window and entering: mkdir ~/exp2cd ~/exp2cp ~elec2041/cdrom/unsw/elec2041/labs-src/exp2/* .Be careful to note the “.” at the end of the cp command!If you are doing this experiment at home, you will not have a ~elec2041 directory, of course. You should use the unsw/elec2041/labs-src/exp2 directory on your CD-ROM instead.Programming StyleThis experiment relies on the fact that you have understood some of the concepts presented in the previous experiment regarding how you should write your programs. In particular, you should follow the style rules illustrated in the actual source code files used in each experi-ment, since many comments have been removed from the printed version to save paper. The style rules used in the actual source code files can be distilled into the following list, among other things:Start each source code file with a heading, and include your name and e-mail address so that it is easy to see who is responsible for the file,Include a description of what the program does,Use a sensible layout for your code, with proper indentation,Use sensible names for labels that reflect their use,Include appropriate and extensive comments,Define labels instead of using “magic numbers”,Break up your program into appropriate modules, andWrite code that follows the ARM Thumb Procedure Call Standard. This standard is dis-cussed in Experiment 3; you do not need to worry about it in this experiment.To sensibly lay out your code means to use something similar to the following format: label: instruction ; commentIt is a good idea to adhere to this format as it makes your source code look neat and tidy. Labels should start in the first column; this makes them stand out and therefore easy to see. Instructions (which can be broken up into a mnemonic part and an arguments part) should be lined up, as should comments. For example, this first block of code is much easier to read compared to the second, although the content is the same:; This is how you should format your codeser_rd_lp1:ldrb r0, [r1, #ser_stat] ; Read the serial port statustst r0, #ser_Rx_rdy ; Check whether a byte is ready to be read beq ser_rd_lp1 ; (No: jump back and try again); And this is how you should not do it!j1: LDRB r0,[r1,#ser_stat] ; Load byte r0 from ser_stattst r0,#ser_Rx_rdy ; Test R0Beq j1You should also include blank lines in strategic places to break up your code into blocks. This highlights groups of instructions as belonging to each other.By the way, some people prefer to write the instructions in upper case (eg, “MOV R0, R3”). Others like to use lower case (“mov r0, r3”). Whichever way you do it, be consistent!You should enhance the readability of your code by choosing sensible names for labels. These names should reflect their function. For example, in the code just listed, ser_rd_lp1 is obviously much more informative than j1: it suggests that it is part of the routine ser_rd and is the start of a loop.It is often difficult to think of hundreds of unique labels that can be called “sensible”. For this reason, it is usually a good idea to just choose a sensible name for the entry point of a function, then use derivates of this for all labels within that function. This has the added bonus of indicating the extent of that function.You should use the comment field to explain the meaning of every instruction. It is usually possible to attach sensible comments to every line. Consider this line:add r2, r2, #1 ; Increment R2The previous line is an example of a comment you should not write! The comment does not convey any information that you don’t already have (from the instruction itself). This next line is much better, since it reminds you of R2’s purpose:add r2, r2, #1 ; Increment the loop indexThe “#1” in the preceding example is one of the few cases where it makes sense to use immediate numbers as a parameter. In general, though, you should not use “magic num-bers” in your code. It is better to equate labels with any values needed, then use the labels instead throughout your code. For example:.set portA, 0x10000000Now you can use portA instead of the number 0x10000000 where appropriate. Doing this conveys information: 0x10000000 could mean many things, but portA obviously refers to just one thing, Port A in the Microcontroller I/O space. You should also place all such defi-nitions at the top of your code or in a separate “header file”; this makes it easier to change the definitions later, if required.You should also break up your program into appropriate modules. At the very least, this means you should add appropriate comments at the start of every function, to document that function’s purpose, parameters and results. Such comments should also indicate any side-effects of the function, any accesses to non-local data, any registers that are corrupted, and so on.Finally, as you will see from Experiment 3, you should follow the ARM Thumb Procedure Call Standard (abbreviated to ATPCS) that other programmers follow. This ensures interoper-ability with code written by other programmers or with code generated by a compiler.If you look at any source code file included in these experiments, you will find that it obeys all of these rules!Registers and MemoryEvery modern processor has a limited number of fast registers as a temporary working-stor-age for data. The registers are part of the processor and, therefore, can be accessed by it very quickly. The ARM processor has sixteen 32-bit registers visible to the programmer in the normal mode of operation. Obviously, any real program requires much more storage than is available in the registers alone. Additional storage comes by way of memory exter-nal to the processor. The size of the external memory is in the order of kilobytes or mega-bytes, depending on the system requirements.In microprocessor systems, memory performs two functions:It stores the program instructions, andit stores the program data.The microprocessor executes an instruction by first transferring it to the processor (the so-called fetch cycle). Next, it executes the instruction by performing an operation on data in the registers (the execute cycle). Finally, it stores the result into another register.Since there are not enough registers to store everything a program would need, the proces-sor needs to access the external memory to get data from there and store the results back. Think of memory as library shelves, the register set as a desk in the library, and the data as books. If you only want to refer to a few books, you can put them all on your desk (the reg-isters). However, if you need more books than can be placed on your desk, you will need to go back and forth between the desk and the library shelves (the memory).From C to AssemblyThe files add-c.c and add-v1.s (now in your ~/exp2 directory) are a simple C program and its hand-compiled ARM assembly language version. The C and ARM assembly language filesappear in Figures 1 and 2 below. Note that many comments have been removed from all examples in this document to conserve paper. If at all possible, please use kate (as shown in Experiment 1) to read these files on-line:int main (void){int a = 10; /* First variable */int b = 11; /* Second variable */int c; /* Result */c = a + b; /* The simplest of programs? */return c; /* main() is called by the operating system */}Figure 1: Program add-c.c.text ; Executable code follows_start: .global _start ; "_start" is required by the linker.global main ; "main" is our main programb main ; Start running the main programmain: ; Entry to the function "main"mov r1, #10 ; 0x0A in hexadecimalmov r2, #11 ; 0x0B in hexadecimaladd r0, r1, r2 ; Add the two numbers together: R0 = R1 + R2mov pc, lr ; Stop the program and return to the Operating; System (OS)..endFigure 2: Program add-v1.sYou should observe that the hand-compiled assembly code has assigned registers R1, R2 and R0 (shown as r1, r2 and r0 in Figure 2) to the C variables a, b, and c respectively. The first two instructions after the label main set the registers R1 and R2 to 10 and 11 respec-tively. The register values are added together in the third instruction after the label main and the result is stored in register R0.Assembling and DebuggingYou can assemble add-v1.s by executing the GNU assembler, arm-elf-as. This can be invoked as:arm-elf-as -marm7tdmi --gdwarf2 -o add-v1.o add-v1.sThe command-line option –marm7tdmi instructs the GNU Assembler that your target CPU is the ARM7TDMI (ARMv4T architecture). The option ––gdwarf2 requests the assembler to include information in the output file that is helpful for debugging—it does not, inciden-tally, alter your program in any way.Once you have assembled your source file into binary object file (with the extension .o), you use the GNU Linker to create the final executable (extension .elf). This is done by executing: arm-elf-ld -o add-v1.elf add-v1.oNext, invoke the GNU Debugger to debug and run your program. You can start the debugger in its graphical interface mode by entering the following command line:arm-elf-insight add-v1.elf &Notice the ampersand “&” at the end of the command line: this makes the arm-elf-insight program execute as a shell background task. The Source window shown in Figure 3 should appear. Other windows may also appear; you may ignore them for now.Figure 3: GNU Debugger main windowOne of the first things that you should do is open the debugger’s Console window: this gives you the full GNU Debugger command-line interface, which you will need for more advanced tasks. You can do this by selecting View » Console from the main menu. In this document,“the main menu” always means “the main menu in the Source window”. In addition, select View » Registers and View » Memory to open the Registers and Memory windows as well. Next, download the executable file add-v1.elf into the simulator. To do this, first select File » Target Settings from the main menu. Select Simulator as the target. Make sure that all three Set breakpoint choices (main, exit and _start) are selected. Click OK to close the dialog box.Now you are almost ready to run the program. Select Run » Connect to Target from the main menu to connect to simulator, then Run » Download to download the program to the simulator memory.Finally, select Run » Run from the main menu to run the program. You can also click on the Run button in the toolbar (). In the upper right-hand corner, on the tool bar, make sure that you select SRC+ASM mode. You should see something like Figure 4. You are finally ready to start debugging!Figure 4: The program add-v1.elf in the GNU DebuggerIn Figure 4, the top part of the window contains the assembly language code as entered by you. The lower part of the window contains the assembly language instructions as placed inmemory by the GNU Linker, arm-elf-ld. The linker uses 0x8000 as the starting addressfor the program. Each instruction occupies exactly 4 bytes in memory.In the Registers window, inspect the value for register PC (shown as pc in the window).What is its value? Register PC points to the current instruction being executed; that is, it shows the address of the instruction being executed. In the Memory window, you can checkthe contents of memory at address 0x8000 (and following) by simply entering that addressin the Address edit box. The program instructions shown in the lower part of Source win-dow should then appear as hexadecimal numbers.Step through the instructions by clicking on Step in the toolbar (). Check the contents of registers PC (shown as pc or r15), R1, R2 and R0 as you step through the instructions.Note: As you try execute the last instruction, “mov pc, lr”, the simulator may gointo an infinite “busy doing nothing” loop. You can stop the program by clicking on the Stop button in the toolbar (). Be warned that it may take the debugger a little while to respond… You may see a dialog box with the message “Program received signal SIGINT, Interrupt”. If so, click OK.Compiling C ProgramsTask: You can compile the add-c.c source file by executing the GNU compiler, arm-elf-gcc. This can be invoked as:arm-elf-gcc -c -mcpu=arm7tdmi -O2 -g -Wall -o add-c.o add-c.cBy the way, be careful to note that the -O2 option in this command line uses the capital letter “O”, not the number zero!Use the GNU Linker to link add-c.o and the start-up routines in cstart.o to create the final executable (extension .elf):arm-elf-ld -o add-c.elf add-c.o cstart.oAlternatively, you can use the make command to automatically generate the add-c.o and add-c.elf files. This command usually reads a file called Makefile to get its instructions (although you can direct it to use any other file you like); this file essentially contains the equivalent of command lines that you would otherwise type.Note: The contents of make-files are a bit cryptic, to say the least! However, using such files “as is” can save you a lot of typing. In the laboratory experiments for this course, the make-files are named after the source code files, with a .make extension.So, for example, the make-file for add-c.elf is add-c.make. Type “make –f makefile” to use a particular make-file makefile. Thus, to create add-c.elf, type: make –f add-c.makeYou can also delete add-c.o and add-c.elf (the compiler-generated files) by typing:make –f add-c.make cleanIf you don’t want to use make, you can write a simple shell script that contains all the commands you need. You can then execute the shell script file at any time.Now you can invoke the GNU Debugger to debug and run add-c.elf. Make sure that you select SRC+ASM mode, then choose add-c.c from the list on the left-hand side, and main from the list in the middle.Compare the hand-assembled version of the program add-v1.s (in Figure 2) with the com-piler-generated version of the program add-c.s (Figure 1). Look at instructions around the label main in the compiled code. Three instructions in our hand-assembled code have been replaced with just one instruction:mov r0, #21The compiler has recognised the fact that variables a and b are not required to compute the value of variable c to be 21. Since there is no real use for the variables a and b, the compiler has discarded them, to reduce code size.This is the power of modern compilers! Code generated by the modern compilers is usually superior to the hand-crafted assembly language code written by programmers. This is one of the reasons that very few people write assembly language programs any more! Nevertheless, knowledge of assembly language programming is very important in under-standing how software interfaces with hardware. It also helps develop the programmer’s view of computer architecture.To further demonstrate the power of the compiler, consider inserting the following instruc-tion into the C program in Figure 1 (immediately after “c = a + b”):b = a + b + 1;Task: Compile, link and run this new program. As you can see, the compiled version of the code (ie, the code translated into assembly language) hasn’t changed and still shows the single instruction:mov r0, #21Again, the optimising compiler has discarded the redundant statement “b = a + b + 1;”. This is because this statement does not contribute to working out the value of c.Load and Store OperationsThe program add-v1.s directly assigned registers R1, R2 and R0 to the C variables a, b and c. Going back to the example of books (the data) on a desk in the library (the register set) and on the shelf (the memory), this direct assignment is like having all the books you need on the desk. However, if you assume that all of the books are initially on the shelf, the pro-gram in Figure 2 can then be rewritten to be as shown in Figure 5:.text ; Executable code follows_start: .global _start ; "_start" is required by the linker.global main ; "main" is our main programb main ; Start running the main programmain: ; Entry to the function "main"ldr r1, [pc, #12] ; R1 = 10ldr r2, [pc, #12] ; R2 = 11add r0, r1, r2 ; R0 = R1 + R2 = 21str r0, [pc, #8] ; Store R0 to the memory location for "c"mov pc, lr ; Stop the program (return to the OS)a: .word 10 ; Variable "a"b: .word 11 ; Variable "b"c: .word 0 ; Variable "c".endFigure 5: Program add-v2.sIn this program, each variable has a storage location that is one word (4 bytes) in size in the memory. Access to this memory is via the instructions ldr and str, for “load from mem-ory” and “store to memory” respectively. This program employs PC-relative addressing to locate the variables a, b and c at memory locations 12, 12 and 8 bytes away from the current (at that time) location of PC. For example, the instruction “ldr r1, [pc, #12]” states that the value of the first variable a is loaded into register R1 from an address computed by the relation “pc + 12”, that is, 12 bytes away from the value of PC at the time of executing the instruction.Note carefully: In the debugger, the current value of register PC is always shown asthe address of the instruction being executed by the debugger. However, in actualfact, the real value of PC is always 2 instructions (8 bytes) away from the instruction being executed! This is because the ARM processor has an instruction pipeline. Thisis why the program in Figure 5 uses an offset of #12 instead of the more “intuitive”value of #20. See page A2-7 (page 39 of the PDF document) of the ARM ArchitectureReference Manual for more information; you can find this document on your CD-ROM in the reference directory.Task: Try to assemble, link and run the program add-v2.s in Figure 5. In particular, make sure that you inspect the contents of memory between locations 0x801c and 0x8024, using the Memory window in the debugger.Compiler OptimisationIn the first part of this experiment, you compiled add-c.c (in Figure 1) to generate the binary file add-c.elf, using the GNU Compiler optimising option –O2. Compiling this file without the –O2 option would produce code similar in style to add-v2.s in Figure 5. Compile add-c.c again, this time without the –O2 option:arm-elf-gcc -c -mcpu=arm7tdmi -g -Wall -o add-c.o add-c.carm-elf-ld -o add-c.elf add-c.o cstart.oNow, invoke the GNU Debugger to run your program. Make sure that you select SRC+ASM mode. Press the Continue button in the toolbar () to skip the preliminary C start-up code. You can now either step through the C code or through the assembly language code. To step through the C code, press the Step button in the toolbar (); to step through the assembly language version, press the Step Asm Inst button instead ().Don’t worry if you don’t understand the assembly language version of the code: this code is generated using stack allocation; you will learn about stacks in Experiment 3. Even so, it should be clear to you that this non-optimised version of the code (similar to add-v2.s in Figure 5) declares the variables a, b and c in memory.In the optimised version of the compiled code, two C-code instructions (statements) corre-spond to one assembly language instruction. On the other hand, in the non-optimised version of the compiled code, each C statement corresponds to several assembly language instructions.Task 1: Swap Memory ContentsModify the program add-v2.s in Figure 5 to swap the contents of the two memory locations corresponding to the variables a and b. The memory location corresponding to the variable c, however, should still contain the sum of the two variables a and b. Furthermore, the reg-isters R1 and R2 should still remain the same as before. You should call your program swap.s. If you wish to use make, the associated make-file is called swap.make. Show your working program to the Laboratory assessor.Checkpoint 1: ........................................................................... Signature: ............................... LDR Pseudo-InstructionRefer back to Figure 5, to the instruction “ldr r1, [pc, #12]”. In this instruction (which uses PC-relative addressing), the offset 12 was computed by hand to locate the appropriate variable. Unfortunately, this process of hand-computation is very error-prone! Fortunately,ARM assemblers provide pseudo-instructions, along with the use of labels in program code, to make the task easier. Program add-v3.s in Figure 6 uses these pseudo-instructions to access the variables a, b and c in memory:.text ; Executable code follows_start: .global _start ; "_start" is required by the linker.global main ; "main" is our main programb main ; Start running the main programmain: ; Entry to the function "main"ldr r1, a ; R1 = 10 (from "a")ldr r2, b ; R2 = 11 (from "b")add r0, r1, r2 ; R0 = R1 + R2 = 21str r0, c ; Store the result to "c"mov pc, lr ; Stop the program (return to the OS)a: .word 10 ; Variable "a"b: .word 11 ; Variable "b"c: .word 0 ; Variable "c".endFigure 6: Program add-v3.sThe instruction “ldr r1, a”, in add-v3.s above, loads the value stored in the variable a into register R1. The GNU Assembler translates this pseudo-instruction into the ARM instruction “ldr r1, [pc, #12]”: the same instruction used in add-v2.s (in Figure 5).The main limitation of using instructions like “ldr r1, [pc, #12]” is that the offset (the number following the “#”) must be between –212+1 and +212–1, ie, between –4095 and +4095. This limitation also applies to pseudo-instructions of the form “ldr r1, a”, as used above: the label a must be within the legal range, relative to the current value of the PC register.If your variable or label is outside the legal range, you must use a different type of pseudo-instruction: the “ldr =” instruction. This is used in the program add-v4.s in Figure 7:.text ; Executable code follows_start: .global _start ; "_start" is required by the linker.global main ; "main" is our main programb main ; Start running the main programmain: ; Entry to the function "main"ldr r3, =a ; R3 = Address of "a"ldr r1, [r3] ; R1 = 10 (from "a")ldr r3, =b ; R3 = Address of "b"ldr r2, [r3] ; R2 = 11 (from "b")add r0, r1, r2 ; R0 = a + b = 21ldr r3, =c ; R3 = Address of "c"str r0, [r3] ; Store the result to "c"mov pc, lr ; Stop the program (return to the OS)a: .word 10 ; Variable "a"b: .word 11 ; Variable "b"c: .word 0 ; Variable "c".endFigure 7: Program add-v4.sThe instruction “ldr r3, =a”, in add-v4.s above, loads the address of the memory location for variable a into the register R3. The GNU Assembler translates this instruction into the ARM instruction “ldr r3, [pc, #36]”.Please note that “ldr r3, [pc, #36]” only loads the address (and not the value itself) ofthe memory location corresponding to variable a into the register R3. But where does it find the address of a? In other words, how does the GNU Assembler work out that 36 is theright number to use as the PC-relative addressing offset?The answer is that, as well as converting pseudo-instructions to real ARM instructions, the GNU Assembler does another very important task: it computes the addresses of the vari-ables a, b and c and places them in the three words of memory that immediately follow these variables. The offset of 36 bytes from the value of the PC register (remembering that pc = current instruction + 8) represents the memory location that follows the variable c. Once register R3 contains the address of the variable a, the instruction “ldr r1, [r3]”loads the value of a (ie, 10) into register R1.If you compare the code in add-v2.s in Figure 5 and add-v4.s above, you will see that three additional instructions had to be introduced to load the addresses of variables a, b and c into the register R3. Pseudo-instructions like “ldr r3, =a”, although not real ARM instruc-tions, make the task of writing code much simpler. The price you pay, however, is an increase in the size of your code.Note: Instead of using “ldr r3, =a”, you can use the more intuitive pseudo-instruc-tion “adr r3, a”. This instruction loads the address of the variable a into register R3, as before; however, in this case the GNU Assembler does this by translating the instruction to “add r3, pc, #24”. Due to the limitations of the add and sub ARM instructions, the adr pseudo-instruction suffers from a similar problem to ldr without the “=”.A variant of adr that overcomes these limitations is adrl. However, adrl alwaystranslates to two instructions. For example, “adrl r3, a” translates to:add r3, pc, #28nop ; mov r0, r0Task: Assemble, link and run the programs add-v3.s (in Figure 6) and add-v4.s (in Figure 7). If you want to use make, the make-files are add-v3.make and add-v4.make respectively. Make sure that you select SRC+ASM mode in the debugger. Step through the assembly lan-guage code to debug the program. Specifically, using the Memory window, inspect the memory locations 0x8018 to 0x8020 for the program add-v3.s and 0x8024 to 0x8038 for the program add-v4.s, while stepping through your program.Task 2: Register ManipulationWrite a program called reg-manip.s that takes the value in register R0 and puts 2i × R0 into each of the registers R i for 0 ≤i≤ 7. For example, if R0 contains the value 1, then your pro-gram must change the values of registers R0 to R7 to be:R0 = 1R1 = 2R2 = 4R3 = 8R4 = 16R5 = 32R6 = 64R7 = 128Do not set the value of register R0 from inside your program. Instead, just type the desired value into the Registers window in the edit box for r0, then press E NTER. Alternatively, type the debugging command “p $r0 = new_value” (eg, “p $r0 = 1”) in the Console window. You may need to close and reopen the Registers window to see the change.Hint: You might want to first initialise registers R1 to R7 to the appropriate 2i values. Then think of how you could achieve 2i × R0.The ARM processor provides, among others, the following arithmetic instructions:add Rd, Rm, Rs ; Rd := Rm + Rssub Rd, Rm, Rs ; Rd := Rm – Rsmul Rd, Rm, Rs ; Rd := Rm × Rs。