SU519715A1 - Device for processing expressions of programming languages - Google Patents

Device for processing expressions of programming languages

Info

Publication number
SU519715A1
SU519715A1 SU1995907A SU1995907A SU519715A1 SU 519715 A1 SU519715 A1 SU 519715A1 SU 1995907 A SU1995907 A SU 1995907A SU 1995907 A SU1995907 A SU 1995907A SU 519715 A1 SU519715 A1 SU 519715A1
Authority
SU
USSR - Soviet Union
Prior art keywords
control
output
input
operand
register
Prior art date
Application number
SU1995907A
Other languages
Russian (ru)
Inventor
Георгий Максимович Адельсон-Вельский
Владимир Львович Арлазаров
Рубен Эзрасович Асратян
Альберт Федорович Волков
Валерий Николаевич Деза
Ефим Абрамович Диниц
Наталья Витальевна Дагурова
Николай Евгеньевич Емельянов
Наталья Георгиевна Зенкина
Виктор Тихонович Лысиков
Игорь Александрович Фараджев
Original Assignee
Ордена Ленина Институт Проблем Управления
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ордена Ленина Институт Проблем Управления filed Critical Ордена Ленина Институт Проблем Управления
Priority to SU1995907A priority Critical patent/SU519715A1/en
Application granted granted Critical
Publication of SU519715A1 publication Critical patent/SU519715A1/en

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

лов 5, индикатор нул  6, блок стековой пам тн управл ющих символов 7, счетчик операндов 8, индикатор нул  9, блок стековой пам ти операндов 10, первый регистр операнда 11, второй регистр операнда 12, триггеры зан тести 13, 14, арифметический блок 15, счетчик индексных позиций 16, регистр номера массива 17, информационные вход 18 и выход 19 устройства, управл ющие выход 20 и вход 21 устройства. Устройство работает следующим образом. Адресаци  главной пам ти (на чертеже не показана) производитс  по математическим адресам. Математический адрес состоит из помера массива и номера элемента в массиве. В каждый момент дл  непосредственной адресации доступны лишь 32 массива, которым присваиваютс  номера от О до 31. Дл  каждого массива существует паспорт, в котором содержитс  информаци  о месте расположени  массива, его длине, номере «текущего элемента и т. д. Функции хранени  паспортов и преобразовани  математического адреса в физический возложены на пам ть. Элементами массивов могут быть операнды с фиксированной зап той (одно слово) и oneранды с плавающей зап той (два слова). Тип элемента записан или в паспорте массива или в первом разр де самого элемента. Устройство работает как с одномерными, так и многомерными массивами. Многомерные массивы обычным образом развертываютс  в одномериые . В паспорте многомерного массива содержитс  информаци  о размерах массива по всем измерени м. Размер массива по соответствующему измерению определ етс  путем обращени  к пам ти по номеру массива и номеру измерени . Главна  пам ть (на чертеже не показана) содержит высокоскоростную часть из 32 регистров , в которых хранитс  наиболее часто используема  информаци . Адресаци  высокоскоростной части проводитс  по номерам регистров . Основой  зыка  вл ютс  элементарные записи . Всего существует восемь видов элементарных записей. Номер вида записан в трех первых разр дах каждой записи. Каждый вид представл ет собой или непосредственный операнд, или управл ющий символ, или адрес. Форматы видов элементарных записей и их функциональное назначение рассмотрены ниже . Вид О - первые три разр да содержат код 000, следующие 5 разр дов - код номера регистра . Адресуетс  один из 32 регистров высокоскоростной части главной пам ти. Вид I - три разр да - код 001, п ть разр дов - код номер массива, двадцать четыре разр да - код номера элемента. Задает адрес элемента массива.. Вид II - три разр да - код 010, тринадцать разр дов - операнд. Задает непосредственный операнд. Вид III -три разр да -011, тринадцать разр дов - номер элемента. Обращение к массиву № 0. Сообщаетс  номер элемента массива. Вид IV - три разр да-100, п ть разр дов - номер массива. Адресуетс  текущий элемент массива. Вид V - три разр да-101, п ть разр дов - номер массива. Этот вид эквивалентен паре знаков АЛГОЛ а: М , т. е. указывает номер массива и одновременно служит левой границей индексного выражени . Вид VI-три разр да -110, п ть разр дов - номер регистра. Этот вид осуществл ет индексацию при обращении к массиву № О, т. е. эквивалентен следующей последовательности знаков АЛГОЛа: М R (М - идентификатор нулевого массива, - регистра). За этим элементом следует продолжение ин дексного выражени  Вид VII - три разр да - 1П, п ть разр дов - управл ющий символ. Этот вид обозначает управл ющие символы. Основными конструкци ми  зыка  вл ютс  арифметическое и логическое выражени . Их синтаксис подобен синтаксису аналогичных конструкций в  зыке АЛГОЛ, одиночные переменные изображаютс  с помощью видов О, 1, Ш и IV, переменные с индексами с помощью видов VI и V, а знаки онераций с помощью вида VII. Вместо символа « используетс  символ «). Кроме того, отсутствует аппарат обращени  к процедурам - функци м (его лишь до некоторой степени может заменить операци  call-переход с возвратом). Обща  структура программы на  зыке формул описываетс  следующим образом: программа : : (оператор) оператор : : арифметическое выражение (логическое выражение) присваивание (цикл) оператор, оператор. Оператор «цикл имеет следующий вид: do оператор while логическое выражение. Впутренний оператор выполн етс  до тех пор, пока выполн етс  условие, представленное логическим выражением. Оператор «присваивание имеет такой же вид, как аналогичный оператор в АЛ ГОЛ е. Условный переход: if логическое выражение, программный адрес . Если логическое выражение равно false, то происходит переход по программному адресу (программный адрес не  вл етс  видом и никак не помечаетс , состоит из номера массива и номера байта). Безусловный переход: go to программный адрес. Переход с возвратом: call программный адрес . Эта операци  запоминает адрес возврата и осуществл ет переход по программному адресу . Возврат вызываетс  операцией ret.5, indicator zero 6, block of stack memory of control characters 7, counter of operands 8, indicator zero 9, block of stack memory of operands 10, first register of operand 11, second register of operand 12, triggers of test 13, 14, arithmetic block 15, the index position counter 16, the array number register 17, the information input 18 and the output 19 of the device, controlling the output 20 and the input 21 of the device. The device works as follows. The addressing of the main memory (not shown in the drawing) is made to mathematical addresses. A mathematical address consists of an array array and an element number in the array. At each time, only 32 arrays are available for direct addressing, which are assigned numbers from 0 to 31. For each array there is a passport containing information about the location of the array, its length, the number of the current element, etc. The functions of storing passports and math to physical address mapping is entrusted to the memory. The elements of the arrays can be operands with a fixed comma (one word) and two handrafts with a floating comma (two words). The type of the element is recorded either in the passport of the array or in the first category of the element itself. The device works with both one-dimensional and multi-dimensional arrays. Multidimensional arrays are normally expanded into one-dimensional. The passport of the multidimensional array contains information on the size of the array for all dimensions. The size of the array for the corresponding dimension is determined by referring to the memory by the array number and the dimension number. The main memory (not shown) contains a high-speed portion of 32 registers in which the most frequently used information is stored. The addressing of the high-speed part is carried out by register numbers. The basis of the language is elementary records. There are eight kinds of elementary records. The view number is recorded in the first three bits of each record. Each view is either an immediate operand, or a control character, or address. The formats of the types of elementary records and their functional purpose are discussed below. Type O - the first three bits contain the code 000, the next 5 bits - the register number code. One of the 32 high-speed part registers of the main memory is addressed. Type I - three bits - code 001, five bits - code number of the array, twenty four bits - code of the element number. Sets the address of the array element. View II - three bits - code 010, thirteen bits - operand. Specifies the immediate operand. Type III - three bits -011, thirteen bits - the number of the element. Appeal to array number 0. The number of the array element is reported. Type IV - three bits-100, five bits - the number of the array. The current array element is addressed. Type V - three bits D-101, five bits - the number of the array. This type is equivalent to a pair of characters ALGOL a: M, i.e. it indicates the number of the array and at the same time serves as the left border of the index expression. Type VI — three bits -110; five bits — register number. This view performs indexing when referring to the array No. 0, i.e., is equivalent to the following sequence of ALGOL characters: M R (M is the identifier of the zero array, is a register). This element is followed by the continuation of the index expression. Type VII - three bits - 1H, five bits - a control character. This view denotes control characters. The basic constructs of the language are arithmetic and logical expressions. Their syntax is similar to the syntax of similar constructions in the ALGOL language, single variables are represented using the types O, 1, III and IV, variables with indices using types VI and V, and signs of the iterations using type VII. Instead of the symbol "the symbol is used". In addition, there is no apparatus for addressing procedures — functions (it can only be replaced to some extent by a return transition operation). The general structure of a program in the formulas language is described as follows: program:: (operator) operator:: arithmetic expression (logical expression) assignment (cycle) operator, operator. The “loop” operator has the following form: do statement is a while boolean expression. The inner statement is executed as long as the condition represented by the logical expression is met. The assignment operator has the same form as the analogous operator in AL GOL e. Conditional transition: if a logical expression, program address. If the logical expression is false, then a transition occurs to the program address (the program address is not a form and is not flagged in any way; it consists of an array number and a byte number). Unconditional transition: go to program address. Migration with return: call program address. This operation remembers the return address and navigates to the program address. The return is caused by the operation ret.

Блок чтени  программы I осуществл ет последовательное чтение программы на  зыке формул из главной пам ти (на чертеже не показана ). Очередной байт программы поступает на выход блока чтени  программы 1. Три первых разр да очередного байта поступают в блок управлени  3 и по ним определ етс  вид каждой новой элементарной записи. В зависимости от вида элементарной записи производ тс  следующие операции.The program reading unit I sequentially reads the program in the language of formulas from the main memory (not shown in the drawing). The next program byte arrives at the output of the program 1 reading unit. The first three bits of the next byte go to the control unit 3 and from them the type of each new elementary record is determined. Depending on the type of elementary recording, the following operations are performed.

Если элементарна  запись  вл етс  непосредственным операндом (вид II) или адресом (виды О, I, П1), то она посылаетс  в блок формировани  адресов и операндов 2, где операнды и адреса привод тс  к соответствующему формату (см. ниже).If the elementary entry is a direct operand (type II) or an address (types O, I, P1), then it is sent to the address and operand 2 generation unit, where the operands and addresses are converted to the appropriate format (see below).

Сформированный операнд или адрес пересылаютс  во второй регистр операнда 12.The generated operand or address is transferred to the second register of operand 12.

В случае элементарной записи вида IV (обращение к текущему элементу массива) номер адресуемого массива посылаетс  в регистр номера массива 17. Далее производитс  обращение к паспорту массива за адресом текущего элемента массива. Прочитанный адрес вместе с номером массива посылаютс  во второй регистр операнда 12.In the case of an elementary record of the type IV (access to the current array element), the number of the addressed array is sent to register number of the array 17. Next, the array passport is called for the address of the current array element. The read address along with the array number is sent to the second register of operand 12.

В случае элементарной записи вида V номер адресуемого массива посылаетс  в регистр номера массива 17, причем содержимое этого регистра и счетчика индексных позиций 16 засылаетс  -в блок стековой пам ти управл ющих символов 7. После этого в блок стековой пам ти управл ющих символов из блока управлени  заноситс  управл ющий символ и счетчик индексных позиций 16 обнул етс . In the case of an elementary record of the type V, the number of the addressed array is sent to the register number of the array 17, and the contents of this register and the index position counter 16 are sent to the stack of control characters 7. Then the stack of memory of control characters from the control block the control symbol and index position counter 16 are reset to zero.

В случае элементарной записи вида VI производитс  то же, что и в предыдущем случае, но в регистр номера массива 17 заноситс  нулевое значение. После этого во второй регистр операнда 12 с выхода блока 2 заноситс  номер регистра, указанный в элементарной записи.In the case of an elementary record of type VI, the same is performed as in the previous case, but zero is entered in the register number of array 17. After that, the second register of operand 12 from the output of block 2 is entered in the register number specified in the elementary record.

Занесение во второй регистр операнда производитс  по следующим правилам. Если триггер зан тости 13 второго регистра операнда установлен в «О (второй регистр операнда 12 свободен), то производитс  запись во второй регистр операнда 12. После этого анализируетс  состо ние триггера зан тости 14 первого регистра операнда. Если триггер находитс  в состо нии «1 (первый регистр операнда 11 зан т), то триггер зан тости 13 второго регистра операнда устанавливаетс  в «1. Если триггер зан тости 14 первого регистра операнда находитс  в «О, то производитс  перезапись из второго регистра операнда 12 в первый регистр операнда 11 и триггер зан тости 14 первого регистра операнда устанавливаетс  в «1.The operand is entered in the second register according to the following rules. If the trigger 13 of the second operand register is set to "O (the second register of operand 12 is free), then the second register of the operand 12 is written. After that, the state of the trigger 14 of the first register of the operand is analyzed. If the trigger is in the state "1 (the first register of operand 11 is occupied), then the trigger 13 of the second register of the operand is set to" 1. If the occupancy trigger 14 of the first register of the operand is in " 0, then the second register of operand 12 is rewritten into the first register of operand 11 and the occupancy trigger 14 of the first operand register is set to " 1.

Если триггер зан тости второго регистра операнда установлен в «1, то производитс  предварительна  перезапись содержимого первого регистра операнда П в блок стековой пам ти операндов 10 и перезапись содержимого второго регистра операнда 12 в первый регистр операнда П.. ..If the trigger of the second operand register is set to "1", the contents of the first register of operand P are pre-recorded in the stack memory of operands 10 and the contents of the second register of operand 12 are overwritten in the first register of operand P ...

Информаци  в первом и втором регистрах операндов 11 и 12 может быть четырех типов (номер типа записываетс  в двух левых разр дах регистра): операнд с фиксированной зап той , занимает половину регистра (одно машинное слово); операнд с плавающей зап той, занимает весь регистр (два слова); адрес (номер ) регистра, номер регистра записан в правых п ти разр дах левой половины регистра; адрес элемента массива, который состоит из номера элемента и номера массива, номер массива записан в правых п ти разр дах левой половины регистра, в остальных разр дах записан номер элемента.The information in the first and second registers of operands 11 and 12 can be of four types (the type number is written in the two left register bits): the operand with a fixed comma takes half of the register (one machine word); floating point operand, occupies the entire register (two words); the address (number) of the register, the number of the register is recorded in the right five bits of the left half of the register; the address of the array element, which consists of the element number and the array number, the array number is written in the right five bits of the left half of the register; the remaining bits contain the element number.

Логические значени  представл ютс  с помощью типа I true - все единицы, alse - все нули.Logical values are represented using type I true - all ones, alse - all zeros.

Длина  чейки блока стековой пам ти операндов - одно мащинное слово (четыре байта ).The cell length of the stack memory of operands is one soft word (four bytes).

При записи содержимого первого регистра операндов 11 в блок стековой пам ти операидов 10 в случае первого, третьего и четвертого типов записываетс  содержимое только левой половины этого регистра, а в случае второго типа - сначала содержимое правой, а затем левой половины. Перед записью каждого слова к счетчику операндов 8 прибавл етс  единица . Запись производитс  в  чейку, адрес которой содержитс  в этом счетчике.When writing the contents of the first register of operands 11, the stack memory of the operaids 10 in the case of the first, third and fourth types records the contents of only the left half of this register, and in the case of the second type, first the contents of the right and then the left half. Before writing each word, one is added to the counter of operands 8. The entry is made in a cell whose address is contained in this counter.

Аналогично, перед записью в блок стековой пам ти управл ющих символов 7 прибавл етс  единица к счетчику управл ющих символов 5.Similarly, before being written to the stack memory of control characters 7, one is added to the counter of control characters 5.

Если элементарна  запись  вл етс  управл ющим символом (вид VII), то работа процессора целиком определ етс  прочитанным управл ющим символом и управл ющим символом , наход щимс  к этому времени в вершине управл ющего стека, т. е. в  чейке блока стековой пам ти управл ющих символом 7, адрес которой содержитс  в счетчике управл ющих символов 5.If the elementary record is a control character (type VII), then the operation of the processor is entirely determined by the read control character and the control character located at that time at the top of the control stack, i.e. in the cell of the control stack memory The symbol 7, whose address is contained in the counter of control characters 5.

Оба вышеуказанных управл ющих символа подаютс  на вход блока анализа управл ющих символов 4. Этот блок представл ет собой ассоциативную пам ть, в которой записаны правила расщифровки  зыка. Оба управл ющих символа поступают на щины опроса ассоциативной пам ти. С выхода блока анализа управл ющих символов 4 считываетс  управл ющий код, который подаетс  в блок управлени  3 и вызывает переход к микропрограмме , соответствующей данной паре управл ющих символов.Both of the above control characters are fed to the input of the control character analysis block 4. This block is an associative memory in which the language deciphering rules are written. Both control characters are sent to associative memory polling. From the output of the control character analysis block 4, a control code is read, which is fed to the control block 3 and causes a transition to the firmware corresponding to this pair of control characters.

Claims (2)

Действи  процессора в общем случае могут быть следующими: выполнить операцию, соответствующую управл ющему символу в верщине управл ющего стека, вычесть единицу из счетчика управл ющих символов 5 и вернутьс  к фазе а ализа; занести прочитанный управл ющий символ в блок стековой пам ти управл ющих символов 7 и продолжить чтение программы. Выбор дл  каждой пары управл ющих символов одного КЗ двух указанных вариантов делаетс  в соответствии с приоритетами управл ющих символов. Дл  пары «а, «в («а - управл ющий символ из вершины управл ющего стека, «в - прочитанный из программы); если приоритет «а больше, чем приоритет «в или равен ему, то выбираетс  вариант I; если приоритет «в больше, чем приоритет «а, то выбираетс  вариант 2. Например, в случае пары выбираетс  первый вариант, в случае пары « (выбираетс  второй вариант. Отметим, что некоторые управл юшие символы в позиции прочитанного из программы символа имеют один приоритет, а в позиции символа из вершины управл ющего стека- другой (стековый). В некотором случае действи  могут отличатьс  от вышеуказанных вариантов. Например , если прочитанный из программы символ  вл етс  символом типа перехода (go to, call), то сразу же выполн етс  соответствующий переход , т. е. блок чтени  программы 1 продолжает дальнейшее чтение программы, начина  с адреса, сообшаемого в операции перехода. В случае операции call производитс  также занесение адреса возврата из блока чтени  программы 1 в блок стековой пам ти управл ющих символов 7 (в п ть последовательных  чеек). При выполнении операции ret (возврат) информаци  из п ти  чеек управл юшего стека заноситс  в блок чтени  программы 1. Дл  выполнени  арифметических и логических операций производитс  обращение к арифметическому блоку 15. Арифметические и логические операции всегда производ тс  над величинами в первом и втором регистрах операндов 11 и 12, которые используютс  как внутренние регистры арифметического блока 15. Дл  большинства арифметических и логических операций (дл  двуместных) необходиМО , чтобы оба регистра были зан ты. Поэтому, если триггер зан тости 13 второго регистра операнда находитс  в «О (второй регистр операнда 12 пуст), а триггер зан тости первого регистра операнда находитс  в «1, то производитс  предварительна  перепись из первого регистра операнда I1 во второй регистр операнда 12, перепись из блока стековой пам ти операндов 10 в первый регистр операнда 11 (из  чейки, адрес которой содержитс  в счетчике операндов 8) и триггер зан тости второго регистра операнда устанавливаетс  в «1. При этом если считываема  из блока стековой нам ти операндов 10 информаци  относитс  к типам 1, 3 или 4, то производитс  чтение одного слова, которое заноситс  в левую половину первого регистпа операнда, если же она отнлгитг  к Twny 2. то производитс  чтение л слг: . кп-:прьте :анос тс  в левую и в правую 1).1:ну зтого регистрэ, После чтени  каждого слова из счетчика операндов 8 вычитаетс  единица. Если оба триггера зан тости 13 и 14 наход тс  в «О, то вышеуказанна  операци  повтор етс  два раза, пока не заполн етс  первый и второй регистры операндов 11 и 12, после чего эти триггеры устанавливаютс  в «1. Если при выполнении арифметической или логической операции в нервом регистре операнда II или втором регистре операнда 12 находитс  адрес, то производитс  предварительна  выборка операндов в эти регистры из главной пам ти. Адрес подаетс  на информационный выход 19 и считанный из главной пам ти операнд поступает на информацнониый вход 18. Согласование работы главной пам ти и предлагаемого устройства ироизводитс  с помощью управл ющего выхода 20 и управл ющего входа 21 устройства, Результат операции помещаетс  в первый регистр операнда 11. Триггер зан тости второго регистра операнда 13 устанавливаетс  в «О. Тип результата совпадает с типом операндов , если же один операнд имеет тип 1, а другой тип 2, то результат получаетс  типа Processor actions can generally be as follows: perform an operation corresponding to a control character in the control stack vertex, subtract a unit from the counter of control characters 5, and return to phase a alise; enter the read control character into the stack of control characters 7 and continue reading the program. The selection for each pair of control characters of one fault of the two specified options is made in accordance with the priorities of the control characters. For the pair of “a,” in (“a is the control character from the top of the control stack,“ c is read from the program); if priority "a is greater than priority" is equal to or equal to it, then option I is selected; if priority is "higher than priority", then option 2 is selected. For example, in the case of a pair, the first option is chosen, in the case of a pair "(the second option is chosen. Note that some control characters in the character read from the program have one priority and in the position of the symbol from the top of the control stack is another (stack). In some cases, the actions may differ from the above options. For example, if the symbol read from the program is a transition type symbol (go to, call), then appropriate the transition, i.e., the reading unit of program 1, continues further reading of the program, starting with the address reported in the transition operation. In the case of a call operation, the return address from the program reading unit 1 is also recorded in the stack memory of control characters 7 (in sequential cells). When performing the operation ret (return), information from the cells of the managed stack is entered into the reading block of program 1. The arithmetic block 15 is called to perform arithmetic and logical operations. These operations are always performed on the values in the first and second registers of operands 11 and 12, which are used as internal registers of the arithmetic unit 15. For most arithmetic and logical operations (for two-place), both registers must be occupied. Therefore, if the trigger 13 of the second operand register is in "O (the second register of operand 12 is empty), and the occupancy trigger of the first register of the operand is in" 1, then the first register of the operand I1 in the second register of operand 12 is rewritten from the stack memory block of operands 10 to the first register of operand 11 (from the cell whose address is contained in the counter of operands 8) and the occupancy trigger of the second register of the operand is set to "1. At the same time, if the information read from the stack unit of tee operands 10 is of types 1, 3 or 4, then one word is read, which is entered in the left half of the first register of the operand, but if it is related to Twny 2. then the word L is read: . qn-: fuck: anos tc to the left and to the right 1) .1: well, this is the case. After reading each word, one is subtracted from the operand counter 8. If both the occupation triggers 13 and 14 are in " O, then the above operation is repeated two times until the first and second registers of operands 11 and 12 are filled, after which these triggers are set to " 1. If, when performing an arithmetic or logical operation, an address is found in the nerve register of operand II or the second register of operand 12, then the operands in these registers are pre-sampled from the main memory. The address is fed to the information output 19 and the operand read from the main memory is fed to the information input 18. The operation of the main memory and the proposed device is coordinated and produced by the control output 20 and the control input 21 of the device. The result of the operation is placed in the first register of the operand 11. The trigger for the second register of operand 13 is set to “O. The result type coincides with the type of the operands, if one operand is of type 1 and the other type is 2, then the result is of type 2. При операции присваивани  в первом регистре операндов 11 должен находитьс  адрес, а во втором регистре операндов 12 - записываемое значение. После записи значени  по вышеуказанному адресу обе величины уничтожаютс  (триггер зан тости первого регистра операндов и триггер зан тости второго регистра операндов устанавливаютс  в «О). Адреса в регистры И и 12 попадают или из программы (виды О, I, III и IV) или в результате некоторого вычислени  в случае обращени  к массиву с индексным выражением (вндыУиУ ). В этом случае номер массива заноситс  в регистр номера массива 17, а в блок стековой пам ти управл ющих символов 7 - символ , означающий начало индексного выражени . Далее производитс  вычисление всех индексов (как обычных арифметических выражений) и вычпсление номера элемента массива по индексам и размерам массива по всем измерени м , если массив многомерный. После вычислени  каждого индекса (на оконч;и ие вычислени  индекса указывает пара «, (производитс  обращение к пам ти (к паспорту массива), за размером массива по соответствующему измерению. Дл  этого на шины св зи с пам тью подаетс  номер массива из регистра номера массива 17 и номер индексной позиции из счетчика индексных позиций 16. Считанна  величина заноситс  во второй регистр операнда 12 и далее производ тс  действи  умножени  и сложени . В результате, после обработки последнего индекса (на это казывает пара «)), в первом регистре опеанда И будет записана величина, равна : I/. А /г - величина t-ro индекса, Di - размер массива по t-му измерению. Эта величина - номер элемента массива. После ее вычислени  производитс  запись номера массива из регистра номера массива 17 в соответствующее поле первого регистра операнда 11 и информаци  в этом регистре помечаетс , как адрес элемента массива. Если при вычислении индекса снова встретитс  обращение к массиву с индексным выражением , то производитс  запись регистра номера массива 17 и счетчика индексных позиций 16 в блок стековой пам ти управл ющих символов 7. После окончани  обработки вложенного обращени  старое содержимое этого регистра и счетчика восстанавливаетс . В случае переполнени  блока стековой пам ти управл ющих символов 7 или блока стековой пам ти операндов 0 производитс  перег ись соответствующего стека в главную паь ть . Момент переполнени  устанавливаетс  с помощью сигнала из индикатора нул  6 или  ндикатора нул  9. Если при обращении к блоку стековой пам ти операндов 10 или блоку стековой пам ; ти управл ющих символов 7 за операндом или управл ющим символом он оказываетс  пустым (это устанавливаетс  также с помощью сигнала из индикатора нул  6 или индикатора нул  9), то производитс  перепись из пам ти в этот блок его старого содержимого. Формула изобретени  Устройство дл  обработки выражений  зыков программировани , содержащее блок управлени , управл ющие вход и выход которого соединены с одноименными входом и выходом устройства, арифметический блок, управл ющий вход которого соединен с первым выходом блока управлени , первый управл ющий выход соединен с первым входом блока управлени , два триггера зан тости, входы установки в ноль которых подключены ко второму управл ющему выходу арифметического блока, входы установки в единицу подключены ко второму выходу блока управлени , выходы соединены со вторым входом блока управлени , блок стековой пам ти операндов, управл ющий вход которого соединен с третьим выходом блока управлени . сметчик операндов, счетный вход которого подключен к третьему выходу блока управлени , выход - к адресному входу блока стековой пам ти операндов, первый регистр операнда , вход которого соединен с информационным выходом блока стековой пам ти операндов , с информацгюниым выходом арифметического блока, с информационным входом устройства , первый управл юцг.ий вход подключен к третьему управл ющелчу выходу арифметического блока, второй управл ющий вход соединен с третьим выходом блока управлени , выход признака - подключен к третьему входу блока управлени , информационный выход соединен с информационным входом блока стековой пам ти операндов, с информационным выходом устройства и с первым информационным входом арифметического блока, второй регистр операнда, информационный вход которого соединен с информационным выходом первого регистра операнда, с информационным входом устройства, первый упрЗВл ющий вход подключен к третьему управл ющему выходу арифметического блока , второй управл ющий вход соедивен с третьим выходом блока управлени , выход признака соединен с четвертым входом блока управлени , информационный выход соединен с информационным входом первого регистра операнда, с информационным выходом устройства и со вторым информационным входом арифметического блока, блок чтени  программы , первый информационный вход которого соединен с информационным входом устройства , адресный выход подключен к информационному выходу устройства, информационный выход соединен с п тым входом блока управлени , управл ющий вход подключен к четвертому выходу блока управлени , о тл и ч а ю щ е е с   тем, что, с целью упрощени  трансл ции с  зыков высокого уровн  и сокращени  времени трансл ции, в него введены блок формировани  адресов и операндов, информационный вход которого подключен к ипформационному выходу блока чтени  програмMiji , управл ющий вход подключен к четвертому выходу блока управлени , первый информйпионный выход соединен со вторым информационным входом блока чтени  программы , второй информационный выход подключен к информационному входу второго регистра операнда, блок стековой пам ти управл ющих символов, управл ющий вход которого соединен с п тым выходом блока управлени , информационный вход соединен с информационным выходом блока чтени  программы, информационный выход соединен с третьим информационным входом блока чтени  программы, счетчик управл ющих символов, счетный вход которого соединен с п тым выходом блока управлени , выход - с адресным входом блока стековой пам ти управл ющих символов, первый индикатор нул , вход которого подключен к выходу счетчика управл ющих символов, выход - к шестому входу блока управлени , блок анализа управл ющих символов, первый информационный вход которого соединен с информационным ыходом блока чтени  программы, второй инcbopMauiOHHbui вхоп подключен к информационному выходу блока стековой пам ти управл  ии х СИМВОЛОВ, выход соединен с ССД1.МЫМ входом блока управлени , второй индикатор нул , вход которого подключен к выходу смегчика операнлов, выход соединен с иосьмым входом блока управлени , счетчик2. During the assignment operation, in the first register of operands 11, the address must be found, and in the second register of operands 12, the recorded value. After writing the value at the above address, both values are deleted (the occupancy trigger of the first operand register and the occupancy trigger of the second operand register are set to "O"). The addresses in the registers And and 12 fall either from the program (types O, I, III and IV) or as a result of some computation in the case of an array with an index expression (V & A). In this case, the array number is entered in the register number of the array 17, and in the stack memory block of control characters 7, a symbol indicating the beginning of the index expression. Next, all indices are computed (as usual arithmetic expressions) and the number of the array element is calculated by indices and array sizes by all dimensions, if the array is multidimensional. After calculating each index (the final; and the index calculation is indicated by a pair, "(access to the memory is made (to the array passport), after the size of the array according to the corresponding measurement. To do this, the array number from the register is fed to the memory buses) array 17 and the index position number from the index position index 16. The read value is entered into the second register of operand 12 and further multiply and add are performed. As a result, after processing the last index (the pair “)), in the first register The value of the array is equal to: I /. A / g is the index's t-ro value, Di is the size of the array according to the t-th dimension. This value is the element number of the array. In the corresponding field of the first register of operand 11 and the information in this register is marked as the address of the array element. If, during the calculation of the index, the array is again addressed with an index expression, then the register number of the array 17 and the index of the index positions 16 are written to the stack memory module. These characters are 7. After the processing of the enclosed call is completed, the old contents of this register and counter are restored. In the event that the stack memory of control characters 7 or the stack memory of operands 0 overflows, the corresponding stack is transferred to the main line. The overflow time is set using a signal from the indicator zero 6 or the zero indicator 9. If, when accessing the stack memory of operands 10 or the stack memory; Since the control characters 7 after the operand or the control character are empty (this is also set using a signal from indicator zero 6 or indicator zero 9), then its old contents are copied from the memory into this block. An apparatus for processing expressions of programming languages, comprising a control unit, the control input and the output of which are connected to the device input and output of the same name, an arithmetic unit, the control input of which is connected to the first output of the control unit, the first control output is connected to the first input of the block control, two triggers of occupation, the installation inputs to zero of which are connected to the second control output of the arithmetic unit, the installation inputs to the unit connected to the second output of the unit control, the outputs are connected to the second input of the control unit, the stack unit of operand memory, the control input of which is connected to the third output of the control unit. operand calculator whose counting input is connected to the third output of the control unit, output to the address input of the operand stack memory block, the first operand register, whose input is connected to the information output of the operand stack memory block, with information output of the arithmetic unit, to the device information input , the first control input is connected to the third control output of the arithmetic unit, the second control input is connected to the third output of the control unit, the output of the feature is connected to the third in ode control unit, information output is connected to the information input of the operand stack memory unit, to the information output of the device and the first information input of the arithmetic unit, the second operand register, whose information input is connected to the information output of the first operand register, to the information input of the device, the first control The input is connected to the third control output of the arithmetic unit, the second control input is connected to the third output of the control unit, the output of the connection sign n with the fourth input of the control unit, the information output is connected to the information input of the first register of the operand, the information output of the device and the second information input of the arithmetic unit, the program reading unit, the first information input of which is connected to the information input of the device, the output output is connected to the information output of the device , the information output is connected to the fifth input of the control unit, the control input is connected to the fourth output of the control unit, which is connected with then, in order to simplify the translation of high-level languages and reduce the broadcasting time, an address and operand shaping unit was entered into it, whose information input is connected to the information output of the Miji reading unit, the control input is connected to the fourth output of the control unit, the first information output connected to the second information input of the program reading unit; the second information output is connected to the information input of the second operand register, the stack of control characters, the control the input of which is connected to the fifth output of the control unit, the information input is connected to the information output of the program reading unit, the information output is connected to the third information input of the program reading unit, the control character counter, the counting input of which is connected to the fifth output of the control unit, the output - with the address input of the stack memory of control characters, the first indicator zero, the input of which is connected to the output of the counter of control characters, the output to the sixth input of the control, the analysis analysis control of their characters, the first information input of which is connected to the information output of the program reading unit, the second incbopMauiOHHbui input is connected to the information output of the stack of the CHARACTERS control, the output is connected to SDD1. WE input of the control unit, the second zero indicator, the input connected to the output the operand of the operand, the output is connected to the eighth input of the control unit, the counter 11eleven индексных позиции, счетный вход которого подключен к третьему выходу блока управлени , информационный вход соединен с информационным выходом блока чтени  программы и с информа.циовным выходом блока стековой пам ти управл ющих символов, выход соединен с информационным выходом устройства и с информационным входом блока стековой пам ти управл ющих символов,index positions, the counting input of which is connected to the third output of the control unit, the information input is connected to the information output of the program reading unit and the information output of the stack of control characters, the output is connected to the information output of the device and to the information input of the stack memory control characters 12 12 регистр номера массива, вход которого подключен к информационному выходу блока чтени  программы и к информационному выходу блока стековой пам ти управл ющих символов , выход соединен с информационным выходом устройства, с информационным входом блока стековой пам ти управл ющих символов и с информационным входом первого регистра операнда.The register of the array number, the input of which is connected to the information output of the program reading unit and to the information output of the stack of control characters, the output is connected to the information output of the device, to the information input of the stack of control characters and to the information input of the first operand register.
SU1995907A 1974-02-12 1974-02-12 Device for processing expressions of programming languages SU519715A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU1995907A SU519715A1 (en) 1974-02-12 1974-02-12 Device for processing expressions of programming languages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU1995907A SU519715A1 (en) 1974-02-12 1974-02-12 Device for processing expressions of programming languages

Publications (1)

Publication Number Publication Date
SU519715A1 true SU519715A1 (en) 1976-06-30

Family

ID=20575676

Family Applications (1)

Application Number Title Priority Date Filing Date
SU1995907A SU519715A1 (en) 1974-02-12 1974-02-12 Device for processing expressions of programming languages

Country Status (1)

Country Link
SU (1) SU519715A1 (en)

Similar Documents

Publication Publication Date Title
US3222649A (en) Digital computer with indirect addressing
EP0011442A1 (en) Data processing system having an integrated stack and register machine architecture
US3293616A (en) Computer instruction sequencing and control system
CA1104261A (en) Method and apparatus to test address formulation in an advanced computer system
EP0730226A2 (en) Hardware support for fast software emulation of unimplemented instructions
US3200379A (en) Digital computer
GB979632A (en) Improvements in or relating to electronic digital computing machines
US3510847A (en) Address manipulation circuitry for a digital computer
US3624616A (en) Dynamic allocation of multidimensional array memory space
US3699528A (en) Address manipulation circuitry for a digital computer
Lawson Programming-language-oriented instruction streams
US3964028A (en) System and method for evaluating paging behavior
SU519715A1 (en) Device for processing expressions of programming languages
Jensen et al. Lecture Notes in Computer Science
GB1003921A (en) Computer cycling and control system
GB2079502A (en) Digital computers
US4616315A (en) System memory for a reduction processor evaluating programs stored as binary directed graphs employing variable-free applicative language codes
US3705389A (en) Digital computer having a plurality of accumulator registers
GB1014824A (en) Stored programme system
US3774166A (en) Short-range data processing transfers
GB1159330A (en) Improvements in and relating to Digital Computers
JPH083801B2 (en) System allocator for a reduced processor that evaluates programs stored as binary directed graphs using frequency-free functional language code
US4125879A (en) Double ended stack computer store
JPS61110240A (en) Optimization compiler
Resnick et al. DMAP-A COBOL extension for associative array processors