示例
假设有一个显示例程, 它每次执行时都计算并保存一个不同的三维变换矩阵. (它可能被编写成让一个物体看起来在旋转.) 该例程的用户通常会希望先设置好这些矩阵, 然后"放手让它跑"十次或二十次 (或更多次) 执行. 这可以如下完成:
SETUP,,0
+-->length,,2000 ; length of display pgm
| - ; large output area
| | -----
| | -----
+--> -----
| program
| -----
| -----
-
MODESET,,5 ; auto transmit in ARDS mode
0,,1000+length ; arguments for transmit
; meaning "current contents
; of output area"
EXQ,,10 ; execute 10 times, sending
; the data each time
UPDATE,,20 ; update, then execute 20 times
8,,address of matrix ; arguments for update, to
- ; change a matrix
|
8 words - new matrix
|
_
etc.
对于本例, 图形加载器的输出如下:
ACKNOWLEDGE setup,setup :(See description of ACKN
; for format in word)
ACKNOWLEDGE modeset,modeset
ACKNOWLEDGE transmit, exq
output,,1 ; output in ARDS mode
leng1,,0
_
|
- data
|_
ACKNOWLEDGE transmit,exq
output,,1
leng2,,0
_
|
- data
|_
. (in total, there are 10 sets of output.)
.
.
ACKNOWLEDGE update,update
ACKNOWLEDGE transmit, update
output,,1
leng11,,0
-
|
- data
|
-
. (in total, there are 20 sets of output.)
.
.