试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx

上传人:scccc 文档编号:13239640 上传时间:2021-12-19 格式:DOCX 页数:12 大小:19.57KB
返回 下载 相关 举报
试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx_第1页
第1页 / 共12页
试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx_第2页
第2页 / 共12页
试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx_第3页
第3页 / 共12页
试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx_第4页
第4页 / 共12页
试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx》由会员分享,可在线阅读,更多相关《试验设备管理信息系统之结束语和程序语言说明重点复习过程.docx(12页珍藏版)》请在三一文库上搜索。

1、题 目实验设备管理信息系统结束语时间如白驹过隙,转瞬即逝,三个月的毕业设计结束了,在这段时间里,我 们没有虚度光阴,相反我们获益匪浅。这是一次难得的练兵机会,像这样系统的, 完整的做一个系统,机会不多,有指导老师从旁指导,更是难得。在做设计的过 程中,我碰到了困难,但没有怨天尤人,更不会放弃,我选择迎难而上。只有不 断的给自己充电,才能战胜困难,不断成长。这段时间学到的东西,记忆相当深 刻,无论是技能上还是思想上,我都学到了很多东西,这是我的一大财富。只要 相信自己,就能成功。期待在将来的路途上,创造更加辉煌的成绩。参考文献1 刘刀桂,孟繁晶.Visual C+ 实践与提高数据库篇M.中国铁道

2、出版社,2003.10-308.2 RobHawthorne.SQL Server 2000 数据库开发从零开始M.人民邮电出版社,2004.2.254-355.3 梁方明.SQL Server2000数据库编程M.北京希望电子社,2005.10.23-318.4 启明.Visual C+ +SQL Server数据库应用系统开发与实例M.人民邮电出 版社,2005.5.105-305. 史济明.软件工程M.高等教育出版社,2004.12.30-235.David M.Dikel.软件体系结构M.高等教育出版社,2004.5.致谢在这个特别的日子里,我首先感谢我们的母校,她为我们提供良好的学习

3、环 境,更为我们做出了拼搏进取的榜样, 我身为学院的学生而骄傲,在以后的人生 旅途上。我要学习母校求实进取。接着,我要感谢我的指导老师,在这段毕业设计的日子里,由于老师的支持 和用心帮助,才能使得我将此系统完成。最后,我也要感谢软件学院为我们提供良好的上机条件及学习的动力。相信我的毕业设计的成功,就是给以学校的回报,因此我将会不懈努力把系统做好, 以表示对学校,学院,老师的感谢!程序设计语言语言是通信系统。程序设计语言由所有允许人机通信的符号、字符以及使用 规则组成。一些程序设计语言的产生是为了服务于特殊的目的(例如控制机器人),而其它一些程序设计语言则是比较灵活的通用工具,可适用于许多类型的

4、 应用。然而, 每一个程序设计语言必须接收确定类型的书写指令以使一个计算 机系统能够完成大量的熟悉的操作。换言之,每一个语言必须具有属于以下为人 们所熟悉范畴的指令:1输入/输出指令。用于I/O设备与中央处理器之间的通信,这些指令提供了将 要完成的输入或输出操作类型的细节以及操作期间将用到的存储器地址。2. 计算指令。用于实现加、减、乘、除的指令,显然,所有程序设计语言均有 此类指令。3. 逻辑/比较指令。这些指令用于转移程序控制,以及编写程序中所用到的选择和循环结构。在处理过程中,两个数据项的比较可能是一个逻辑指令的结果。 正如你了解的那样,程序控制能根据一个选择测试 (如果R>0,那

5、么A,否则B) 的结果来决定其不同的路径,而一个循环可以根据一个出口条件测试的结果(测试Q=-999?)而继续进行或终止。 语言中除了设定测试或比较以实现转移程序控制的指令外,还有一些不依赖比较结果的无条件转移指令。4. 存储/检索和传送指令。这些指令用于处理期间的存储、 检索和传送数据。数 据可以从一个存储地址复制到另一存储地址以及进行必要的检索。 但是,即使所有的程序设计语言都具有一个执行上述这些操作的指令集, 但在机 器语言、汇编语言以及高级语言中所使用的符号、 字符以及语法方面仍有明显的 区别。机器语言计算机的机器语言由二进制数字串组成,并且是唯一能被CPU直接“理解” 的语言。任何机

