2 #if( ! @defined( fsm_hhf ))
5 #includeonce( "hla.hhf" )
10 current_state : dword;
13 #macro fsm_callback ( _cbfunc_, _extname_ ) ;
21 @external( _extname_ );
25 #macro fsm_callback2 ( _cbfunc_, _extname_ ) ;
32 @external( _extname_ );
36 #macro fsm_advance ( _fsm_, _event_, _ctx_ ) :
45 mov ( (type myfsm [ebx]).current_state, eax );
51 #keyword tr ( _state_, _ev_, _new_state_, _cbfunc_ ) :
60 mov ( _new_state_, eax );
62 mov ( eax, (type myfsm [ebx]).current_state );
72 #keyword tr2 ( _state_, _ev_, _new_state_, _cbfunc_ ) :
81 mov ( eax, (type myfsm [ebx]).current_state );
83 push ( edx ); // _ctx_
85 call ( _cbfunc_ ); // _cb_func_ ( _ev_, _ctx_ );
90 #terminator end_fsm_advance;