Computer Languages
-
A computer must be given instructions in a language that it understands, that is, a particular pattern of binary digital information.
-
必须以计算机能够懂得的语言形式赋予其指令,这种指令就是一种特殊的二进制数字信息模式。
-
On the earliest computers, programming was a difficult, laborious task, because vacuum-tube ON-OFF switches had to be set by hand.
-
在最早的计算机中,编程是一项困难和费力的劳动,因为真空管的开关必须是手动的。
-
Teams of programmers often took days to program simple tasks such as sorting a list of names.
-
一组组的程序员常常要花数天时间给简单的任务如把名单分类编制程序。
-
Since that time a number of computer languages have been devised, some with particular kinds of functioning in mind and others aimed more at ease of use - the-user-friendly-approach.
-
自从那时起,已编制了许多计算机语言,有些语言在编制时使其具有某些特殊功能,另一些使其达到使用更容易的目的——用户友好方法。
Machine Language
-
Unfortunately, the computer's own binary-based language, or machine language, is difficult for humans to use.
-
不幸的是,人们很难使用计算机本身的二进制语言,或者叫机器语言。
-
The programmer must input every command and all data in binary form, and a basic operation such as comparing the contents of a register to the data in a memory-chip location might look like this: 11001010 00010111 11110101 00101011.
-
程序员必须以二进制的形式输入每条指令和所有数据,像把一个寄存器中的内容与存储芯片单元里的数据进行比较,这样一个基本的操作也许看起来像这样:11001010 00010111 11110101 00101011。
-
Machine-language programming is such a tedious, time-consuming, task that the time saved in running the program rarely justifies the days or weeks needed to write the program.
-
机器语言的编程乏味费时以至于在运行程序中节省的时间还没有编程序需用的时间多。
Assembly Language
-
One method programmers devised to shorten and simplify the process is called assembly-language-programming.
-
程序员设计的一种缩短和简化编程过程的方法被称作为汇编语言编程。
-
By assigning a short (usually three-letter) mnemonic code to each machine-language command, assembly-language programs could be written and - debugged - cleaned of logic and date errors - in a fraction of the time needed by machine-language programmers.
-
通过给每一个机器语言命令指定一个短的(通常三个字母)记忆码,汇编语言程序的编写与调试仅为机器语言程序所用时间的一小部分。
-
In assembly language, each mnemonic command and its symbolic operands equals one machine instruction.
-
在汇编语言里,每一个记忆命令和它的符号操作数相当于一个机器指令,
-
An-assembler-program translates the mnemonic-opcodes (operation codes) and symbolic operands into binary language and executes the program.
-
一个汇编语言程序把记忆操作码和符号操作数翻译成二进制语言执行程序。
-
Assembly language is a type of low-level computer programming language in which each statement corresponds directly to a single machine instruction.
-
汇编语言是一种低级计算机编程语言,每个语句直接对应一条机器指令。
-
Assembly languages are thus specific to a given processor.
-
因此,每种处理器都有自己的汇编语言。
-
After writing an assembly language program, the programmer must use the assembler language into machine code.
-
汇编语言写好后,程序员必须把它汇编成机器码。
-
Assembly language provides precise control of the computer, but assembly language programs written for one type of computer must be rewritten to operate on another type.
-
汇编语言精确地控制着计算机的操作,但是,为一种计算机写的汇编语言在另一种计算机上运行时必须重写。
-
Assembly language might be used instead of a high-level language for any of three major reasons: speed, control, and preference.
-
由与速度、控制和偏好三个原因之一,汇编语言或许可以用来代替高级语言。
-
Programs written in assembly language usually run faster than those generated by a compiler; use of assembly lets a programmer interact directly with the hardware (processor, memory, display, and input/output ports).
-
用汇编语言写的程序通常比编译器所写的程序运行的快,汇编语言可以使程序员直接与硬件(处理器、内存、显示和输入输出端)交互。
-
Assembly language, however, can be used only with one type of CPU chip or microprocessor.
-
但是,一种汇编语言只能适用于一种CPU芯片或微处理器,
-
Programmers who expended much time and effort to learn how to program one computer had to learn a new programming style each time they worked on another machine.
-
在一种机型上花了很多时间和精力学习编程的程序员在另一种机型上工作时,还必须重新学习。
-
What was needed was a shorthand method by which one symbolic statement could represent a sequence of many machine-language instructions, and a way that would allow the same program to run on several types of machines.
-
程序员需要的是一种快速编程法,借助这种方法一个符号语句能够代表一系列机器语言指令。一个程序能在多种机器上运行,
-
These needs led to the development of so called high-level languages.
-
这种需求导致了高级语言的研制。
High-level languages
-
High-level languages often use English-like words - for example, LIST, PRINT, OPEN, and so on-as commands that might stand for a sequence of tens or hundreds of machine-language instructions.
-
高级语言常常将英语的词汇用作命令,例如LIST、PRINT、OPEN等等,这些命令可以代表数十或者数百条机器指令,
-
The commands are entered from the keyboard or from a program in memory or in a storage device, and they are interpreted by a program that translates them into machine-language instructions.
-
这些命令可以由键盘输入或者通过内存里或存储装置里的程序输入,并由一个程序把这些命令翻译成机器指令。
-
Translator programs are of two kinds: interpreters and compilers.
-
翻译程序有两种:解释程序和编译程序。
-
With an interpreter programs that-loop-back to re-execute part of their instructions reinterpret the same instructions each time it appears, so interpreted programs run much more slowly than machine-language programs.
-
用解释器时,程序能够重复执行指令,重新解释每次出现的同样指令,所以解释程序比机器语言程序慢得多。
-
Compilers, by contrast, translate an entire program into machine language prior to execution, so such programs run as rapidly as though they were written directly machine language.
-
对比之下,编译程序在执行前,把整个程序翻译成机器语言,所以这样的程序就像机器语言程序一样快。
-
American computer scientist Grace Hopper is credited with implementing the first commercially-oriented computer language.
-
美国计算机科学家格雷丝·豪颇被誉为第一个实现了以商业为主的计算机语言,
标签:computer,计算机,language,汇编语言,machine,program,机器语言,语言 From: https://www.cnblogs.com/linshaoblog/p/16787272.html