[BACK]Return to sample.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / plugin

File: [local] / OpenXM / src / kan96xx / plugin / sample.sm1 (download)

Revision 1.2, Sun Jan 16 07:55:48 2000 UTC (24 years, 4 months ago) by takayama
Branch: MAIN
CVS Tags: maekawa-ipv6, R_1_3_1-2, RELEASE_20000124, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, RELEASE_1_1_3, RELEASE_1_1_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.1: +1 -0 lines

Congratulation of sm1 version 3.* !

% $OpenXM: OpenXM/src/kan96xx/plugin/sample.sm1,v 1.2 2000/01/16 07:55:48 takayama Exp $
%% sample.sm1
[(plugin-sample)
 [[$[(sample) op-code [ args ]] extension integer$]
  [(See plugin/sample.h for the op-code.)]
  [(       0       [ shared-stack ] extension )]
  [(       Initialization.)]
  [(       3       [ ] extension)]
  [(       Add two elements on the top of the shared-stack and push the)]
  [(       result to the shared-stack.)]
  [(init-sample  :  )]
  [(test-sample  :  )]]
] putUsages


/init-sample {
  /plugin_sample_standard_operand_stack 
    [(StandardOperandStack)] system_variable
  def
  100 newstack /plugin_sample_shared_stack set
  [(sample) 0 [plugin_sample_shared_stack]] extension
}  def

/test-sample {
  plugin_sample_shared_stack setstack
  1 2 
  pstack
  plugin_sample_standard_operand_stack  setstack 
  %% sync the stack pointer of shared-stack before calling sample.

  [(sample) 3 [ ]] extension pop  %% add
  ( --------------------------- ) message
  plugin_sample_shared_stack setstack
  pstack
  plugin_sample_standard_operand_stack  setstack 

} def