Add basic file I/O and process control syscalls
This commit is contained in:
commit
254ec111cf
58
main.tex
Normal file
58
main.tex
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
\documentclass[a4paper]{article}
|
||||||
|
|
||||||
|
\usepackage{baskervald}
|
||||||
|
\usepackage{booktabs}
|
||||||
|
\usepackage{courierten}
|
||||||
|
\usepackage{cuted}
|
||||||
|
\usepackage{helvet}
|
||||||
|
\usepackage{mathtools}
|
||||||
|
\usepackage{sectsty}
|
||||||
|
\usepackage{tabularx}
|
||||||
|
|
||||||
|
\pagenumbering{gobble}
|
||||||
|
\setcounter{secnumdepth}{0}
|
||||||
|
|
||||||
|
\allsectionsfont{\sffamily}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\LARGE \bfseries Basic Linux Syscalls
|
||||||
|
\vspace{1em}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\section{File I/O}
|
||||||
|
|
||||||
|
\begin{tabularx}{\textwidth}{lr>{\ttfamily}cX}
|
||||||
|
\toprule
|
||||||
|
read & 0 & \%rdi & File descriptor to read from \\
|
||||||
|
& & \%rsi & Address of buffer \\
|
||||||
|
& & \%rdx & Number of bytes to read \\
|
||||||
|
\midrule
|
||||||
|
write & 1 & \%rdi & File descriptor to write to \\
|
||||||
|
& & \%rsi & Address of buffer \\
|
||||||
|
& & \%rdx & Number of bytes to write \\
|
||||||
|
\midrule
|
||||||
|
open & 2 & \%rdi & Address of path \\
|
||||||
|
& & \%rsi & Option flags \\
|
||||||
|
& & \%rdx & File creation mode \\
|
||||||
|
\midrule
|
||||||
|
close & 3 & \%rdi & File descriptor to close \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabularx}
|
||||||
|
|
||||||
|
\section{Process Control}
|
||||||
|
|
||||||
|
\begin{tabularx}{\textwidth}{lr>{\ttfamily}cX}
|
||||||
|
\toprule
|
||||||
|
fork & 57 & \textrm{\textendash} & No parameters \\
|
||||||
|
\midrule
|
||||||
|
execve & 59 & \%rdi & Address of path \\
|
||||||
|
& & \%rsi & Address of array of arguments \\
|
||||||
|
& & \%rsi & Address of array of environment variables \\
|
||||||
|
\midrule
|
||||||
|
exit & 60 & \%rdi & Exit code \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabularx}
|
||||||
|
|
||||||
|
\end{document}
|
Loading…
x
Reference in New Issue
Block a user