SU1273929A1 - Device for controlling subroutine call - Google Patents
Device for controlling subroutine call Download PDFInfo
- Publication number
- SU1273929A1 SU1273929A1 SU843832959A SU3832959A SU1273929A1 SU 1273929 A1 SU1273929 A1 SU 1273929A1 SU 843832959 A SU843832959 A SU 843832959A SU 3832959 A SU3832959 A SU 3832959A SU 1273929 A1 SU1273929 A1 SU 1273929A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- output
- elements
- address
- group
- Prior art date
Links
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Изобретение относитс к области вычислительной техники и может быть использовано в устройствах управлени ЭВМ. Целью изобретени вл етс расширение функциональных возможностей за счет обращени к подпрограммам в произвольной последовательности . Устройство содержит счетчик 1 команд, блок 2 стековой пам ти , группы 3,4,26 элементов ИЛИ, блок 5 ассоциативной пам ти, регистр 6 команд, регистр 7 адреса, буферный регистр 8, элементы 12-18, 25 И, триггер 19, два элемента 20, 21 ИЛИ, дешифратор 22, распределитель импульсов 23, генератор импульсов 24, входы и выходы устройства. Указанна цель достигаетс с помощью указанной совокупности признаков. с 1 ил. елThe invention relates to the field of computer technology and can be used in computer control devices. The aim of the invention is to extend the functionality by referring to subroutines in an arbitrary sequence. The device contains a counter of 1 commands, block 2 of stack memory, groups of 3,4,26 elements OR, block 5 of associative memory, register of 6 commands, register of address 7, buffer register 8, elements 12-18, 25 AND, trigger 19, two elements 20, 21 OR, the decoder 22, the pulse distributor 23, the pulse generator 24, the inputs and outputs of the device. This goal is achieved using a specified combination of features. from 1 il. ate
Description
Изобретение относитс к вычислительной технике и может быть использовано в устройствах управлени ЭВМThe invention relates to computing and can be used in computer control devices.
Цель изобретени - расширение функциональных возможностей за счет обращени к подпрограммам в произвольной последовательности.The purpose of the invention is to expand the functionality by referring to subroutines in an arbitrary sequence.
На чертеже приведена функциональна схема предлагаемого устройства.The drawing shows a functional diagram of the proposed device.
Устройство содержит счетчик 1 команд, блок 2 стековой пам ти, группы 3 и 4 элементов ИЛИ, .блок 5 ассоциативной пам ти,регистр 6 команд, регистр 7 адреса, буферньй регистр8 , группы 9-11 элементов И, эле- мен-ты И 12-18, триггер 19, элементы ИЛИ 20 и 21, дешифратор 22, распределитель 23 импульсов, генератор 24 импульсов, элемент И 25, группу 26 элементов ИЛИ, входы 27 адреса команды основной программы, 28 кода команды основной программы, 29 начальной загрузки устройства, выходы 30 адреса очередной команды, 31 адресной части команды, 32 кода операции устройства, входы 33 начальной установки, 34 признака постуцлени очередной команды устройства.The device contains a counter of 1 commands, a block of 2 stack memories, groups 3 and 4 of the elements OR, a block of 5 associative memory, a register of 6 commands, a register of the 7 addresses, a buffer register 8, groups of 9-11 elements AND, an AND element 12-18, trigger 19, elements OR 20 and 21, decoder 22, pulse distributor 23, pulse generator 24, AND 25, group of 26 OR elements, inputs 27 for the main program command address, 28 for the main program command code, 29 initial load for the device , outputs 30 addresses of the next command, 31 address parts of the command, 32 device operation codes, inputs 33 initial installation, 34 signs of the next command of the device.
Перва и втора группы информационных уходов блока 2 вл ютс информационными входами этого блока . Из кодов, подаваемых на эти группы, путем конкатенации (сцеплени ) формируетс слово, записываемое в блок 2. Перва и втора группы информационных выходов блока 2 вл готс информационными вьпсодами этого блока. Считьшаемое слово раздел етс на две части, причем одна часть слова выдаетс на первую, а друга на вторую группу выходов блока 2.The first and second groups of information departures of block 2 are the information inputs of this block. From the codes supplied to these groups, by concatenation (concatenation), the word recorded in block 2 is formed. The first and second groups of information outputs of block 2 are the information signals of this block. The word to be read is divided into two parts, with one part of the word being given out to the first, and the other to the second group of outputs of block 2.
Устройство работает следующим образом .The device works as follows.
При включении питани импульсом с входа 33 регистр 7 и триггер 19 обнул ютс , а распределитель 23 устанавливаетс в исходное состо ние (при этом ни на одном из его выходов сигнал не выдаетс ). Адрес первой команды управл ющей программы запйсьшаетс через группу 3 элементов ИЛИ в счетчик 1 с входа 27 устройства . Этот адрес поступает на выход 30 устройства, который подключаетс к запоминающему устройству. Из запоминающего устройства на триггер 6 по входу 28 устройства считьшаетс перва команда управл ющей программы . Команды обращени к подпрограмме и возврата выполн ютс в предлагаемом устройстве, а остальные в других узлах внешнего устройства управлени , причем код операции из регистра 6 вьщаетс на выход 32 устройства , а адресна часть - на выход 31 устройства.When the power is turned on with a pulse from the input 33, the register 7 and the trigger 19 are zeroed out, and the distributor 23 is reset (no signal is output at any of its outputs). The address of the first command of the control program is recorded through a group of 3 elements OR to counter 1 from input 27 of the device. This address is provided at output 30 of the device, which is connected to the storage device. From the memory device to the trigger 6 on the input 28 of the device, the first control program command is received. The subroutine access and return commands are executed in the proposed device, and the rest in other nodes of the external control device, the operation code from register 6 being output to the device output 32, and the address part to the device output 31.
После приема команды на регистр 6 подаетс импульс на вход 34, который устанавливает триггер 19 в единичное состо ние , Открываетс элемент И 18, и импульсы с выхода генератора 24 начинают проходить на вход распределител 23. Если на регистр 6 прин та команда обращени к подпрограмме, то по вл етс сигнал на первом выходе дешифратора 22, а если команда возврата - то на втором. Другие коды операций дешифратор 22 не расшифровывает . Распределитель 23 начинает вьщавать импульсы последовательно на своих выходах, начина с первого и конча восьмым. По импульсу на первом выходе распределител 23 содержимое счетчика 1 увеличиваетс на единицу, т.е. формируетс адрес следующей команды . Если в регистре 6 не находитс команда управлени подпрограммами, то больше никаких операций в устройстве не выполн етс . По импульсу с восьмого выхода распределител 23 триггер 19 устанавливаетс в нулевое состо ние и прохождение импульсов через элемент И 18 запрещаетс . Распределитель 23 после по влени импульса на своем восьмом выходе переходит в исходное состо ние.After receiving the command to register 6, a pulse is applied to input 34, which sets trigger 19 to one state, And 18 is opened, and pulses from generator 24 start to go to input of distributor 23. If command to address 6 is received on register 6, then a signal appears at the first output of the decoder 22, and if the return command is at the second. Other opcodes 22 decoder does not decrypt. The distributor 23 starts pulsing successively at its outputs, starting from the first and ending at the eighth. By the pulse at the first output of the distributor 23, the contents of the counter 1 are increased by one, i.e. the address of the next command is generated. If the subroutine control command is not in register 6, then no more operations are performed in the device. By the pulse from the eighth output of the distributor 23, the trigger 19 is set to the zero state and the passage of pulses through the element 18 is prohibited. The distributor 23, after the appearance of a pulse at its eighth output, returns to the initial state.
По специальной команде информаци о подпрограммах по входу 29 устройства заноситс в блок 5 ассоциаТИВНО11 пам ти. При этом дл каждой подпрограммы отводитс одна чейка ассоциативной пам ти. Адресна и информационна части каждой чейки после начальной записи содержат одинаковую информацию, а именно, адрес точки входа, в соответствующую подпрограмму , наход щуюс в запоминающем устройстве.By a special command, information about the subroutines at the input 29 of the device is entered into the block 5 of the associative memory 11. In this case, one cell of the associative memory is allocated for each subprogram. The address and information parts of each cell after the initial entry contain the same information, namely, the address of the entry point to the corresponding subroutine in the storage device.
После этого устройство готово к управлению подпрограммами, адреса точек входа в которых записаны в блок 5. Пусть на регистр 6 прочитана . After that, the device is ready to control the subroutines, the addresses of entry points in which are written in block 5. Let register 6 be read.
5 команда обращени к подпрограмме. Она имеет вид С А, где С - код операции; А - адрес точки входа в подпрограмму . При этом открьшаютс элементы И 12 - 15. По импульсу с входа 34 запускаетс распредели тель 23 В результате этого в первую очередь содержимое счетчика 1 увеличиваетс на единицу. После этого импульс с второго выхода распределител 23 проходит на выход элемента И 12, открывает группу 9 элементов И и содержимое счетчика 1 (адрес команды , следующей за командой обращени к подпрограмме) через группу 4 элементов ИЛИ записываетс в регистр 8 По этому же импульсу в вершину блока 2 стековой пам ти записываетс слово , состо 1чее из нулевого содержимого регистра 7 и этого же адреса. Импульс с третьего выхода распределител 23 проходит через элементы И 13 и ИЛИ 21, в результате чего осуществ л етс попытка записи содержимого регистра 8 в блок 5 по адре су (с признаком) содержимого регистра 7, но так как первоначально он был обнулен, то запись не производитс . Регистр 7 хранит адрес точки входа в активную (выполн ющуюс в насто щее врем ) подпрограмму, но в данный момент активна управл юща программа. Импульс с четвертого выхода распределител 23 проходит через элемент И 14 и открывает группу 10 элементов И, вследствие чего адрес точки входа в подпрограмму заноситс в регистр 7. По импульсу на п том выходе распределител 23 содер жимое чейки блока 5 с адресной частью, определ емой содержимым регистра 7, т.е. адрес точки входа в подпрограмму, через блок 3 элементов ИЛИ записываетс в счетчик I, чем за вершаетс переход к подпрограмме. Первоначальный вход в подпрограмму осуществл етс через ее начало (через точку входа). Последующие команды обращени к подпрограмме выполн ютс аналогично за исключением того, что по импульсу с вьтхода элемента И 12 в блок 2 осуществл етс запись слова, содержащего адрес точки входа в вызывающую подпрограмму и адрес точки возврата в эту подпрограмму (содержимое регистра 7 и счетчика 1 соответственно), а по импульсу с выхода элемента ИЛИ 21 осуществл етс запись адреса точки возврата в вызывающзпо подпрограмму из регистра 8 в чейку блока 5 с адресной частью, равной адресу точки входа в вызываю294 щую подпрограмму. В конце цикла выполнени этой команды в счетчик 1 не об зательно записываетс только адрес точки входа в вызываемую подпрограмму . Он записываетс только в том случае, когда происходит первое обращение к подпрограмме, или когда предьщущее выполнение этой подпрограммы закончилось командой возврата, а не командой обращени к другой подпрограмме . Если предьщущее выполнение подпрограммы было прервано командой обращени к другой подпрограмме , то при последующем обращении к прерванной подпрограмме в счетчик 1 заноситс адрес точки возврата, т.е. адрес команды, следующей за последней командой, выполнивщейс при предьщущем обра1);ении. Это происходит вследствие изменени содержимого блока 5 в процессе работы устройства . Если на регистр 6 считываетс команда возврата, состо ща только из одного кода операции, то открываютс элементы И 16, 17 и 25. После запуска распределител 23 содержимое счетчика 1 увеличиваетс на единицу. Импульсы с второго, третьего, чет- вертого и п того выходов распределител 23 на выходы элементов И 12 15 не проход т. По импульсу с шеетого выхода распределител 23 осуществл етс прием адреса выполн ющейс сопрограммы в регистр 8 через 11 элементов И и группу 4 элементов ИЛИ. Импульс с седьмого выхода распределител 23 проходит через элементы И 17 и ИЛИ 2I на вход записи блока 5. При этом по адресу точки входа в подпрограмму, вьтолнение которой заверщаетс , записываетс этот же адрее точки входа, т.е. восстанавливаетс первоначальное содержимое соответствующей чейки дл того, чтобы следующее обращение к этой подпрограмме привело к передаче управлени в ее точку входа. По импульсу на восьмом выходе распределител 23 происходит считьтание слова из вершины блока 2, в результате чего адрес точки возврата в подпрограмму, в которую осуществл етс возврат, через группу 3 элементов ИЛИ заноситс в счетчик 1, а в регистр 7 через группу 26 элементов ИЛИ записьшаетс адрес точки входа в эту подпрограмму (т.е. восстанавливаетс 5 command call to the subroutine. It has the form C A, where C is the operation code; And - the address of the entry point to the subroutine. At the same time, elements 12–15 are opened. By means of a pulse from the input 34, the distributor 23 is started. As a result of this, first of all, the contents of the counter 1 are increased by one. After that, the pulse from the second output of the distributor 23 passes to the output of the element 12, opens the group 9 of the elements AND, and the contents of the counter 1 (the address of the command following the instruction to the subroutine) through the group of 4 elements OR is written to the register 8 by the same pulse to the top Block 2 of a stack of memory, a word is written that consists of 1 of the contents of register 7 and the same address. The impulse from the third output of the distributor 23 passes through the elements AND 13 and OR 21, as a result of which an attempt is made to write the contents of register 8 into block 5 by address (with indication) of the contents of register 7, but since it was initially reset, the record not produced. Register 7 stores the address of the entry point to the active (currently running) subroutine, but the control program is currently active. The pulse from the fourth output of the distributor 23 passes through the element AND 14 and opens a group of 10 elements AND, as a result of which the address of the entry point to the subroutine is entered into the register 7. The pulse at the fifth output of the distributor 23 contains the contents of the cell 5 with the address part determined by the content register 7, i.e. the address of the entry point into the subroutine, through block 3 of the elements OR, is written into the counter I, which completes the transition to the subroutine. The initial entry into the subroutine is through its beginning (through the entry point). Subsequent instructions to the subroutine are executed similarly, except that the pulse from the input of element 12 in block 2 records the word containing the address of the entry point to the calling subroutine and the address of the return point in this subroutine (the contents of register 7 and counter 1 respectively ), and the pulse from the output of the element OR 21 records the address of the return point in the calling subroutine from register 8 into the cell of block 5 with the address part equal to the address of the entry point to the calling subprogram. At the end of the execution cycle of this command, only the address of the entry point to the called subroutine is not necessarily written to counter 1. It is recorded only when the first call to the subroutine occurs, or when the previous execution of this subroutine ended with a return command, and not a command to call another subroutine. If the previous execution of the subroutine was interrupted by a command to call another subroutine, then at the next call to the interrupted subroutine, the return point address is entered into counter 1, i.e. the address of the command following the last command executed in the previous reading1); This is due to changes in the contents of block 5 during the operation of the device. If a return command consisting of only one opcode is read to register 6, then elements 16, 17 and 25 are opened. After starting the distributor 23, the contents of counter 1 are incremented by one. The pulses from the second, third, fourth and fifth outputs of the distributor 23 do not pass to the outputs of the And 12 15 elements. A pulse from the neck of the distributor 23 receives the address of the running coroutine to the register 8 through 11 And elements and a group of 4 elements OR. The impulse from the seventh output of the distributor 23 passes through the elements AND 17 and OR 2I to the input of the record of block 5. At the same time, the address of the entry point to the subroutine, the execution of which ends, is written to the same address of the entry point, i.e. the original contents of the corresponding cell are restored so that the next call to this subroutine will lead to the transfer of control to its entry point. A pulse at the eighth output of the distributor 23 causes the word to be read from the top of block 2, as a result of which the return point address is returned to the subroutine through which the 3 elements OR is entered into the counter 1, and into the register 7 through the group 26 elements OR is written the address of the entry point to this subroutine (i.e., the
предыдущее состо ние регистра 7), чем заврепшетс возврат от подпрограммы .the previous state of the register 7), than the return from the subroutine.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU843832959A SU1273929A1 (en) | 1984-12-29 | 1984-12-29 | Device for controlling subroutine call |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU843832959A SU1273929A1 (en) | 1984-12-29 | 1984-12-29 | Device for controlling subroutine call |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1273929A1 true SU1273929A1 (en) | 1986-11-30 |
Family
ID=21154470
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU843832959A SU1273929A1 (en) | 1984-12-29 | 1984-12-29 | Device for controlling subroutine call |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1273929A1 (en) |
-
1984
- 1984-12-29 SU SU843832959A patent/SU1273929A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 978150, кл. G 06 F 9/46, 1978. Авторское свидетельство СССР № 1144110, кл. С 06 F 9/46, 1984. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4989180A (en) | Dynamic memory with logic-in-refresh | |
US4044339A (en) | Block oriented random access memory | |
GB1324617A (en) | Digital processor | |
JPH02257494A (en) | Sequentral reading access for series memory having starting address determined by users | |
US4112513A (en) | Method for refreshing storage contents of MOS memories | |
US4016409A (en) | Longitudinal parity generator for use with a memory | |
SU1541619A1 (en) | Device for shaping address | |
SU1273929A1 (en) | Device for controlling subroutine call | |
US4479180A (en) | Digital memory system utilizing fast and slow address dependent access cycles | |
US4195339A (en) | Sequential control system | |
US4841487A (en) | Semiconductor memory device with address generator | |
SU1144110A1 (en) | Device for control of coroutines | |
JPS5927624A (en) | Integrated circuit possible for logical change | |
US5394364A (en) | High-speed memory readout circuit using a single set of data buffers | |
SU1649542A1 (en) | Subroutines controller | |
JPH0427636B2 (en) | ||
US3551898A (en) | Computer memory addressing | |
US4970684A (en) | Associative main store | |
SU1185325A1 (en) | Device for searching given number | |
US5542063A (en) | Digital data processing system with facility for changing individual bits | |
SU1437920A1 (en) | Associative storage | |
SU809182A1 (en) | Memory control device | |
SU1640713A1 (en) | Data selector | |
SU1536380A1 (en) | Microprogram control device | |
SU1149257A1 (en) | Instruction access driver |