Files
eth-summaries/semester3/spca/spca-summary.tex
2026-01-08 11:15:05 +01:00

125 lines
4.6 KiB
TeX

\documentclass{article}
\input{~/projects/latex/dist/full.tex}
\setup{Systems Programming and Computer Architecture}
\usepackage{lmodern}
\setFontType{sans}
\newcommand{\lC}{\texttt{C}}
\newcommand{\content}[1]{\shade{blue}{#1}}
\newcommand{\warn}[1]{\bg{orange}{#1}}
\newcommand{\danger}[1]{\shade{red}{#1}}
\setNumberingStyle{0}
\begin{document}
\startDocument
\usetcolorboxes
\vspace{2cm}
\begin{Huge}
\begin{center}
TITLE PAGE COMING SOON
\end{center}
\end{Huge}
\vspace{4cm}
\begin{center}
\begin{Large}
``\textit{If you are using CMake to solve the exercises... First off, sorry that you like CMake}``
\end{Large}
\hspace{3cm} - Timothy Roscoe, 2025
\end{center}
\vspace{3cm}
\begin{center}
HS2025, ETHZ\\[0.2cm]
\begin{Large}
Summary of the Lectures and Lecture Slides
\end{Large}\\[0.2cm]
\end{center}
% ╭────────────────────────────────────────────────╮
% │ Quotes │
% ╰────────────────────────────────────────────────╯
\input{parts/quotes.tex}
% ╭────────────────────────────────────────────────╮
% │ Table of contents │
% ╰────────────────────────────────────────────────╯
\newpage
\printtoc{magenta}
% ╭────────────────────────────────────────────────╮
% │ Content │
% ╰────────────────────────────────────────────────╯
% ── Intro to x86 asm ────────────────────────────────────────────────
\newsection
\section{Introduction}
This summary tries to summarize everything that is important to know for this course.
It aims to be a full replacement for the slides, but as with all my summaries, there may be missing or incorrect information in here,
so use at your own risk. You have been warned!
The summary does \textit{not} follow the order the lecture does.
This is to make related information appear more closely to each other than they have in the lecture and the summary assumes you have already seen
the concepts in the lectures or elsewhere (or are willing to be thrown in the deep end).
The target semester for this summary is HS2025, so there might have been changes in your year.
If there are changes and you'd like to update this summary, please open a pull request in the summary's repo at
\begin{center}
\hlurl{https://github.com/janishutz/eth-summaries}
\end{center}
\newsection
\section{x86 Assembly}
\input{parts/00_asm/00_intro.tex}
\input{parts/00_asm/01_syntax.tex}
\input{parts/00_asm/02_data-types.tex}
\input{parts/00_asm/03_operations.tex}
% ── Intro to C ──────────────────────────────────────────────────────
\newsection
\section{The C Programming Language}
\input{parts/01_c/00_intro.tex}
\input{parts/01_c/01_basics/00_intro.tex}
\input{parts/01_c/01_basics/01_control-flow.tex}
\input{parts/01_c/01_basics/02_declarations.tex}
\input{parts/01_c/01_basics/03_operators.tex}
\input{parts/01_c/01_basics/04_arrays.tex}
\input{parts/01_c/01_basics/05_strings.tex}
\input{parts/01_c/01_basics/06_integers.tex}
\input{parts/01_c/01_basics/07_pointers.tex}
\input{parts/01_c/02_preprocessor.tex}
\input{parts/01_c/03_memory/00_intro.tex}
\input{parts/01_c/03_memory/01_allocation.tex}
\input{parts/01_c/03_memory/02_gc.tex}
\input{parts/01_c/03_memory/03_pitfalls.tex}
% ── Hardware recap ──────────────────────────────────────────────────
\newsection
\section{Hardware}
\input{parts/03_hw/00_intro.tex}
Remember: Rust and the like have an \texttt{unsafe} block... \lC's equivalent to this is
\begin{code}{c}
int main( int argc, char *argv[] ) {
// Unsafe code goes here
}
\end{code}
i.e. \bi{YOU are the one that makes \lC\ code safe!}
\end{document}