2 The goal of this assembler is to eventually not be simply an M68K
3 assembler, but to be relatively easily retargetable. Also, this
4 assembler should be callable from other CL applications, as well as
5 executable as a stand-alone program.
8 The a.out object format supported here and by st-linker is not really
9 quite exactly a.out. It's close, though.
12 To build this from scratch, you'll need to do something like:
13 (in the m68k-asm directory)
15 CL-USER> (asdf:oos 'asdf:load-op :lalr-parser-generator)
16 CL-USER> (load "m68k-grammar")
17 CL-USER> (with-open-file (stream "parser.lisp" :direction :output)
18 (lalr:make-parser m68k-asm::*m68k-asm-grammar*
19 :package (find-package "M68K-ASSEMBLER")
24 Things to add in the grammar/parser/lexer:
26 Support for ' (single ASCII character?) -- only because the
27 book I have says it's part of Motorola's standard. Should it
28 behave like double-quotes or what?
29 Support for floats (once FPU instructions are supported).
30 Line continuations with "\".
34 Things to add in the assembler:
36 Checking ranges of types, signed indices, etc.
37 Also, type checking information stored in the symbol table.
38 Output listings (with cycle counts, et cetera).
39 Support for later chips in the m68k line, and enabling/disabling
40 allowance of their added instructions.
41 Change lookup tables so that on load, they get converted to hash
42 tables or whatever's appropriate. [half-done]
43 Nifty local labels a-la GNU as or similar. (0f, 1b, etc)
44 BRA.S (currently you have to say BRA.B).
45 CL-style macros? (that would be cool!)
47 Output in object formats other than A.OUT.
48 Optimizations/data flow analysis.
49 Optional lispy object format. (see st-linker README)
50 Stuff to make guesses about pairs of MOVEM instructions at head of
51 function and just before RTS/RTE, and warn the user if they
55 THINGS TO DO BEFORE RELEASE
57 - remove debugging output.
58 - add a decent warning/error display and logging system.
59 - compile list of known issues, try to resolve.
60 - put together a basic automated test suite.
61 (once object format has settled down, start a set of regression files,
62 with sane output verified by hand.)
64 - once a better warning system is in place, allow routines like
65 MODIFIER-BITS to guess the size of underspecified operations, and warn
66 about them at suitable warning levels.
67 - test with sourcer68 output of various files.
68 - Things to test about relocation:
69 are 8-bit indirect displacements being relocated correctly?
70 verify all possible relocation combinations.
71 - Update dependencies in ASDF file so that it compiles without warnings.
72 - *last-label* feels like a hack. See if there's an alternative.
73 - add raw binary output. (actually, unnecessary given the binary
74 target in the linker.)
75 - DC needs some serious cleanups.
76 - undo some of the intentional braindamage induced to make us closer
78 - various pseudo-ops need to work on list of operands rather than
80 - stifle horrible potential bug with MOVEQ optimizations and negative
81 numbers/sign extension.
87 - macro parameters are broken. At least, <foo> style ones are still
88 broken. Also, \n always expands to an absolute symbol, so you can't
89 use a register. [assembler]
90 - size output is broken if ORG is used.
91 - Unfinished pseudo-ops: (all are quite easy)
96 - branch-displacement-bits will behave badly in some unusual situations.
97 It's ugly and needs to be cleaned up.
98 - requires that the file end with a newline, and there is no warning
99 that the last line is ignored.
102 KNOWN MAJOR INCOMPATIBILITIES WITH DEVPAC
104 These are things which aren't likely to change soon.
108 - we don't support < or > embedded in macro parameters which are
109 already wrapped in < and >. (eg: "<foo>>>>2>" => "foo>>2") [lexer]
112 ENHANCEMENTS FROM DEVPAC
114 - We support EXTERN/GLOBAL as synonyms for XREF/XDEF,
115 respectively. Also ALIGN as a simple version of CNOP.