static int tty_setWinPos_24(struct pvm_object me, struct data_area_4_thread *tc ) { DEBUG_INFO; struct data_area_4_tty *da = pvm_data_area( me, tty ); int n_param = POP_ISTACK; CHECK_PARAM_COUNT(n_param, 2); int y = POP_INT(); int x = POP_INT(); w_move( &(da->w), x, y ); SYSCALL_RETURN_NOTHING; }
static int gotoxy_19(struct pvm_object me , struct data_area_4_thread *tc ) { struct data_area_4_tty *da = pvm_data_area( me, tty ); DEBUG_INFO; int n_param = POP_ISTACK; CHECK_PARAM_COUNT(n_param, 2); int goy = POP_INT(); int gox = POP_INT(); da->x = da->font_width * gox; da->y = da->font_height * goy; SYSCALL_RETURN_NOTHING; }
static int setcolor_21(struct pvm_object me , struct data_area_4_thread *tc ) { (void) me; //struct data_area_4_tty *da = pvm_data_area( me, tty ); DEBUG_INFO; int n_param = POP_ISTACK; CHECK_PARAM_COUNT(n_param, 1); int color = POP_INT(); (void) color; //int attr = (short)color; // TODO colors from attrs //printf("setcolor font %d,%d\n", da->font_width, da->font_height ); SYSCALL_RETURN_NOTHING; }
//#define MAX_SYS_ARG 16 // interlock code of VM blocking syscall (part of .internal.connection class) implementation // called from si_connection_13_blocking, calls passed syscall worker implemented in cn_*.c in kernel int vm_syscall_block( pvm_object_t this, struct data_area_4_thread *tc, pvm_object_t (*syscall_worker)( pvm_object_t , struct data_area_4_thread *, int nmethod, pvm_object_t arg ) ) { // NB args must be popped before we push retcode int n_param = POP_ISTACK; CHECK_PARAM_COUNT(n_param, 2); //if( n_param < 1 ) SYSCALL_THROW(pvm_create_string_object( "blocking: need at least 1 parameter" )); int nmethod = POP_INT(); pvm_object_t arg = POP_ARG; // push zero to obj stack pvm_ostack_push( tc->_ostack, pvm_create_null_object() ); pvm_exec_save_fast_acc(tc); // Before snap if(phantom_virtual_machine_stop_request) { SHOW_FLOW0( 5, "VM thread will die now"); hal_exit_kernel_thread(); } #if NEW_SNAP_SYNC