Fixed a bad bug where XDEFs in a section other than the one where the symbol lives...
[m68k-assembler.git] / README
blob21978bb3953cc5bad5ac9c320eed1f5aae241fa7
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")
20                               :stream stream))
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 "\".
31 Literate input.
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.
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!)
46 Debugger info.
47 Output in object formats other than A.OUT.
48 Optimizations/data flow analysis.
49 Optional lispy object format.  (see st-linker README)
50 ADDI instead of ADD in certain cases.
53 THINGS TO DO BEFORE RELEASE
55 - remove debugging output.
56 - add a decent warning/error display and logging system.
57 - compile list of known issues, try to resolve.
58 - put together a basic automated test suite.
59   (once object format has settled down, start a set of regression files,
60    with sane output verified by hand.)
61 - skim all XXXs.
62 - once a better warning system is in place, allow routines like
63   MODIFIER-BITS to guess the size of underspecified operations, and warn
64   about them at suitable warning levels.
65 - test with sourcer68 output of various files.
66 - Things to test about relocation:
67         are 8-bit indirect displacements being relocated correctly?
68         verify all possible relocation combinations.    
69 - Update dependencies in ASDF file so that it compiles without warnings.
70 - *last-label* feels like a hack.  See if there's an alternative.
71 - add raw binary output.  (also, to linker.)
72 - DC needs some serious cleanups.
73 - undo some of the intentional braindamage induced to make us closer
74   to devpac.
75 - various pseudo-ops need to work on list of operands rather than
76   single operand.
80 KNOWN ISSUES
82 - macro parameters are broken.  At least, <foo> style ones are still
83   broken.  [assembler]
84 - size output is broken if ORG is used.
85 - Unfinished pseudo-ops: (all are quite easy)
86         EQUR
87         DCB
88         END
89         IFxx
90 - branch-displacement-bits will behave badly in some unusual situations.
91   It's ugly and needs to be cleaned up.
92 - requires that the file end with a newline, and there is no warning
93   that the last line is ignored.
96 KNOWN MAJOR INCOMPATIBILITIES WITH DEVPAC
98 These are things which aren't likely to change soon.
100 Macros:
102 - we don't support < or > embedded in macro parameters which are
103   already wrapped in < and >.  (eg: "<foo>>>>2>" => "foo>>2") [lexer]
106 ENHANCEMENTS FROM DEVPAC
108 - We support EXTERN/GLOBAL as synonyms for XREF/XDEF,
109   respectively.  Also ALIGN as a simple version of CNOP.