From a1ef38622fc0369442757f8600858ec23c68bdb2 Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Thu, 9 Oct 2014 17:37:31 +0200 Subject: [PATCH] Added Example for future documentation --- source/avremu.tex | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 source/avremu.tex diff --git a/source/avremu.tex b/source/avremu.tex new file mode 100644 index 0000000..1d7f95b --- /dev/null +++ b/source/avremu.tex @@ -0,0 +1,50 @@ +\documentclass{article} +\usepackage{avremu} +\usepackage{listings} +\usepackage{hyperref} +\usepackage{filecontents} +\usepackage{tcolorbox} + +\begin{filecontents*}{hello-world.c} +#include + +int +main(void) +{ + char *str = "Hello World!"; + char *p = str; + while (*p) { + UDR = *p++; + } + asm volatile ("break;"); +} +\end{filecontents*} + +\title{The \texttt{avremu} Package} +\author{Christian Dietrich\\ +\url{stettberger@dokucode.de}} + +\begin{document} + +\maketitle + +\begin{tcolorbox} + \lstinputlisting[language=C]{hello-world.c} + \tcblower + \begin{lstlisting}[language=TeX] +\avrloadc{hello-world.c} +\avrrun +UDR='\avrUDR' in \avrinstrcount\ instructions +\end{lstlisting} +\end{tcolorbox} +\begin{tcolorbox} +\avrloadc{hello-world.c}\avrrun +UDR='\avrUDR' in \avrinstrcount\ instructions +\end{tcolorbox} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: