Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As stated in a <a href="https://stackoverflow.com/questions/7935054/how-to-modify-erlang-assembly-are-any-resources-available">similar SO-question</a> and <a href="http://www.erlang.org/doc/man/compile.html" rel="nofollow noreferrer">the erlang-documentation</a>:</p> <blockquote> <p>Note that the format of assembler files is not documented, and may change between releases - this option is primarily for internal debugging use.</p> </blockquote> <p>If you realy want to know what's happening, it seems you have to track it down in the source-code. Most of the work is done in erts/emulator/beam/beam_emu.c (I've looked into otp_src_R15B02): </p> <ol> <li><code>call_ext</code>: set the <a href="http://www.erlang.org/doc/apps/erts/crash_dump.html#id71778" rel="nofollow noreferrer">continuation pointer</a> to <em>current instruction+2</em> and dispatch/ call external. <code>call_ext_only</code>: dont touch CP, just dispatch. (~line 1520)</li> <li>both allocate memory but <code>allocate_zero</code> also initializes it to <code>0x00</code> (~line 334).</li> <li><code>test_heap</code>: Check if Nh words of heap are available; if not, do a garbage collection. (~line 390)</li> <li><code>allocate(StackNeeded, NumberOfRegistersToPreserve)</code> (~line 316)</li> </ol> <p>The whole file is a compound of <em>#defines</em> and <em>gotos</em>, some macros are defined inside ops.tab in the same folder. I'm not an expert in erlang-asm either and might have missed something. Please keep that in mind and cross-check my statements before you start to work with them.</p> <p>To quote TamasNagy from the linked SO-awnser:</p> <blockquote> <p>I'm not sure what are you trying to achieve with this, but core erlang might be a better level to do code manipulation. </p> </blockquote> <p>Please look there for further information. Erlang have it strengths but documentation is not one of them.</p> <p>regards.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload