comparison docs/lyx/asm.lyx @ 42:792da050d8c4 tip

more dox
author james <jb302@eecs.qmul.ac.uk>
date Tue, 22 Apr 2014 14:25:14 +0100
parents a9bf262f557b
children
comparison
equal deleted inserted replaced
41:a9bf262f557b 42:792da050d8c4
67 Assembler Design 67 Assembler Design
68 \end_layout 68 \end_layout
69 69
70 \begin_layout Standard 70 \begin_layout Standard
71 The assembler will take assembly source code as input and produce two output 71 The assembler will take assembly source code as input and produce two output
72 files: A binary executable and a debug file. 72 files: a binary executable and a debug file.
73 \end_layout 73 \end_layout
74 74
75 \begin_layout Standard 75 \begin_layout Standard
76 \begin_inset ERT 76 \begin_inset ERT
77 status open 77 status open
218 This file will essentially be the plain text source side by side with the 218 This file will essentially be the plain text source side by side with the
219 binary machine code and address for each instruction (represented as hexadecima 219 binary machine code and address for each instruction (represented as hexadecima
220 l for greater readability). 220 l for greater readability).
221 This file will provide the information needed for setting break pointers 221 This file will provide the information needed for setting break pointers
222 with the debugger later, it will also be generally useful for debugging 222 with the debugger later, it will also be generally useful for debugging
223 programs written in the assembler, and the assembler it self. 223 programs written in the assembler, and the assembler itself.
224 \end_layout 224 \end_layout
225 225
226 \begin_layout Standard 226 \begin_layout Standard
227 \begin_inset Newpage pagebreak 227 \begin_inset Newpage pagebreak
228 \end_inset 228 \end_inset
233 \begin_layout Subsection 233 \begin_layout Subsection
234 Language design in BNF syntax 234 Language design in BNF syntax
235 \end_layout 235 \end_layout
236 236
237 \begin_layout Standard 237 \begin_layout Standard
238 The ELB816 specification defines an assembly language in Backus Naur form, 238 The ELB816 specification [1] defines an assembly language in Backus Naur
239 however the assembler designed for this project differs slightly (more 239 form, however the assembler designed for this project differs slightly
240 details in Assembler Implementation below). 240 (more details in Assembler Implementation below).
241 Here is the language definition for this assembler: 241 Here is the language definition for this assembler:
242 \end_layout 242 \end_layout
243 243
244 \begin_layout Standard 244 \begin_layout Standard
245 \begin_inset ERT 245 \begin_inset ERT
452 \end_layout 452 \end_layout
453 453
454 \begin_layout Standard 454 \begin_layout Standard
455 The assembler is written in pure Python 2 using only the standard library. 455 The assembler is written in pure Python 2 using only the standard library.
456 It assembles the assembly the language described in the ELB816 specification 456 It assembles the assembly the language described in the ELB816 specification
457 with a few minor differences. 457 [1] with a few minor differences.
458 These differences are: 458 These differences are:
459 \end_layout 459 \end_layout
460 460
461 \begin_layout Itemize 461 \begin_layout Itemize
462 In-line arithmetic must be wrapped in curved brackets eg. 462 In-line arithmetic must be wrapped in curved brackets eg.
569 \begin_layout Standard 569 \begin_layout Standard
570 The following sections details the design and behavior of the assembler. 570 The following sections details the design and behavior of the assembler.
571 However it must be noted that these are abstract and high level descriptions 571 However it must be noted that these are abstract and high level descriptions
572 that do not fully explain minor routines, but give an overview of the entire 572 that do not fully explain minor routines, but give an overview of the entire
573 process. 573 process.
574 The full commented source code is provided with the supporting and should 574 The full commented source code is provided with the Supporting Material
575 be referenced for a deeper understanding of the program's operation. 575 and should be referenced for a deeper understanding of the program's operation.
576 576
577 \end_layout 577 \end_layout
578 578
579 \begin_layout Standard 579 \begin_layout Standard
580 \begin_inset Newpage pagebreak 580 \begin_inset Newpage pagebreak
1711 \begin_layout Standard 1711 \begin_layout Standard
1712 The assembler was tested by assembling the entire instruction table, while 1712 The assembler was tested by assembling the entire instruction table, while
1713 at the same time testing labels and directives. 1713 at the same time testing labels and directives.
1714 The test file was assembled and then the binary and .dsm files were inspected 1714 The test file was assembled and then the binary and .dsm files were inspected
1715 manually by checking their size and content. 1715 manually by checking their size and content.
1716 None of the this testing is automated and files are inspected by hand. 1716 None of this testing is automated and files are inspected by hand.
1717 The test files and results can be found in the Supporting Material 1717 The test files and results can be found in the Supporting Material.
1718 \end_layout 1718 \end_layout
1719 1719
1720 \end_body 1720 \end_body
1721 \end_document 1721 \end_document