Computer Science An Overview _J. Glenn Brookshear _11th Edition

Chapter 6 Programming Languages

As suggested in Section 6.1, high-level programming languages allow locations in main memory to be referenced by descriptive names rather than by numeric addresses. Such a name is known as a variable, in recognition of the fact that by changing the value stored at the location, the value associated with the name changes as the program executes.

--

Early Generations

As we learned in Chapter 2, programs for modern computers consist of sequences of instructions that are encoded as numeric digits. Such an encoding system is known as a machine language. Unfortunately, writing programs in a machine language is a tedious task that often leads to errors that must be located and corrected (a process known as debugging) before the job is finished.

In the 1940s, researchers simplified the programming process by developing notational systems by which instructions could be represented in mnemonic rather than numeric form.

For example, the instruction

Move the contents of register 5 to register 6

would be expressed as

4056

using the machine language introduced in Chapter 2, whereas in a mnemonic system it might appear as

MOV R5, R6.

As a more extensive example, the machine language routine

156C

166D

5056

306E

C000

which adds the contents of memory cells 6C and 6D and stores the result at location 6E (Figure 2.7 of Chapter 2) might be expressed as

LD R5,Price

LD R6,ShippingCharge

ADDI R0,R5 R6

ST R0,TotalCost

HLT

using mnemonics. (Here we have used LD, ADDI, ST, and HLT to represent load, add, store, and halt. Moreover, we have used the descriptive names Price, ShippingCharge, and TotalCost to refer to the memory cells at locations 6C, 6D, and 6E, respectively. Such descriptive names are often called identifiers.)

Once such a mnemonic system was established, programs called assemblers were developed to convert mnemonic expressions into machine language instructions. Thus, rather than being forced to develop a program directly in machine language, a human could develop a program in mnemonic form and then have it converted into machine language by means of an assembler.

A mnemonic system for representing programs is collectively called an assembly language. At the time assembly languages were first developed, they represented a giant step forward in the search for better programming techniques. In fact, assembly languages were so revolutionary that they became known as second-generation languages, the first generation being the machine languages themselves.

--programming languages - assembly language - identifiers -  mnemonic -

locations in main memory to be referenced by descriptive names rather than by numeric addresses的更多相关文章

  1. he time that it takes to bring a block from disk into main memory

    DATABASE SYSTEM CONCEPTS, SIXTH EDITION There is a trade-off that the system designer must make betw ...

  2. Main Memory Object-Relational Database Management System

    Main Memory Object-Relational Database Management System FastDBMain Memory Relational Database Manag ...

  3. Power Management of Hybrid DRAM/PRAM-Based Main Memory

    0.ABSTRACT (1)non-volatile memory——low standby power DRAM——high performance and better active power ...

  4. Types of Computer Systems

    Types of Computer Systems Para 1 You should be familiar with the differences among computer systems ...

  5. Custom Settings.in 配置信息收集

    [Settings] Priority=Default Properties=MyCustomProperty [Default] ;是否允许部署操作系统到目标计算机 OSInstall=YES ;是 ...

  6. Method and apparatus for providing total and partial store ordering for a memory in multi-processor system

    An improved memory model and implementation is disclosed. The memory model includes a Total Store Or ...

  7. Memory Allocation with COBOL

    Generally, the use of a table/array (Static Memory) is most common in COBOL modules in an applicatio ...

  8. C++ TUTORIAL - MEMORY ALLOCATION - 2016

    http://www.bogotobogo.com/cplusplus/memoryallocation.php Variables and Memory Variables represent st ...

  9. Partitioned Replacement for Cache Memory

    In a particular embodiment, a circuit device includes a translation look-aside buffer (TLB) configur ...

随机推荐

  1. 区间dp总结

    poj 1141 Brackets Sequence 基础的区间dp题,注意dp边缘的初始化,以及递归过程中的边界 poj 2955 Brackets 依旧注意初始化,水题 hdu 4745 Two ...

  2. Android 返回键双击退出程序

    /** * 菜单.返回键响应 */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == K ...

  3. http://blog.csdn.net/shangboerds/article/details/44175667

    http://blog.csdn.net/shangboerds/article/details/44175667

  4. Mesh系列文章 - 自定义Mesh

    就是在做项目的过程中,有用到三角形的,今天就写一下如何自定义三角形? 先截个图,让大家有个感性认识! //引用 using UnityEngine;        using System.Colle ...

  5. partial(C# 参考)

    分部类型定义允许将类.结构或接口的定义拆分到多个文件中. 在 File1.cs 中:     namespace PC { partial class A { } } 在 File2.cs 中:   ...

  6. ural 1272. Non-Yekaterinburg Subway

    1272. Non-Yekaterinburg Subway Time limit: 1.0 secondMemory limit: 64 MB A little town started to co ...

  7. BZOJ4361 : isn

    设$f[i]$表示长度为$i$的不下降子序列的个数. 考虑容斥,对于长度为$i$的子序列,如果操作不合法,那么之前一定是一个长度为$i+1$的子序列,所以答案$=\sum_{i=1}^n(f[i]\t ...

  8. BZOJ3828 : [Poi2014]Criminals

    对于每个位置求出L[i]表示左边最大的j,满足从j开始到i-1中存在第一个子序列 R[i]表示右边最小的j,满足从j开始到i-1中存在第二个子序列 然后枚举颜色是相遇点的位置,如果L[i]左边.R[i ...

  9. Codeforces Round #213 (Div. 2) A. Good Number

    #include <iostream> #include <vector> using namespace std; int main(){ ; cin >> n ...

  10. TYVJ P1053 字符串的展开 Label:字符 水

    背景 NOIP2007年提高组第2道 描述 在初赛普及组的“阅读程序写结果”的问题中,我们曾给出一个字符串展开的例子:如果在输入的字符串中,含有类似于“d-h”或“4-8”的子串,我们就把它当作一种简 ...