6、器语言指令至少由两部分组成。第一部分是命令或操作, 它告诉计算机将完成什么功能, 每一台计算机都有一个操作码来完成其功能。 指 令的第二部分是操作数, 它告诉计算机在哪里找到或存储数据以及将要操纵的其 它指令,它们是计算机将要操纵的对象, 一条指令的操作数的数目因计算机不同 而异。在单操作数机器中,指令“ ADD0184”的二进制值将导致地址 0184中的 值加到算术逻辑部件中某一寄存器的值中。在双操作数机器中,“ ADD 0184 8672”的二进制表示将导致地址 8672中的值加到地址 0184的值中。单操作数格 式在最小的微计算机中十分常见,而双操作数结构则多用于大多数其它机器。 按照今

7、天的标准, 早期的计算机实在令人难以容忍, 程序员不得不将大量指令直 接翻译成机器能理解的机器语言的形式。例如,为早期的IBM机器书写指令“ ADD 0184”的程序员将按以下形式书写: 00010000000000000000000000001011100。0 除了必须记住机器指令集中大量命令的数字代码外, 程序员还被迫跟踪数据和指 令的存储器地址分配。最早的编码常常花费几个月时间, 因此非常昂贵且常常 出错。用于发现程序错误的检查指令, 与最初编程时一样冗长, 而且如果一个程 序后来必须进行修改,则要耗费几周时间。汇编语言为了减轻程序员的负担, 50年代初期开发了助记符操作码和符号地址。为

8、 了完善程序准备过程, 首先要做的工作之一是用字母符号 (即助记符 )去替代数字 化的机器语言操作码。 现在,每一个计算机都有一套助记符代码, 当然实际的符 号因机器类型、 型号而异。 计算机仍使用机器语言处理数据, 但汇编语言软件首 先把特定操作码符号翻译成对应的机器语言。这一改进为更进一步的发展奠定了基础。 如果计算机能较容易地将符号翻译成基 本操作,那么它为什么不能也完成其它一些事务性的编码功能, 诸如将存储器地 址赋值成数据呢 ?符号化寻址就是这样一个实践, 它将地址表达为程序员方便使 用的符号而不是按照它的绝对数字地址来表示。 在符号化寻址的初期阶段,程序员将一个符号名和一个真实地址

9、赋给一个数据 项,例如,一个月中某百货商店顾客所购商品的总值由程序员赋值给地址0 0 6 3并赋符号名称TOTAL (总值),同一月中返回的未用商品的总值赋值给地址 2 0 4 7,取名CREDIT (赊欠)。那么,对于程序的剩余部分来说,当要处 理这类数据项时, 程序员将使用其符号名而不是地址来进行操作, 这样,可以写 指令“CREDIT, TOTAL”,从购买总值中减去返回商品的总值, 于是 汇编语言软件可将该符号化指令翻译成机器语言的位串:011111 011111111111 000000111111 助记符操作码 2047 0063(S) (CREDIT) (TOTAL)此后又有了如

10、下的进展: 程序员将分配和跟踪指令地址的任务交由计算机完 成,程序员只要告诉机器第一个程序指令的存储地址号码, 则汇编语言软件就能 自动地从该点开始依程序存放所有其它指令。 因此,如果另一指令需要加到程序 中,那么没有必要修改插入该指令处以后的所有指令地址 (而这一修改在由机器 语言书写的程序中是必须要做的 )。相反,下一次程序执行时处理器将自动调整 存储地址。程序员不再像以前那样将真实地址赋给符号化数据项, 现在他们只需说明他们的 程序所需的第一个地址即可, 而一个汇编语言程序将从这里开始执行, 为指令和 数据分配地址空间。这一汇编语言程序 (或汇编程序 ),还使计算机能将程序员的汇编语言指

11、令翻 译成它自己的机器代码。在汇编语言中由程序员书写的指令程序被称作源程序, 当该源程序由汇编程序转换为机器码后,则被称为目标程序。 汇编语言较之机器语言具有许多优点,它能节省时间,减少细节,较少出错,而 且产生的错误也易于发现。 汇编语言书写的程序较之机器语言程序更易修改, 但 也存在一些局限, 汇编语言的编码 (编程)仍然十分耗时。 汇编语言的一个最大的 缺陷在于它是面向机器的, 即它们是为特定的处理器而设计的, 程序在不同机器 上要重新编码才能执行。高级语言 早期的汇编程序中,一条源程序指令只产生一条机器指令。为了加快编码 速度,开发出了一种汇编程序, 它能将每一源程序指令翻译成一数量可

