Студопедия

КАТЕГОРИИ:

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



End begin ;The end of the text with an entry point




Читайте также:
  1. A point in time.
  2. AN EVENING AT FOUR WINDS POINT
  3. At that point
  4. B) Make up dialogues discussing the points above.
  5. Donnez votre avis sur les points suivants.
  6. EAST APPOINTMENT GATE, 4:30 P.M. COME ALONE. 1 страница
  7. EAST APPOINTMENT GATE, 4:30 P.M. COME ALONE. 2 страница
  8. EAST APPOINTMENT GATE, 4:30 P.M. COME ALONE. 3 страница
  9. EAST APPOINTMENT GATE, 4:30 P.M. COME ALONE. 4 страница
  10. EAST APPOINTMENT GATE, 4:30 P.M. COME ALONE. 5 страница

It should be noticed, that:

- the text may be inputted as by capital, so by small letters, as the translator perceives them as the same:

- every sentence can occupy only one string(line) of the text;

- comments are separated from sentences by “;”;

There are three segments described by the program: instructions segment with a name code; data segment with a name data and segment of a stack with a name stk. Description of any segment begins with a key word(directive) segment, anticipated by an arbitrary name, and completed by the key word(directive) ends, it is also necessary to point out its name before these key words(it is important for the translator). Segments names can be chosen arbitrarily . The order of segments description is not of great importance (as a rule), but sometimes the order may eliminate possible inadequate interpretation of instructions, which refer to data which have not been described yet .But the chosen here order is preferable for the debugging process. It is important to remember, that in RAM these segments will be located in the order, which coincides with the order of the segments description in the given program.

Text of any program is completed by a directive end, before which the entry point (in our program the entry point is begin) must be pointed .

One more directive is used in this program:

assume CS:code,DS:data

The correspondence of the instructions segment code to the segment register CS and of the data segment to the segment register DS is established here. The first announcement says that this segment is a segment of instructions, and all labels belong to this segment, it helps the assembler (translator) correctly interpret jumps instructions. The second announcement helps the assembler correctly process sentences, in which calls to the data fields take place. There are two segment registers in the microprocessor (DS and ES), and we may use any of them for an access to the memory. It is obvious, that processor must “know” in which of these registers is located the segment address of the instruction to be executed (instructions of access to the memory through registers DS and ES are coded differently). By the way, it doesn’t follow from here, that at the moment of the instruction execution the DS register will contain the segment address of the required segment. The directive assume influences only on the type of instructions coding but it doesn’t influence on the contents of segment registers. That is why any program must be started by sentences, in which the segment address of that segment, where the data is contained is inputted into the segment register (as a rule, it is the register DS). In the considered program it is realized with help of two instructions:




Дата добавления: 2015-09-14; просмотров: 8; Нарушение авторских прав







lektsii.com - Лекции.Ком - 2014-2021 год. (0.023 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты