SU519715A1 - Device for processing expressions of programming languages - Google Patents
Device for processing expressions of programming languagesInfo
- 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
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)
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) |
-
1974
- 1974-02-12 SU SU1995907A patent/SU519715A1/en active
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 |