void FCSeek( void ) { //====================== // Seek to ObjPtr + offset. FCodeSeek( FCodeTell( GetU16() ) ); }
void DtDataDoLoop( void ) { //====================== // Process implied-DO for DATA statement. intstar4 e2; intstar4 e3; intstar4 iter_count; sym_id do_var; obj_ptr curr_fc; intstar4 e1; e3 = DXPop(); e2 = DXPop(); e1 = DXPop(); do_var = GetPtr(); do_var->u.ns.si.ms.u.value = &e1; iter_count = ( e2 - e1 + e3 ) / e3; curr_fc = FCodeTell( 0 ); while( iter_count > 0 ) { FCodeSeek( curr_fc ); FCodeSequence(); *do_var->u.ns.si.ms.u.value += e3; iter_count--; } }
void FCStartDataStmt( void ) { //========================= // Start DATA statement processing. FCTablePtr = DataJmpTab; DtConstList = FCodeTell( GetU16() - sizeof( unsigned_16 ) ); DtRepCount = 0; DtFlags = 0; DtItemSize = 0; DtStartSequence(); }
void FCAssignedGOTOList( void ) { //============================ // Perform assigned GOTO with list. sel_handle s; label_handle label; sym_id sn; sym_id var; obj_ptr curr_obj; var = GetPtr(); curr_obj = FCodeTell( 0 ); s = CGSelInit(); for(;;) { sn = GetPtr(); if( sn == NULL ) break; if( ( sn->u.st.flags & SN_IN_GOTO_LIST ) == 0 ) { sn->u.st.flags |= SN_IN_GOTO_LIST; label = GetStmtLabel( sn ); CGSelCase( s, label, sn->u.st.address ); } } label = BENewLabel(); CGSelOther( s, label ); CGSelect( s, CGUnary( O_POINTS, CGFEName( var, TY_INTEGER ), TY_INTEGER ) ); CGControl( O_LABEL, NULL, label ); BEFiniLabel( label ); FCodeSeek( curr_obj ); for(;;) { sn = GetPtr(); if( sn == NULL ) break; sn->u.st.flags &= ~SN_IN_GOTO_LIST; RefStmtLabel( sn ); } }