12、变的机器 语言代码。换句话说,一条宏指令可以产生若干行机器语言代码,例如,程序员 可以写“ READ FILE (读文件),然后翻译软件会自动地提供一系列详尽的预先 准备好的机器语言指令, 它们会将从输入设备读入的数据文件的一个记录拷贝到 主存储器中, 这样程序员就减轻了任务, 而不必为要执行的每一条机器操作书写 指令。助记符技术和宏指令的研制与开发又反过来导致了高级语言的研制与开 发,它们通常面向某类特定的处理问题。 例如,很多高级语言中用于处理具有科 学化数学特征的问题,而其它一些高级语言则强调文件处理的应用。 与汇编语言不同,高级语言程序几乎可以不加修改地用于不同的计算机。这样, 当换用

13、新设备时,重编程的费用可极大地减少。高级语言的其它优点在于:它们比汇编语言更易于学习。它们只需较少时间来书写程序。 它们提供较好的文本。 易于维护。一个熟练的程序员, 书写某种高级语言程序时将不受某一种机器类型的限制PROGRAMMING LANGUAGESA language is a system of communication. A programming language consists of all the symbols, characters, and usage rules that permit people to communicate with computers.

14、Some programming languages are created to serve a special purpose(e.g.,controlling a robot), while others are more flexible general-purpose tools that are suitable for many types of applications. However, every programming language must accept certain types of written instructions that will enable a

15、 computer system to perform a number of familiar operations. That is, every language must have instructions that fall into the following familiar categories:1. Input/output instructions. Required to permit communication betweenI/O devices and the central processor, these instructions provide details

16、 on the type of input or output operation to be performed and the storage locations to be used during the operation.2. Calculation instructions. Instructions to permit addition, subtraction, multiplication, and division during processing are, of course, common in all programming languages.3. Logic/c

17、omparison instruction. These instructions are used to transfer program control, and are needed in the selection and loop structures that are followed to prepare programs. During process ing, two data items maybe compared as a result of the executio n of logic in struct ion.As you know,program con tr

18、ol can follow differe nt paths depe nding on the outcome of a selectio n test(IF R>0 THEN A, ELSE B). And a loop can be contin ued or termin ated depe nding on the outcome of an exit con diti on test(doesQ=-99.9?). In additi on to the in struct ions in Ian guages that set up tests or comparisons

19、to effect the transfer of program control, there are also uncon diti onal tran sfer in structi ons available that are not based on the outcome of comparis ons.4. Storage/retrieval and moveme nt in struct ions. These in structio ns are used to store, retrieve, and move data duri ng process ing. Data

20、may be copied from one storage locati on to ano ther and retrieved as n eeded.But eve n though all program ming Ian guages have an in structi on set that permits these familiar operatio ns to be performed, there's a marked differenee to be found in the symbols, characters, and syntax of machine

21、Ian guages,assemblyIan guages, and high-level la nguages.Mach ine Lan guagesA computer's mach ine Ian guage con sists of stri ngs of binary nu mbersand is the only one the CPU directly "un dersta nds". An in structio n prepared in any machine Ianguage will have at least two parts. The

22、first part is the commanobr operation, and it tells the computer what function to perform. Every computer has an operati on code or "op code" for each of its fun cti ons. Thesec ond part of the in structi on is the opera nd, andit tells the computer where to find or store the data or other

23、 instructions that are to be man ipulated. The nu mber of opera nds in an in struct ion varies among computers. In a sin gle-opera nd mach ine, the binary equivale nt of"ADD0184" could cause the value in address 0184 to be added to the value stored in a register in the arithmetic-logic un

24、it. In a two-opera ndmachi ne, the binary represe ntation for "ADD 0184 8672" could cause thevalue in address 8672 to be added to the nu mber in locati on 0184. Thesin gle-opera nd format is popular in the smallest microcomputers; the two-opera nd structure is likely to be available in mos

25、t other mach in es.By today's sta ndards, early computers were in tolera nt. Programmers hadto tran slate in structi ons directly into the machi ne-la nguage form that computers un derstood. For example, the programmer writi ng the in struct ion to "ADD 0184" for an early IBM machi ne

26、would have writte n: 000100000000000000000000000010111000In additi on to rememberi ng the doze ns of code nu mbers for thecomma nds in the machi ne's in structi on set, a programmer was also forcedto keep track of the storage locati ons of data and in structi ons. Thein itial cod ing ofte n took

