Use multicols instead of twocolumn and adjust margins
This commit is contained in:
parent
22d14797eb
commit
b1d6ad2ace
42
main.tex
42
main.tex
@ -1,11 +1,13 @@
|
||||
\documentclass[a4paper,twocolumn]{article}
|
||||
\documentclass[a4paper]{article}
|
||||
|
||||
\usepackage{booktabs}
|
||||
\usepackage{baskervald}
|
||||
\usepackage{courierten}
|
||||
\usepackage{cuted}
|
||||
\usepackage[hmargin=2.5cm,vmargin=3.5cm]{geometry}
|
||||
\usepackage{helvet}
|
||||
\usepackage{mathtools}
|
||||
\usepackage{multicol}
|
||||
\usepackage{sectsty}
|
||||
\usepackage{tabularx}
|
||||
|
||||
@ -16,18 +18,20 @@
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{strip}
|
||||
\centering \LARGE \bfseries AMD64 Cheatsheet
|
||||
\begin{center}
|
||||
\LARGE \bfseries AMD64 Cheatsheet
|
||||
\vspace{1em}
|
||||
\end{strip}
|
||||
\end{center}
|
||||
|
||||
\newlength{\colwidth}
|
||||
\setlength{\colwidth}{\linewidth}
|
||||
\addtolength{\colwidth}{-0.5\columnsep}
|
||||
\begin{multicols}{2}
|
||||
|
||||
\section{Instructions}
|
||||
\newlength{\colwidth}
|
||||
\setlength{\colwidth}{\linewidth}
|
||||
\addtolength{\colwidth}{-0.5\columnsep}
|
||||
|
||||
\noindent\begin{tabularx}{\colwidth}{>{\ttfamily}l>{\ttfamily}l>{$}X<{$}}
|
||||
\section{Instructions}
|
||||
|
||||
\noindent\begin{tabularx}{\colwidth}{>{\ttfamily}l>{\ttfamily}l>{$}X<{$}}
|
||||
\toprule
|
||||
\multicolumn{3}{>{\sffamily\bfseries}c}{Arithmetic \& Logic} \\
|
||||
\midrule
|
||||
@ -79,9 +83,9 @@
|
||||
callq & l & \textrm{push \texttt{rip} then jump to \texttt{l}} \\
|
||||
retq & & \textrm{pop to \texttt{rip}} \\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
\end{tabularx}
|
||||
|
||||
\noindent\begin{tabularx}{\colwidth}{lX}
|
||||
\noindent\begin{tabularx}{\colwidth}{lX}
|
||||
\toprule
|
||||
\multicolumn{2}{>{\sffamily\bfseries}c}{Addressing Modes} \\
|
||||
\midrule
|
||||
@ -89,11 +93,11 @@
|
||||
Register & \texttt{\%R} \\
|
||||
Memory & \texttt{[C\textsubscript{d}](\%R\textsubscript{b}[,\%R\textsubscript{i}[,C\textsubscript{s}])} \\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
\end{tabularx}
|
||||
|
||||
\[\textrm{Memory Address} = C_d + R_b + C_sR_i\]
|
||||
\[\textrm{Memory Address} = C_d + R_b + C_sR_i\]
|
||||
|
||||
\noindent\begin{center}
|
||||
\noindent\begin{center}
|
||||
\begin{tabular}{cl}
|
||||
\toprule
|
||||
\multicolumn{2}{>{\sffamily\bfseries}c}{Suffixes} \\
|
||||
@ -115,11 +119,11 @@
|
||||
OF & Overflow \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
\end{center}
|
||||
|
||||
\section{Registers}
|
||||
\section{Registers}
|
||||
|
||||
\begin{tabularx}{\colwidth}{>{\ttfamily}c>{\ttfamily}c>{\ttfamily}c>{\ttfamily}cX}
|
||||
\begin{tabularx}{\colwidth}{>{\ttfamily}c>{\ttfamily}c>{\ttfamily}c>{\ttfamily}cX}
|
||||
\toprule
|
||||
\multicolumn{5}{>{\sffamily\bfseries}c}{Standard} \\
|
||||
\midrule
|
||||
@ -146,6 +150,8 @@
|
||||
r14 & r14d & r14w & r14b & \\
|
||||
r15 & r15d & r15w & r15b & \\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
\end{tabularx}
|
||||
|
||||
\end{multicols}
|
||||
|
||||
\end{document}
|
||||
|
Loading…
x
Reference in New Issue
Block a user