, .
! , :
{module, hasMsg}.
{exports, [{module_info,0},{module_info,1},{hasMsg,0},{peekMsg,1},{lastMsg,1}]}.
{attributes, []}.
{labels, 17}.
{function, hasMsg, 0, 2}.
{label,1}.
{func_info,{atom,hasMsg},{atom,hasMsg},0}.
{label,2}.
{loop_rec,{f,4},{x,0}}.
{move,{atom,true},{x,0}}.
return.
{label,3}.
{loop_rec_end,{f,2}}.
{label,4}.
timeout.
{move,{atom,false},{x,0}}.
return.
{function, peekMsg, 1, 6}.
{label,5}.
{func_info,{atom,hasMsg},{atom,peekMsg},1}.
{label,6}.
{loop_rec,{f,8},{x,0}}.
return.
{label,7}.
{loop_rec_end,{f,6}}.
{label,8}.
timeout.
return.
{function, lastMsg, 1, 10}.
{label,9}.
{func_info,{atom,hasMsg},{atom,lastMsg},1}.
{label,10}.
{loop_rec,{f,12},{x,0}}.
{test,is_eq_exact,{f,11},[]}.
{label,11}.
{loop_rec_end,{f,10}}.
{label,12}.
timeout.
return.
{function, module_info, 0, 14}.
{label,13}.
{func_info,{atom,hasMsg},{atom,module_info},0}.
{label,14}.
{move,{atom,hasMsg},{x,0}}.
{call_ext_only,1,{extfunc,erlang,get_module_info,1}}.
{function, module_info, 1, 16}.
{label,15}.
{func_info,{atom,hasMsg},{atom,module_info},1}.
{label,16}.
{move,{x,0},{x,1}}.
{move,{atom,hasMsg},{x,0}}.
{call_ext_only,2,{extfunc,erlang,get_module_info,2}}.
: erlc +from_asm hasMsg.S.
hasMsg :
hasMsg/0 , .peekMsg/1 . , .lastMsg/1 . , .