// S : tags c min $TAGS // S : expect --result valid // S : cc -o test.bc $CC_OPT $file // S : verify $V_OPT test.bc #include #include #include char a[ 16 ]; __vm_pointer_t ptr; void poke( int off, int len, int val ) { __vm_poke( _VM_ML_User, ptr.obj, ptr.off + off, len, val ); } int main() { ptr = __vm_pointer_split( &a ); poke( 4, 8, 42 ); __vm_meta_t meta = __vm_peek( _VM_ML_User, ptr.obj, ptr.off + 8, 8 ); assert( meta.offset == 4 ); assert( meta.length == 8 ); assert( meta.value == 42 ); return 0; }