27、 mon ths, was therefore quite expe nsive, and ofte n resulted in error. Check ing in structio ns to locate errors was about as tedious as writ ing them in itially. And if a program had to be modified at a later date, the work invo Ived could take weeks to fin ish.Assembly Lan guagesTo ease the progr

28、ammer's burde n, mnemonic operati on codes andsymbolic addresses were developed in the early 1950s. One of the first steps in impro ving the program preparati on process was to substitute letter symbols mn emo nics- for the nu meric machi ne Ian guage operati oncodes. Each computer now has a mne

29、monic code, although, of course, the actual symbols vary amongmakesand models. Machine Ianguage is still used by the computer as it processes data, but assemblyIan guagesoftware first translates the specified operation code symbol into its machine-language equivalent.And this improvement sets the st

30、age for further advances. If the computer could translate convenient symbols into basic operations, why couldn't it also perform other clerical coding functions such as assigning storage addresses to data? Symbolic addressing is the practice of expressing an address not in terms of its absolute

31、numerical location, but rather in terms of symbols convenient to the programmer.In the early stages of symbolic addressing, the programmer assigned a symbolic nameand an actual address to a data item. For example, the total value of merchandise purchased during a month by a department store customer

32、 might be assigned to address 0063 by the programmer and given the symbolic name TOTAL. The value of merchandise returned unused during the month might be assigned to address 2047 and given the symbolic nameCREDIT. Then, for the remainder of the program, the programmer would refer to the symbolicnam

33、es rather than to the addresses when such itemswere to be processed. Thus, an instruction might be written "S CREDIT,TOTAL" to subtract the value of returned goods from the total amount purchased.The assembly language software might then translate the symbolic instruction into this machine

34、-language string of bits: 011111 011111111111 000000111111 Mnemonic op code 2047 0063(s) (CREDIT) (TOTAL)Another improvement followed. The programmer turned the task of assigning and keeping track of instruction addresses over to the computerDBg1(6)db0. The programmer merely told the machine the sto

35、rage address number of the first program instruction, and the assembly language software then automatically stored all others in sequence from that point. So if ano ther in struct ion was added to the program later, it was not n ecessary to modify the addresses of all in structio ns that followed th

36、e point of in serti on (as would have to be done in the case of programs writte n in mach ine Ian guage). I nstead, the processor automatically adjusted storage locati ons the n ext time the program ran.Programmers no Ion ger assig n actual address nu mbers to symbolic data items as they did earlier

37、. Now they merely specify where they want the first locati on in the program to be, and an assembly Ian guage program takes it from there, allocati ng locati ons for in structio ns and data.This assembly program, or assembler, also en ables the computer to convert the programmer's assembly Ian g

38、uage in structi ons into its own mach ine code. A program of in structi ons writte n by a programmer in an assembly Ian guage is called a source program. After this source program has bee n con verted into machi ne code by an assembler, it's referred to as an object program.Assembly Ian guages h

39、ave adva ntages over machi ne Ian guages. Theysave time and reduce detail. Fewer errors are made, and those that are made are easier to find. And assembly programs are easier for people to modify than machine-language programs. But there are limitations. Coding in assembly Ian guage is still time co

40、nsuming. And a big drawback of assembly Ian guages is that they are machi ne orie nted. That is, they are designed for the specific makeand model of processor being used. Programs might have to be recoded for a differe nt mach ine.High-LevelLan guagesThe earlier assembly programs produced only one m

41、achine instruction for each source program in struct ion.To speed up codi ng, assembly programswere developed that could produce a variable amount of mach in e-la nguage code for each source program instruction. In other words, a single macro instruction might produce several lines of machine-langua

42、ge code. For example, the programmer might write "READ FILE," and the translating software might then automatically provide a detailed series of previously prepared machine-language instructions which would copy a record into primary storage from the file of data being read by the input de

43、vice. Thus, the programmer was relieved of the task of writing an instruction for every machine operation performed.The development of mnemonictechniques and macro instructions led, in turn, to the development of high-level languages that are often oriented toward a particular class of processing pr

44、oblems. For example, a number of languages have been designed to process problems of a scientific-mathematic nature, and other languages have appeared that emphasize file processing applications.Unlike assembly programs, high-level language programs maybe used with different makes of computers with

45、little modification. Thus, reprogramming expense may be greatly reduced when new equipment is acquired. Other advantages of high-level languages are: .They are easier to learn than assembly languages.They require less time to write.They provide better documentation.They are easier to maintain.A programmer skilled in writing programs in such a language is not restricted to using a single type of machine.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1