public
Created

mpegts_alloc:new(1000000). returns preallocated binary with size 1000000 that can be filled with your data.

  • Download Gist
mpegts_alloc.S
GAS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
{module, mpegts_alloc}. %% version = 0
 
{exports, [{module_info,0},{module_info,1},{new,1}]}.
 
{attributes, []}.
 
{labels, 7}.
 
 
{function, new, 1, 2}.
{label,1}.
{line,[{location,"mpegts_alloc.S",13}]}.
{func_info,{atom,mpegts_alloc},{atom,new},1}.
{label,2}.
{line,[{location,"mpegts_alloc.S",16}]}.
{test,is_integer,{f,1},[{x,0}]}.
{test,is_ge,{f,1},[{x,0},{integer,0}]}.
bs_init_writable.
return.
 
 
{function, module_info, 0, 4}.
{label,3}.
{line,[]}.
{func_info,{atom,t},{atom,module_info},0}.
{label,4}.
{move,{atom,t},{x,0}}.
{line,[]}.
{call_ext_only,1,{extfunc,erlang,get_module_info,1}}.
 
 
{function, module_info, 1, 6}.
{label,5}.
{line,[]}.
{func_info,{atom,t},{atom,module_info},1}.
{label,6}.
{move,{x,0},{x,1}}.
{move,{atom,t},{x,0}}.
{line,[]}.
{call_ext_only,2,{extfunc,erlang,get_module_info,2}}.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.