當前位置

首頁 > 英語閱讀 > 英語故事 > 雙語暢銷書《艾倫圖靈傳》第8章:水銀延時線(24)

雙語暢銷書《艾倫圖靈傳》第8章:水銀延時線(24)

推薦人: 來源: 閱讀: 5.22K 次

But if a simple operation like multiplying floating-point numbers would require a set of instructions,

雙語暢銷書《艾倫圖靈傳》第8章:水銀延時線(24)
但是,如果像浮點數乘法這樣的簡單操作都需要整整一套指令的話,

then a procedure of any useful scale would involve putting many such sets of instructions together.

那麼任何實用的程序,都會產生一個很大規模的指令表。

He envisaged this not as a stringing together of tables, but as a hierarchy, in which subsidiary tables like MULTIP would serve a 'master' table.

因此,圖靈設計的指令表並不是線性的,而是具有層次體系的,在這個模式中,像MULTIP這樣的子表,將會服務於一個主表。

He gave a specific example of a master table called CALPOL which was to calculate the value of a fifteenth-order poly nominal in floating-point.

圖靈給出了一個主表的例子,叫作CALPOL,它用來計算一個浮點形式的15階多項式的值。

Every time a multiplication or addition was required, it had to call upon the services of a subsidiary table.

每次需要執行加法或乘法時,它就會調用子表,

The business of doing this calling up and sending back of subsidiary tables was something which itself required instructions, as he saw:

這種調用和返回,則是依靠機器本身內置的指令。圖靈認爲:

When we wish to start on a subsidiary operation we need only make a note of where we left off the major operation and then apply the first instruction of the subsidiary.

當我們需要調用子過程時,我們只需要標記一下我們離開主過程的位置,然後切到子表的第一條指令。

When the subsidiary is over we look up the note and continue with the major operation.

當子過程完成時,我們找到那個標記,返回到主過程。

Each subsidiary operation can end with instructions for the recovery of the note.

每一個子過程,都用"RET"指令作爲終止。

How is the burying and disinterring of the note to be done?

那麼如何做標記呢?

There are of course many ways.

辦法當然有很多。

One is to keep a list of these notes in one or more standard size delay lines the most recent last.

其中一個辦法是,將這些標記的隊列,存儲在一組標準型號的延遲線上……包括當前最近的標記。

The position of the most recent of these will be kept in a fixed TS (short delay line) and this reference will be modified every time a subsidiary is started or finished.

而最近的標記,會同時保持於一條特定的短程延遲線上,每次調用或終止子過程時,都會修改這個標記。

The burying and disinterring processes are fairly elaborate, but there is fortunately no need to repeat the instructions involved each time, the burying being done through a standard instruction table BURY, and the disinterring by the table UNBURY.

這個模式稍嫌複雜,但它的好處是,不需要將需要調用的過程反覆寫很多遍。調用的過程由一個標準指令表BURY來實現,返回則由UNBURY來實現。