Annotation of OpenXM/doc/oxlib/test1.c, Revision 1.1
1.1 ! takayama 1: /* $OpenXM$ */
! 2: #include <stdio.h>
! 3: #include "oxasir.h"
! 4:
! 5: main() {
! 6: hoge();
! 7: }
! 8:
! 9: hoge() {
! 10: /* (CMO_ZZ,12); */
! 11: unsigned char cmo0[]=
! 12: {00, 00, 00, 0x14,
! 13: 00, 00, 00, 01, 00, 00, 00, 0xc};
! 14:
! 15: /* (CMO_ZZ,8) */
! 16: unsigned char cmo1[] =
! 17: {00, 00, 00, 0x14,
! 18: 00, 00, 00, 01, 00, 00, 00, 8};
! 19:
! 20: /* (CMO_INT32,2); */
! 21: unsigned char cmo2[] =
! 22: { 00, 00, 00, 02, 00, 00, 00, 02};
! 23:
! 24: /* (CMO_STRING,"igcd") */
! 25: unsigned char cmo3[] =
! 26: {00, 00, 00, 04, 00, 00, 00, 04,
! 27: 0x69,0x67,0x63,0x64 };
! 28: unsigned char cmo[1024];
! 29: int i;
! 30:
! 31: asir_ox_init(0);
! 32: asir_ox_push_cmo(cmo0);
! 33: asir_ox_push_cmo(cmo1);
! 34: asir_ox_push_cmo(cmo2);
! 35: asir_ox_push_cmo(cmo3);
! 36:
! 37: asir_ox_push_cmd(SM_executeFunction); /* execute function */
! 38:
! 39: asir_ox_pop_cmo(cmo, 20);
! 40:
! 41: for (i=0; i<20; i++) {
! 42: printf(" %2x ",cmo[i]);
! 43: }
! 44: printf("\n");
! 45: }
! 46:
! 47:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>