Debian Codegraph @

docs/sources/dasm.tex

raw
1 %&pdflatex
2 \documentclass[a4paper,12pt]{report}
3
4 \usepackage{dasm}
5 \usepackage{booktabs}
6 \usepackage{makeidx}
7 %\usepackage{subfigure}
8 \usepackage{tabularx}
9 \usepackage{url}
10 \usepackage{verbatim}
11 \usepackage{wrapfig}
12 \usepackage{xspace}
13 \usepackage{listings}
14 \usepackage[toc,page]{appendix}
15 \usepackage{pdflscape}
16 \usepackage{parskip}
17 \usepackage{bold-extra}
18 \usepackage{float}
19 \restylefloat{table}
20 \usepackage[T1]{fontenc}
21 \usepackage{inconsolata}
22 \usepackage{tikz}
23 \usepackage{wrapfig}
24 \usepackage{graphicx}
25 \usepackage{rotating}
26 \usepackage{dingbat}
27 \usepackage{pifont}
28 \newcommand{\xmark}{\ding{55}}
29 \usepackage{color,colortbl}
30 \usepackage{longtable}
31 \usepackage[pdfpagelabels,colorlinks,linkcolor=black,citecolor=brown,plainpages=false]{hyperref}
32 \usepackage{adjustbox}
33 \usepackage{colortbl}
34
35 \setlength{\headheight}{15pt}
36
37 % define \mono for all "computery" stuff
38 \let\mono\texttt
39 \renewcommand{\texttt}[1]{\mono{\textbf{\textcolor{fgreen}{#1}}}}
40
41 % if you don't like hyphenation...
42 \pretolerance=5500
43 \tolerance=1000
44 \emergencystretch=10pt
45
46 \definecolor{darkGreen}{rgb}{0,0.4,0}
47 \definecolor{gley}{rgb}{0.92,0.92,0.92}
48 \definecolor{brack}{rgb}{0.8,0.8,0.8}
49 \definecolor{pale}{rgb}{0.95,0.95,1}
50 \definecolor{gleen}{rgb}{0.95,1,0.95}
51 \definecolor{fgreen}{rgb}{0.45,0.6,0.45}
52 \definecolor{bug}{rgb}{0.9,0.3,0.3}
53 \definecolor{todo}{rgb}{0.5,0.5,0.1}
54 \definecolor{illegal}{rgb}{0.75,1,0.75}
55 \definecolor{unimplemented}{rgb}{1,0.2,0.2}
56 \definecolor{unstable}{rgb}{0.9,0.9,0.5}
57 \definecolor{unstablecertain}{rgb}{1,0.6,0}
58 \definecolor{ghost}{rgb}{0.65,0.65,0.65}
59 \definecolor{ghost2}{rgb}{0.85,0.85,0.85}
60 \definecolor{missing}{rgb}{0.85,0.85,1}
61 \definecolor{bblue}{rgb}{0,0,1}
62
63 % Define the assembler name as a command so it is consistent and easily changed
64 \newcommand{\dasm}{{\color{brown}\mono{\textbf{dasm}}}\xspace}
65
66 % define a "language" for dasm's directives and 6502 code
67 \lstset{
68 basicstyle=\ttfamily\linespread{1}\small,
69 backgroundcolor=\color{gleen},
70 frame=single,
71 breakatwhitespace=false,
72 %
73 % build a "language" for 6502 and the directives of dasm
74 % so that we get nice syntax highlighting of any code listings
75 % I've only added the ones I've needed - if anything is not highlighted, add it here
76 %
77 emph={%
78 % directives...
79 DC, dc, DS, ds, DV, dv%
80 HEX, hex, BYTE, byte, WORD, word, LONG, long,
81 REPEAT, repeat, REPEND, repend, %
82 SET, set, SETSTR, setstr, %
83 EQU, equ, EQM, eqm, EQV, eqv, %
84 SEG, seg, U, u, ORG, org, RORG, rorg, %
85 MAC, mac, MACRO, macro, MEXIT, mexit, ENDM, endm, %
86 INCLUDE, include, INCBIN, incbin, INCDIR, incdir, %
87 PROCESSOR, processor, SUBROUTINE, subroutine, %
88 IF, if, ELSE, else, EIF, eif, ENDIF, endif, IFCONST, ifconst, IFNCONST, ifnconst, %
89 ALIGN, align, ECHO, echo, ERR, err, %
90 % 6502 (very partial)...
91 ldx, stx, dex, inx, cpx, ldy, sty, dey, iny, cpy,%
92 lda, sta, pha, pla, cmp,
93 php, plp, rts, jsr, jmp, inc, dec, ora, eor, sbc, clc, sec, adc,%
94 sed, cli, sei, rti, bne, beq, bpl, bmi, bvc, bvs, bit, ror, rol, lsr, asl,%
95 },
96 emphstyle={\color{fgreen}\bfseries},
97 frameround=tttt,
98 }
99
100 \lstnewenvironment{code}[1][]%
101 {\noindent\minipage{\linewidth}\medskip
102 \lstset{framesep=5pt,xleftmargin=0pt,xrightmargin=0pt,basicstyle=\ttfamily\small,morecomment=[n][\color{gray}]{;}{\^^M},frame=single}}
103 {\endminipage}
104
105 \lstnewenvironment{outputx}[1][]%
106 {\noindent\minipage{\linewidth}\medskip
107 \lstset{framesep=5pt,xleftmargin=0pt,xrightmargin=0pt,basicstyle=\ttfamily\small\color{black},morecomment=[n][\color{gray}]{;}{\^^M},frame=single,backgroundcolor=\color{brack}}}
108 {\endminipage}
109
110 \lstnewenvironment{outputx2}[1][]%
111 {\noindent\minipage{\linewidth}\medskip
112 \lstset{framesep=5pt,xleftmargin=0pt,xrightmargin=0pt,basicstyle=\ttfamily\footnotesize\color{black},morecomment=[n][\color{gray}]{;}{\^^M},frame=single,backgroundcolor=\color{brack}}}
113 {\endminipage}
114
115 \lstnewenvironment{usage}[1][]%
116 {\noindent\minipage{\linewidth}\medskip
117 \lstset{framesep=5pt,xleftmargin=0pt,xrightmargin=0pt,basicstyle=\ttfamily\small,backgroundcolor=\color{pale},frame=single}}
118 {\endminipage}
119
120 \newcommand*{\authorimg}[1]{%
121 \raisebox{-.3\baselineskip}{%
122 \includegraphics[
123 height=\baselineskip,
124 width=\baselineskip,
125 keepaspectratio,
126 ]{#1}%
127 }%
128 }
129
130
131
132 \makeindex
133
134 \begin{document}
135
136 \pagenumbering{gobble}
137
138
139 \include{titlepage}
140 \include {changelog}
141
142 \cleardoublepage
143 \pagenumbering{roman} %i,ii,iii etc
144 \tableofcontents
145
146 \cleardoublepage
147 \pagenumbering{arabic} %1,2,3,4 ...
148
149
150 \include{introduction}
151 \include{manual}
152 \include{6502}
153 \include{68HC11}
154 \include{68705}
155 \include{6803}
156 \include{HD6303}
157 \include{F8}
158 \include{mc68hc908}
159 \include{machines}
160 \include{legal}
161 \phantomsection
162 \addcontentsline{toc}{chapter}{Index}
163 \printindex
164
165 \end{document}
166
167
168
169
170
171
172
173
174
175
176
177