Skip to content

Commit

Permalink
A few more opcodes explained
Browse files Browse the repository at this point in the history
  • Loading branch information
kvakvs authored and happi committed May 24, 2017
1 parent ed08bfe commit ee7a010
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions chapters/ap-beam_instructions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ include::opcodes_doc.asciidoc[]
=== Specific Instructions

Argument types
[options="header"]
[options="header,autowidth"]
|==================================================
|Type | Explanation
|a| An immediate atom value, e.g. 'foo'
Expand All @@ -521,19 +521,19 @@ Argument types

List of all BEAM Instructions

[options="header"]
[options="header,autowidth"]
|===========
|Instruction | Arguments | Explanation
|allocate | t t | Allocate some words on stack
|allocate_heap | t I t | Allocate some words on the heap
|allocate_heap_zero | t I t | Allocate some heap and set the words to NIL
|allocate_init | t I y |
|allocate_zero | t t | Allocate some stack and set the words to NIL
|apply | I |
|apply_last | I P |
|apply | I | Apply function object (in x[Arity]) with args (in x[0..Arity-1])
|apply_last | I P | Same as `apply` but does not save the CP and `deallocates` P words
|badarg | j | Create a `badarg` error
|badmatch | rxy | Create a `badmatch` error
|bif1 | f b s d |
|bif1 | f b s d | Calls a bif with 1 argument, on fail jumps to `f`
|bif1_body | b s d |
|bs_context_to_binary | rxy |
|bs_put_string | I I |
Expand Down Expand Up @@ -730,13 +730,13 @@ List of all BEAM Instructions
|move_return | xcn r |
|move_x1 | c |
|move_x2 | c |
|node | rxy | Get current node name
|node | rxy | Get `rxy` to the atom, current node name
|put_list | s s d | Construct a list cell from a head and a tail
|raise | s s | Raise an exception of given type
|recv_mark | f |
|remove_message | |
|return | | Jump to the address in CP, set CP to 0
|self | rxy |
|self | rxy | Set `rxy` to the pid of the current process
|send | |
|set_tuple_element | s d P | Destructively update a tuple element by index
|system_limit | j |
Expand Down

0 comments on commit ee7a010

Please sign in to comment.