annotate doc/lwasm.txt @ 96:7fbccdd1defb

Added doc subdirectory to distribution
author lost
date Sat, 17 Jan 2009 07:09:02 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
96
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
1 LWASM 2.0
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
2 =========
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
3
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
4 LWASM is a cross-assembler for the MC6809 and HD6309 CPUs. It should
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
5 assemble most reasonable EDTASM compatible source code. This document is not
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
6 intended to teach assembly language for these CPUs but rather to document
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
7 the behaviour of LWASM.
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
8
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
9
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
10 TARGETS
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
11 -------
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
12
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
13 LWASM supports several targets for assembly. These are decb, raw, and obj.
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
14
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
15 The raw target generates a raw binary output. This is useful for building
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
16 ROMs and other items that are not intended to be loaded by any kind of
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
17 loader. In this mode, the ORG directive is merely advisory and does not
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
18 affect the output except for the addresses symbols are defined to have.
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
19
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
20 The decb target generates output that can be loaded with the CLOADM or LOADM
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
21 commands in Color Basic. There will be approximately one segment in the
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
22 output file for every ORG statement after which any code is emitted. (That
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
23 is, two ORG statements in a row will not generate two output segments.)
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
24 This is approximately equivalent to running A/AO in EDTASM.
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
25
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
26 The obj target generates output that is intended to be linked later with
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
27 LWLINK. This target disallows the use of ORG for defining anything other
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
28 than constants. In this target, source files consist of a number of sections
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
29 (SECTION/ENDSECTION). Nothing outside of a section is permitted to cause any
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
30 output at all. Use of an ORG statement within a section is an error. This
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
31 target also permits tagging symbols for export (EXPORT) and marking a symbol
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
32 as externally defined (IMPORT/EXTERN). The linker will resolve any external
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
33 references at link time. Additionally, any inter-section references will be
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
34 resolved by the linker. All code in each section is assembled with an
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
35 implicit origin of 0. SETDP has no effect because the assembler has no idea
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
36 what address the linker will assign to the code when it is linked. Any
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
37 direct addressing modes will default to extended to allow for the linker to
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
38 perform relocations. Intersegment references and external references will
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
39 use 16 bit relative addressing but intrasegment internal references may use
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
40 8 bit relative addressing. Forced 8 bit direct modes are probably an error
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
41 but are permitted on the theory that the programmer might know something the
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
42 assembler doesn't.
7fbccdd1defb Added doc subdirectory to distribution
lost
parents:
diff changeset
43