Skip to content

Instantly share code, notes, and snippets.

@lunixbochs
lunixbochs / calling_conventions.md
Created August 18, 2018 00:47 — forked from yamnikov-oleg/calling_conventions.md
Linux Syscalls Reference

Source: man syscall

Architecture calling conventions

Every architecture has its own way of invoking and passing arguments to the kernel. The details for various architectures are listed in the two tables below.

The first table lists the instruction used to transition to kernel mode, (which might not be the fastest or best way to transition to

// Bind F7 to 'step'
javascript:$(document).bind('keydown', function(e) { e.which == 118 && parse('s'); }); void(0)
// Add a 'readhex' command that works just like 'read' but dumps nothing but the hex
javascript:cpu._readhex =
function(e) {
if (!e[1]) return write(" Please give an expression to read the memory at."), void 0;
var t = cpu.to_addr(e[1]);
cpu.get("/cpu/dbg/memory/" + t + "?len=" + (parseInt(e[2], 16) + (15 - parseInt(e[2], 16) & 15) || 32), function(e) {
for (var n = atob(e.raw), i = "", o = " ", s = 0; s < n.length; s++) s % 2 == 0 && (o += " "), o += pad(n.charCodeAt(s).toString(16), 2), s % 8 == 7 && (i += " " + o + "\n", o = " ");