Студопедия

Главная страница Случайная страница

Разделы сайта

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника






Pronounce the following words correctly






wish [wi ƒ ] v – хотеть, желать

spectrum ['spektrə m] n – спектр

mnemonic [ni(:)'monik] а – мнемонический

bottom ['botə m] n – низ; дно

autocode ['o: to(u)koud] n – автокод

immediately [i'mi: djə tli] adv – немедленно

obey [ə 'bei] v – повиноваться; подчиняться

adopt [ə 'dopt] v – принимать; перенимать

repertoire ['repə twa: ] n – набор; состав; система команд; репертуар

alphanumeric [, æ lfə nju: 'merik] a – буквенно-цифровой

assembler [ə 'semblə ] n – программа «Ассемблер»

source [so: s] n – источник; исток; а – исходный

specify ['spesifai] v – точно определять; устанавливать

distinguish [dis'tiη gwi ƒ ] v – различать

relative ['relə tiv] a – относительный

offset ['o(:)fsə t] n – смещение; сдвиг

distinction [dis'tiη (k) ƒ (ə)n] n – различие; распознавание

therefore ['ð ε ə fo: ] adv – поэтому

existence [ig'zist(ə)ns] n – существование

note [nout] v – замечать; отмечать; упоминать

assembly language [ə 'sembli 'læ η gwidʒ ] – язык ассемблера

disadvantage [, disə d'va: ntidʒ ] n – недостаток

shift [ ƒ ift] n – сдвиг; смещение; v смещать

3. Memorize the following word combinations:

machine-dependent – машинозависимый

low level languages – языки низкого уровня

an absolute address – абсолютный адрес

a source program – исходная программа

an object program – конечная программа

pseudo-op (operation) – псевдокоманда

machine-op (operation) – машинная команда

relative addresses – относительные адреса

TEXT A

 

LOW LEVEL PROGRAMMING LANGUAGES: MACHINE AND ASSEMBLY LANGUAGES

 

1. In order to communicate with each other, men use languages. In the same way, 'languages' of one sort or another are used in order to communicate instructions or commands to a computer.

2. When the user wishes to communicate with the computer, he uses a spectrum of languages:

English Best for programmer

FORTRAN

ALGOL

Assembly language

Mnemonic machine language

Machine language Best for machine

 

Let us discuss the three lowest members of this spectrum beginning with the first three from the bottom: machine language, mnemonic machine language, and assembly language.

3. A machine language which is sometimes called as a basic programming language or autocode refers to instructions written in a machine code. This machine code can be immediately obeyed by a computer without translation. The machine code is the coding system adopted in the design of a computer to represent the instruction repertoire of the computer. The actual machine language is generated by software, not a programmer. The programmer writes in a programming language which is translated into the machine language.

4. A mnemonic machine language uses symbolic names for each part of instruction that is easier for the programmer to remember than the numeric code for the machine. A mnemonic is an alphanumeric name, usually beginning with a letter rather than a number to refer to fields, files, and subroutines in a program. For example, the operation 'multiplication' might be represented as MULT, the 'load' instruction as L, or DISPL NAME ADDR in the mnemonic form means 'display name and address', etc.

5. An assembly language is the most machine-dependent language used by programmers today. There are four advantages to using an assembly language rather than machine language. They are the following: 1) it is mnemonic, e.g., we write ST instead of the bit configuration 0101 0000 for the STORE instruction; 2) addresses are symbolic, not absolute as in a machine language; 3) reading is easier; 4) introduction of data to a program is easier.

6. A disadvantage of assembly language is that it requires the use of an assembler to translate a source program into object code (program) in order to be directly understood by the computer. The program written in assembly language is called an assembler. The assembler usually uses such instructions as A (ADD), L (LOAD), ST (STORE), START, TEST, BEGIN, USING, BALR (Branch and Link Register), DC (Define Constant), DS (Define Storage), END, etc. Let us consider some of them.

7. The USING instruction is a pseudo-op. A pseudo-op is an assembly language instruction that specifies an operation of the assembler; it is distinguished from a machine-op which represents to the assembler a machine instruction. So, USING indicates to the assembler which general register to use as a base and what its contents will be. This is necessary because no special registers are set aside for addressing, thus the programmer must inform the assembler which register(s), to use and how to use them. Since addresses are relative, he can indicate to the assembler the address contained to the base register. The assembler is thus able to produce the machine code with the correct base register and offset.

8. BALR is an instruction to the computer to load a register with the next address and branch to the address in the second field. It is important to see the distinction between the BALR which loads the base register, and the USING which informs the assembler what is in the base register. Hence, USING only provides information to the assembler, but does not load the register. Therefore, if the register does not contain the address that the USING says it should contain, a program error may result.

9. Start is a pseudo-op that tells the assembler where the beginning of the program is and allows the user to give a name to the program, e.g., it may be the name TEST. END is a pseudo-op that tells the assembler that the last card of the program has been reached.

10. Note that in the assembler instead of addresses in the operand fields of the instruction there are symbolic names. The main reason for assemblers coming into existence was to shift the burden of calculating specific addresses from the programmer to the computer.

Notes:

e.g. = for example (for instance) – например

burden – нагрузка; тяжесть

 






© 2023 :: MyLektsii.ru :: Мои Лекции
Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав.
Копирование текстов разрешено только с указанием индексируемой ссылки на источник.