Annotation of OpenXM/src/kan96xx/plugin/sample.sm1, Revision 1.2
1.2 ! takayama 1: % $OpenXM$
1.1 maekawa 2: %% sample.sm1
3: [(plugin-sample)
4: [[$[(sample) op-code [ args ]] extension integer$]
5: [(See plugin/sample.h for the op-code.)]
6: [( 0 [ shared-stack ] extension )]
7: [( Initialization.)]
8: [( 3 [ ] extension)]
9: [( Add two elements on the top of the shared-stack and push the)]
10: [( result to the shared-stack.)]
11: [(init-sample : )]
12: [(test-sample : )]]
13: ] putUsages
14:
15:
16: /init-sample {
17: /plugin_sample_standard_operand_stack
18: [(StandardOperandStack)] system_variable
19: def
20: 100 newstack /plugin_sample_shared_stack set
21: [(sample) 0 [plugin_sample_shared_stack]] extension
22: } def
23:
24: /test-sample {
25: plugin_sample_shared_stack setstack
26: 1 2
27: pstack
28: plugin_sample_standard_operand_stack setstack
29: %% sync the stack pointer of shared-stack before calling sample.
30:
31: [(sample) 3 [ ]] extension pop %% add
32: ( --------------------------- ) message
33: plugin_sample_shared_stack setstack
34: pstack
35: plugin_sample_standard_operand_stack setstack
36:
37: } def
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>