2019-08-24 07:46:29 +00:00
|
|
|
XASM (1)
|
|
|
|
========
|
|
|
|
:doctype: manpage
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
xasm - 6502 cross-assembler
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
*xasm* '[OPTIONS] SOURCE_FILE'
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
*xasm* is a cross-assembler for the 6502 family processors.
|
|
|
|
|
|
|
|
'SOURCE_FILE' is the name of the source file
|
|
|
|
(you may omit the default `.asx` extension).
|
2022-11-26 20:11:31 +00:00
|
|
|
Using '-' as 'SOURCE_FILE' makes *xasm* read from standard input.
|
2019-08-24 07:46:29 +00:00
|
|
|
When invoked without any options, *xasm* assembles 'SOURCE_FILE'
|
|
|
|
and writes the result to an object file named 'SOURCE_FILE'
|
|
|
|
with the extension changed to `.obx`.
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
*-c*::
|
2021-06-21 20:44:34 +00:00
|
|
|
The listing should include conditionally skipped lines.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
[[new_deflabel]]*-d* 'LABEL'='VALUE'::
|
2019-08-24 07:46:29 +00:00
|
|
|
Defines a label.
|
|
|
|
'LABEL' should be a valid label name.
|
2021-06-21 20:44:34 +00:00
|
|
|
'VALUE' may be any expression (potentially referencing labels defined in source files).
|
|
|
|
You may use several *-d* options to define many labels on the command line.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
*-i*::
|
2021-06-21 20:44:34 +00:00
|
|
|
The listing file should exclude included files.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
*-l* '[LISTING_FILE]'::
|
2021-06-21 20:44:34 +00:00
|
|
|
Generates a listing file.
|
2019-08-24 07:46:29 +00:00
|
|
|
If 'LISTING_FILE' is omitted, the listing filename
|
|
|
|
is 'SOURCE_FILE' with the extension changed to `.lst`.
|
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
[[new_makefile]]*-M*::
|
2021-06-21 20:44:34 +00:00
|
|
|
Prints a `Makefile` rule.
|
2019-08-24 07:46:29 +00:00
|
|
|
First line of the rule lists 'OBJECT_FILE' as the target of the rule
|
2021-06-21 20:44:34 +00:00
|
|
|
and all source files (including the ones specified with `icl` and `ins`) as dependencies.
|
|
|
|
The second line contains the command line with 'OBJECT_FILE'
|
|
|
|
replaced by the *make* macro `$@` and 'SOURCE_FILE' replaced by the macro `$<`.
|
2019-08-24 07:46:29 +00:00
|
|
|
Dollars in the command line are doubled.
|
2021-06-21 20:44:34 +00:00
|
|
|
Your *make* or shell may require further escaping.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
*-o* 'OBJECT_FILE'::
|
2019-08-24 07:46:29 +00:00
|
|
|
Sets output file name.
|
2022-11-26 20:11:31 +00:00
|
|
|
Using '-' as 'OBJECT_FILE' makes *xasm* write to standard output.
|
|
|
|
The default is 'SOURCE_FILE' with the extension changed to `.obx`, or
|
|
|
|
standard output if standard input was specified as source.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
[[new_fullpaths]]*-p*::
|
2019-08-24 07:46:29 +00:00
|
|
|
Prints absolute paths in listing and error messages.
|
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
[[new_quiet]]*-q*::
|
2019-08-24 07:46:29 +00:00
|
|
|
Quiet mode. Prevents *xasm* from printing its banner and compilation summary.
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*-t* '[LABEL_FILE]'::
|
|
|
|
Generates a label table.
|
2019-08-24 07:46:29 +00:00
|
|
|
If 'LABEL_FILE' is omitted then the table is appended at the end of the listing.
|
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
[[new_unlabels]]*-u*::
|
2021-06-21 20:44:34 +00:00
|
|
|
Issues warnings for unreferenced labels.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2020-05-25 19:36:28 +00:00
|
|
|
Alternatively, you may use DOS-style options, for example:
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
-----------------------------------------------------------
|
2020-05-25 19:36:28 +00:00
|
|
|
xasm /i /d:DEBUG=1 /l:listing.lst source.asx
|
2019-08-24 07:46:29 +00:00
|
|
|
-----------------------------------------------------------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
These are deprecated because they are incompatible with https://www.msys2.org[MSYS2].
|
2020-05-25 19:36:28 +00:00
|
|
|
|
2019-08-24 07:46:29 +00:00
|
|
|
SYNTAX
|
|
|
|
------
|
|
|
|
|
|
|
|
Source files should be plain ASCII files.
|
|
|
|
LF, CR, CR/LF and Atari ($9b) line terminators are supported.
|
|
|
|
Labels and instructions are case-insensitive.
|
|
|
|
|
|
|
|
*xasm* is backward compatible with Quick Assembler.
|
2021-06-21 20:44:34 +00:00
|
|
|
To compile QA sources with *xasm*, simply replace ATASCII characters
|
|
|
|
in string literals with the corresponding integers.
|
|
|
|
Also update all `OPT` directives, but often you can omit them.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
A 'label' is a symbol that represents a signed 32-bit integer.
|
2019-08-24 07:46:29 +00:00
|
|
|
You define a label by putting its name at the beginning of a line
|
|
|
|
(with no spaces before).
|
|
|
|
The label will be assigned the current value of the 'origin counter'
|
2021-06-21 20:44:34 +00:00
|
|
|
(that is, the address of the compiled instruction),
|
|
|
|
unless you use it with the `EQU` directive to assign the specified value.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
[[new_locallabel]]
|
|
|
|
Any label name starting with a `?` (question mark) is a 'local label'.
|
2021-02-28 10:32:32 +00:00
|
|
|
It is implicitly prefixed with the name of the most recently defined
|
2021-06-21 20:44:34 +00:00
|
|
|
'global label' (that is, a label without any `?` in name),
|
|
|
|
and remains visible until another global label is defined.
|
2021-02-28 10:32:32 +00:00
|
|
|
It is still possible to access a local label from anywhere in the source
|
|
|
|
by specifying its full name.
|
|
|
|
Local labels provide a way to reuse common, short label names while keeping
|
|
|
|
them unique.
|
|
|
|
Example:
|
|
|
|
----
|
|
|
|
foo ldy #0
|
|
|
|
?loop lda data,y ; full label name is FOO?LOOP
|
|
|
|
beq ?ret
|
|
|
|
jsr sendByte
|
|
|
|
iny:bne ?loop
|
|
|
|
?ret rts
|
|
|
|
|
|
|
|
bar lda baz
|
|
|
|
beq foo?ret ; ok
|
|
|
|
bne ?loop ; ERROR: Undeclared label: BAR?LOOP
|
|
|
|
----
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
'Instructions' and 'directives' must be preceded with some whitespace.
|
2019-08-24 07:46:29 +00:00
|
|
|
Without leading whitespace they are treated as label names.
|
|
|
|
For example:
|
|
|
|
----
|
|
|
|
nop
|
|
|
|
----
|
|
|
|
is a 6502 instruction, whereas
|
|
|
|
----
|
|
|
|
nop
|
|
|
|
----
|
|
|
|
(without leading space) defines a label called `nop`.
|
|
|
|
|
|
|
|
Whole-line comments must start with a semicolon, an asterisk or a pipe,
|
2021-06-21 20:44:34 +00:00
|
|
|
with an optional label definition and spaces before.
|
2019-08-24 07:46:29 +00:00
|
|
|
Here are examples of whole-line comments:
|
|
|
|
--------------------
|
|
|
|
; this is a comment
|
|
|
|
* so it is
|
|
|
|
label | and this too
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
[[new_linerep]]
|
|
|
|
Lines with instructions (and selected directives) may be 'repeated'.
|
|
|
|
To assemble a single line several times,
|
|
|
|
precede the repeat count with a colon, for example:
|
|
|
|
-----------------
|
|
|
|
:4 asl @
|
2021-06-21 20:44:34 +00:00
|
|
|
mask_lookup :32 dta $80,$40,$20,$10,$08,$04,$02,$01
|
2019-08-24 07:46:29 +00:00
|
|
|
-----------------
|
|
|
|
|
|
|
|
In lines with instructions or directives, a comment starts immediately
|
|
|
|
after the instruction/directive has been successfully parsed.
|
2021-06-21 20:44:34 +00:00
|
|
|
That is, in such lines *xasm* does 'not' require any special character
|
2019-08-24 07:46:29 +00:00
|
|
|
to start a comment.
|
|
|
|
-------------------------------------------------------------
|
|
|
|
lda foo ; this is a comment
|
|
|
|
sta bar this too
|
|
|
|
tax #0 tax has no operand, therefore #0 starts this comment
|
|
|
|
-------------------------------------------------------------
|
|
|
|
|
|
|
|
[[new_pairing]]
|
2021-03-14 22:32:32 +00:00
|
|
|
You may put two or more instructions in one line so they share their operand.
|
2019-08-24 07:46:29 +00:00
|
|
|
For example:
|
|
|
|
------------
|
|
|
|
eor:sta foo
|
|
|
|
------------
|
|
|
|
is equivalent to
|
|
|
|
------------
|
|
|
|
eor foo
|
|
|
|
sta foo
|
|
|
|
------------
|
|
|
|
|
|
|
|
Note that
|
|
|
|
------------
|
2021-03-14 22:32:32 +00:00
|
|
|
lda:tax:tay #0
|
2019-08-24 07:46:29 +00:00
|
|
|
------------
|
2021-03-14 22:32:32 +00:00
|
|
|
is allowed because `#0` is treated as a comment for `tax` and `tay`.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
EXPRESSIONS
|
|
|
|
-----------
|
|
|
|
Expressions are numbers combined with operators and brackets.
|
|
|
|
You should use square brackets, because parentheses are reserved
|
|
|
|
for 6502 indirect addressing.
|
|
|
|
|
|
|
|
A number is:
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
- a 32-bit decimal integer, e.g. `12345`
|
2019-08-24 07:46:29 +00:00
|
|
|
- a 32-bit hexadecimal integer, e.g. `$abcd`
|
|
|
|
- a 32-bit binary integer, e.g. `%10100101`
|
|
|
|
- an ASCII character, e.g. `'a'` or `"a"`
|
2021-06-21 20:44:34 +00:00
|
|
|
- the current value of the origin counter: `*`
|
2019-08-24 07:46:29 +00:00
|
|
|
- a hardware register (see below), e.g. `^4e`
|
|
|
|
- [[new_opcode]]an opcode (see below), e.g. `{lda #0}` is `$a9`
|
2021-06-21 20:44:34 +00:00
|
|
|
- [[new_linecnt]]the current value of the line repeat counter (see below): `#`
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Abbreviations of Atari hardware registers are provided
|
|
|
|
to save two characters (`$d40e` vs `^4e`)
|
|
|
|
and to facilitate porting software between Atari 8-bit computers
|
|
|
|
and the Atari 5200 console.
|
|
|
|
These are very similar machines, one of the biggest differences
|
|
|
|
is the location of hardware registers.
|
|
|
|
|
|
|
|
[cols="^m,^d,^m,^d",options="header"]
|
|
|
|
|================================================
|
|
|
|
|Syntax|Chip |Value|Value in Atari 5200 mode (`opt g+`)
|
|
|
|
| ^0x |GTIA |$D00x|`$C00x`
|
|
|
|
| ^1x |GTIA |$D01x|`$C01x`
|
|
|
|
| ^2x |POKEY|$D20x|`$E80x`
|
|
|
|
| ^3x |PIA |$D30x|'error (there's no PIA chip)'
|
|
|
|
| ^4x |ANTIC|$D40x|`$D40x`
|
|
|
|
|================================================
|
|
|
|
|
|
|
|
The opcode syntax represents the opcode byte of the instruction inside braces.
|
|
|
|
The operand of the instruction is discarded and is needed only to recognize
|
|
|
|
the addressing mode. The instruction should begin right after the left brace
|
|
|
|
and the right brace should immediately follow the operand 'or' the instruction.
|
|
|
|
[[new_op_op]]You can skip the operand if the addressing mode is fixed.
|
|
|
|
Examples: `{lda #}`, `{jsr}`, `{bne}`, `{jmp ()}`, `{sta a:,x}`.
|
|
|
|
|
|
|
|
You can use the line repeat counter (`#`) in the repeated lines.
|
|
|
|
It counts the iterations starting from zero. Examples:
|
|
|
|
----------------------------------------------------
|
|
|
|
:3 dta # ; generates three bytes: 0, 1, 2.
|
|
|
|
line_lo :192 dta l(screen+40*#)
|
|
|
|
line_hi :192 dta h(screen+40*#)
|
|
|
|
dl :59 dta $4f,a(screen+40*#),0,$4f,a(screen+40*#),0
|
|
|
|
----------------------------------------------------
|
|
|
|
|
|
|
|
The following 'binary operators' are supported:
|
|
|
|
|
|
|
|
- `+` Addition
|
|
|
|
- `-` Subtraction
|
|
|
|
- `*` Multiplication
|
|
|
|
- `/` Division
|
|
|
|
- `%` Remainder
|
|
|
|
- `&` Bitwise AND
|
|
|
|
- `|` Bitwise OR
|
|
|
|
- `^` Bitwise XOR
|
|
|
|
- `<<` Arithmetic shift left
|
|
|
|
- `>>` Arithmetic shift right
|
|
|
|
- `==` Equal
|
|
|
|
- `=` Equal (same as `==`)
|
|
|
|
- `!=` Not equal
|
|
|
|
- `<>` Not equal (same as `!=`)
|
|
|
|
- `<` Less than
|
|
|
|
- `>` Greater than
|
|
|
|
- `<=` Less or equal
|
|
|
|
- `>=` Greater or equal
|
|
|
|
- `&&` Logical AND
|
|
|
|
- `||` Logical OR
|
|
|
|
|
|
|
|
[[new_unary]]
|
|
|
|
The following 'unary operators' are supported:
|
|
|
|
|
|
|
|
- `+` Plus (no operation)
|
|
|
|
- `-` Minus (changes the sign)
|
|
|
|
- `~` Bitwise NOT (complements all bits)
|
|
|
|
- `!` Logical NOT (changes true to false and vice versa)
|
|
|
|
- `<` Low (extracts the low byte)
|
|
|
|
- `>` High (extracts the high byte)
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
Although the operators are similar to those used in C, C++, C# and Java,
|
|
|
|
their precedence is different:
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
- first: `[]` (brackets)
|
|
|
|
- `+ - ~ < >` (unary)
|
|
|
|
- `* / % & << >>` (binary)
|
|
|
|
- `+ - | ^` (binary)
|
|
|
|
- `= == <> != < > <= >=` (binary)
|
|
|
|
- `!` (unary)
|
|
|
|
- `&&` (binary)
|
|
|
|
- last: `||` (binary)
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
The compare and logical operators assume that zero is false
|
|
|
|
and a non-zero is true. They return 1 for true.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Expressions are calculated in signed 32-bit arithmetic.
|
2021-06-21 20:44:34 +00:00
|
|
|
An overflow is signalled with an "Arithmetic overflow" error.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
DIRECTIVES
|
|
|
|
----------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*EQU* - assign the value of an expression to a label::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
+
|
|
|
|
----------
|
|
|
|
five equ 5
|
|
|
|
here equ *
|
|
|
|
----------
|
|
|
|
|
|
|
|
[[new_opt]]*OPT* - set assembler options::
|
|
|
|
|
|
|
|
Six options are available:
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
- `F` - fill the space between noncontiguous memory areas with `$FF` bytes
|
|
|
|
- `G` - Atari 5200 mode for hardware register abbreviations (`^xx`)
|
2019-08-24 07:46:29 +00:00
|
|
|
- `H` - generate Atari executable headers
|
2021-06-21 20:44:34 +00:00
|
|
|
- `L` - write the listing
|
|
|
|
- `O` - write the object file
|
2019-08-24 07:46:29 +00:00
|
|
|
- `U` - warn of unused labels
|
|
|
|
|
|
|
|
+
|
|
|
|
You can turn any of these on or off.
|
2021-06-21 20:44:34 +00:00
|
|
|
The default (before the first `OPT`) is `opt f-g-h+l+o+u+`.
|
2021-03-25 08:03:23 +00:00
|
|
|
For compatibility with MADS, `opt ?+` is accepted and ignored.
|
2019-08-24 07:46:29 +00:00
|
|
|
Examples:
|
|
|
|
+
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
opt l- listing off
|
|
|
|
opt l+o- listing on, object file off
|
|
|
|
opt f+g+h- useful for Atari 5200 cartridges - raw output, 5200 hw regs
|
2021-03-25 08:03:23 +00:00
|
|
|
opt ?+ MADS compatibility, no effect
|
2019-08-24 07:46:29 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*ORG* - set the origin counter::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
If Atari executable headers are enabled (`opt h+`), you can include an operand prefix:
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
- `a:` starts a new block even if it's superfluous
|
|
|
|
because the new address equals the current address.
|
2021-06-21 20:44:34 +00:00
|
|
|
- `f:` is same as `a:`, but additionally generates a double `$FF` prefix
|
2019-08-24 07:46:29 +00:00
|
|
|
before the new header. This prefix is automatically generated
|
|
|
|
at the beginning of the file (no need to include `f:` in the first `ORG`).
|
|
|
|
|
|
|
|
+
|
|
|
|
Examples:
|
|
|
|
+
|
|
|
|
---------------
|
|
|
|
org $600
|
|
|
|
org f:$700
|
|
|
|
table org *+100
|
|
|
|
---------------
|
|
|
|
+
|
|
|
|
In the latter example `table` points to 100 bytes
|
|
|
|
of uninitialized data (label is assigned with `*`
|
|
|
|
before the `ORG` directive is executed).
|
|
|
|
+
|
2021-06-21 20:44:34 +00:00
|
|
|
[[new_orgr]]*xasm* supports code that is relocated at run time.
|
|
|
|
Let's say you want your code to be located on page zero for best performance.
|
|
|
|
You can't safely load it directly into this place,
|
|
|
|
so you load it at a different address and then move in your program.
|
2019-08-24 07:46:29 +00:00
|
|
|
`org r:` changes the address that it used for code generation
|
|
|
|
but not the address used for generating Atari executable headers.
|
|
|
|
Example:
|
|
|
|
+
|
|
|
|
--------------------------------------
|
|
|
|
org $8000
|
|
|
|
ldx #code_length-1
|
|
|
|
mva:rpl code_loaded,x z:code_zpage,x-
|
|
|
|
jmp code_zpage
|
|
|
|
|
|
|
|
code_loaded
|
|
|
|
org r:$30
|
|
|
|
code_zpage
|
|
|
|
jmp * ; ... or something more sensible
|
|
|
|
code_length equ *-code_zpage
|
|
|
|
--------------------------------------
|
|
|
|
+
|
|
|
|
Note that both `*` and label definitions use the counter used
|
|
|
|
for code generation. There is no direct access to the other counter.
|
|
|
|
You can only calculate it:
|
|
|
|
+
|
|
|
|
---------------------------------------
|
|
|
|
where_am_i equ *-code_zpage+code_loaded
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
[[new_dta]]*DTA* - define data::
|
|
|
|
|
|
|
|
- integers
|
|
|
|
+
|
|
|
|
--
|
|
|
|
* bytes: `b(200)` or simply `200`
|
|
|
|
* words: `a(10000)`
|
|
|
|
* low bytes of words: `l(511)` (byte 255)
|
|
|
|
* high bytes of words: `h(511)` (byte 1)
|
|
|
|
|
|
|
|
You may enter many expressions in parentheses and combine different types
|
|
|
|
of data in single line, separating things with commas.
|
|
|
|
|
|
|
|
You may also build a sine lookup table. The syntax is:
|
|
|
|
-------------------------------
|
|
|
|
sin(center,amp,period,first,last)
|
|
|
|
-------------------------------
|
|
|
|
where:
|
|
|
|
|
|
|
|
* `center` is an integer which is added to every sine value
|
|
|
|
* `amp` is the sine amplitude
|
|
|
|
* `period` is the number of values per sine period
|
|
|
|
* `first,last` define the range of sine arguments.
|
|
|
|
They are optional. The default are `0,period-1`.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
----------------------------
|
|
|
|
dta a(sin(0,1000,256,0,63))
|
|
|
|
----------------------------
|
|
|
|
defines a table of 64 words representing a quarter of sine with the amplitude of 1000.
|
|
|
|
--
|
|
|
|
|
|
|
|
- real numbers: `r(-1.23456e12)`
|
|
|
|
+
|
|
|
|
Real numbers are stored in the 6-byte Atari Floating-Point format.
|
|
|
|
|
|
|
|
- text strings
|
|
|
|
+
|
|
|
|
--
|
|
|
|
* ASCII strings: `c'Text'` or `c"Text"`
|
|
|
|
* ANTIC strings: `d'Text'` or `d"Text"`
|
|
|
|
|
|
|
|
A character string consists of any number of characters surrounded by quotation
|
|
|
|
marks. You can include the quotation marks in the string by doubling them.
|
|
|
|
Placing a `*` character after a string inverts
|
|
|
|
the highest bit in every byte of the string.
|
|
|
|
--
|
|
|
|
+
|
|
|
|
Examples of `DTA`:
|
|
|
|
+
|
|
|
|
------------------------------------------------
|
|
|
|
dta b(1,2),3,a(1000,-1),l(12345,sin(0,127,256))
|
|
|
|
dta d"ANTIC"*,c'It''s a string',$9b
|
|
|
|
------------------------------------------------
|
|
|
|
|
|
|
|
*ICL* - include another source file::
|
|
|
|
|
|
|
|
Specifies another file to be included in the assembly as if the contents
|
|
|
|
of the referenced file appeared in place of the `ICL` statement.
|
|
|
|
The included file may contain other `ICL` statements.
|
|
|
|
The `.asx` extension is added if none given.
|
|
|
|
Examples:
|
|
|
|
+
|
|
|
|
-----------------
|
|
|
|
icl 'macros.asx'
|
|
|
|
icl 'lib/fileio'
|
|
|
|
-----------------
|
|
|
|
+
|
2021-06-21 20:44:34 +00:00
|
|
|
NOTE: For Windows/macOS/Linux portability use relative paths
|
|
|
|
and slashes as path separators.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*END* - end this source file::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
May be used if the source file ends with something which shouldn't
|
|
|
|
be read by *xasm* (e.g. your notes).
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*INS* - insert binary file contents::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Copies every byte of the specified file into the object file and updates
|
2021-06-21 20:44:34 +00:00
|
|
|
the origin counter, as if these bytes were specified in a `DTA`.
|
2019-08-24 07:46:29 +00:00
|
|
|
You may specify a range of the file to insert. The syntax is:
|
|
|
|
+
|
|
|
|
-----------------------------
|
|
|
|
ins 'file'[,offset[,length]]
|
|
|
|
-----------------------------
|
|
|
|
+
|
|
|
|
The first byte in a file has the offset of zero.
|
|
|
|
If the offset is negative, it counts from the end of the file.
|
|
|
|
Examples:
|
|
|
|
+
|
|
|
|
-----------------------------------------------
|
|
|
|
ins 'picture.raw'
|
2021-06-21 20:44:34 +00:00
|
|
|
ins 'file',-256 ; insert last 256 bytes of file
|
|
|
|
ins 'file',10,10 ; insert bytes 10..19 of file
|
2019-08-24 07:46:29 +00:00
|
|
|
-----------------------------------------------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*RUN* - set the Atari executable run address::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
+
|
|
|
|
---------
|
|
|
|
run main
|
|
|
|
---------
|
|
|
|
+
|
|
|
|
is equivalent to:
|
|
|
|
+
|
|
|
|
------------
|
|
|
|
org $2e0
|
|
|
|
dta a(main)
|
|
|
|
------------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*INI* - set the Atari executable init address::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
+
|
|
|
|
------------
|
|
|
|
ini showloadingpic
|
|
|
|
------------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*ERT* - abort the assembly with an error if an expression is true::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
+
|
|
|
|
-----------------------
|
|
|
|
ert *>$c000
|
|
|
|
ert len1>$ff||len2>$ff
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
[[new_eli]]*IFT* - assemble if expression is true::
|
|
|
|
*ELI* - else if::
|
|
|
|
*ELS* - else::
|
|
|
|
*EIF* - end if::
|
|
|
|
|
|
|
|
With these directives you can construct fragments which
|
|
|
|
are assembled only when a condition is met.
|
|
|
|
Conditional constructions can be nested.
|
|
|
|
Example:
|
|
|
|
+
|
|
|
|
-------------
|
|
|
|
noscr equ 1
|
|
|
|
widescr equ 1
|
|
|
|
ift noscr
|
|
|
|
lda #0
|
|
|
|
eli widescr
|
|
|
|
lda #$23
|
|
|
|
els
|
|
|
|
lda #$22
|
|
|
|
eif
|
|
|
|
sta $22f
|
|
|
|
-------------
|
|
|
|
+
|
2021-06-21 20:44:34 +00:00
|
|
|
NOTE: Alternatively, the above example can be written using the 'repeat line' feature:
|
2019-08-24 07:46:29 +00:00
|
|
|
+
|
|
|
|
--------------------------
|
|
|
|
noscr equ 1
|
|
|
|
widescr equ 1
|
|
|
|
:noscr lda #0
|
|
|
|
:!noscr&&widescr lda #$23
|
|
|
|
:!noscr&&!widescr lda #$22
|
|
|
|
sta $22f
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
PSEUDO COMMANDS
|
|
|
|
---------------
|
2021-06-21 20:44:34 +00:00
|
|
|
'Pseudo commands' are built-in macros. There are 'no' user-defined macros in *xasm*.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
*ADD* - add without carry::
|
|
|
|
|
|
|
|
If you have ever programmed a 6502, you must have noticed that you had
|
|
|
|
to use a `CLC` before `ADC` for every simple addition.
|
|
|
|
+
|
|
|
|
*xasm* can do it for you. `ADD` replaces two instructions: `CLC` and `ADC`.
|
|
|
|
|
|
|
|
*SUB* - subtract::
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
It is `SEC` followed by `SBC`.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
[[new_repskip]]*RCC, RCS, REQ, RMI, RNE, RPL, RVC, RVS* - conditional repeat::
|
|
|
|
|
|
|
|
These are branches to the previous instruction.
|
|
|
|
They take no operand, because the branch target is the address
|
|
|
|
of the previously assembled instruction or pseudo command.
|
|
|
|
Example:
|
|
|
|
+
|
|
|
|
-----------------------
|
|
|
|
ldx #0
|
|
|
|
mva:rne $500,x $600,x+
|
|
|
|
-----------------------
|
|
|
|
+
|
|
|
|
The above code copies a 256-byte memory block from $500 to $600.
|
|
|
|
Here is the same written with standard 6502 commands only:
|
|
|
|
+
|
|
|
|
--------------------
|
2021-06-21 20:44:34 +00:00
|
|
|
ldx #0
|
2019-08-24 07:46:29 +00:00
|
|
|
copy_loop lda $500,x
|
2021-06-21 20:44:34 +00:00
|
|
|
sta $600,x
|
|
|
|
inx
|
|
|
|
bne copy_loop
|
2019-08-24 07:46:29 +00:00
|
|
|
--------------------
|
|
|
|
|
|
|
|
*SCC, SCS, SEQ, SMI, SNE, SPL, SVC, SVS* - conditional skip::
|
|
|
|
|
|
|
|
These are branches over the next instruction. No operand is required,
|
|
|
|
because the target is the address of the instruction following
|
|
|
|
the next instruction.
|
|
|
|
Example:
|
|
|
|
+
|
|
|
|
--------------
|
|
|
|
lda #40
|
|
|
|
add:sta ptr
|
|
|
|
scc:inc ptr+1
|
|
|
|
--------------
|
|
|
|
+
|
|
|
|
In the above example the 16-bit variable `ptr` is incremented by 40.
|
|
|
|
|
|
|
|
*JCC, JCS, JEQ, JMI, JNE, JPL, JVC, JVS* - conditional jump::
|
|
|
|
|
|
|
|
These are long branches. While standard branches (such as `BNE`)
|
2021-06-21 20:44:34 +00:00
|
|
|
have range of -128..+127 bytes, these jumps have range of 64 KB.
|
2019-08-24 07:46:29 +00:00
|
|
|
For example:
|
|
|
|
+
|
|
|
|
---------
|
|
|
|
jne dest
|
|
|
|
---------
|
|
|
|
+
|
|
|
|
is equivalent to:
|
|
|
|
+
|
|
|
|
-------------
|
|
|
|
seq:jmp dest
|
|
|
|
-------------
|
|
|
|
|
|
|
|
*INW* - increment word::
|
|
|
|
|
|
|
|
Increments a 16-bit word in the memory.
|
|
|
|
Example:
|
|
|
|
+
|
|
|
|
---------
|
|
|
|
inw dest
|
|
|
|
---------
|
|
|
|
+
|
|
|
|
is equivalent to:
|
|
|
|
+
|
|
|
|
---------------
|
|
|
|
inc dest
|
|
|
|
sne:inc dest+1
|
|
|
|
---------------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
*MVA, MVX, MVY* - move a byte using the accumulator, X or Y::
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Each of these pseudo commands requires two operands
|
|
|
|
and substitutes two commands:
|
|
|
|
+
|
|
|
|
----------------------------------------
|
|
|
|
mva source dest = lda source : sta dest
|
|
|
|
mvx source dest = ldx source : stx dest
|
|
|
|
mvy source dest = ldy source : sty dest
|
|
|
|
----------------------------------------
|
|
|
|
|
|
|
|
[[new_mwinde]]*MWA, MWX, MWY* - move word using accumulator, X or Y::
|
|
|
|
|
|
|
|
These pseudo commands require two operands and are combinations of two `MVA`/`MVX`/`MWY`:
|
|
|
|
one to move the low byte, and the other to move the high byte.
|
|
|
|
You can't use indirect nor pseudo addressing mode with `MWA`/`MWX`/`MWY`.
|
|
|
|
Destination must be an absolute or zeropage address, optionally indexed.
|
|
|
|
When source is also an absolute or zeropage address, an `mwa source dest` expands to:
|
|
|
|
+
|
|
|
|
--------------------
|
|
|
|
mva source dest
|
|
|
|
mva source+1 dest+1
|
|
|
|
--------------------
|
|
|
|
+
|
|
|
|
When source is an immediate value, an `mwa #immed dest` expands to:
|
|
|
|
+
|
|
|
|
------------------
|
|
|
|
mva <immed dest
|
|
|
|
mva >immed dest+1
|
|
|
|
------------------
|
|
|
|
+
|
|
|
|
When `<immed` equals `>immed` and `immed` is not forward-referenced,
|
|
|
|
*xasm* skips the second `LDA`, generating the following code:
|
|
|
|
+
|
|
|
|
----------------
|
|
|
|
mva <immed dest
|
|
|
|
sta dest+1
|
|
|
|
----------------
|
|
|
|
+
|
2021-06-21 20:44:34 +00:00
|
|
|
If possible, `MWX` and `MWY` use increment/decrement instructions.
|
2019-08-24 07:46:29 +00:00
|
|
|
For example, `mwx #1 dest` expands to:
|
|
|
|
+
|
|
|
|
-----------
|
|
|
|
ldx #1
|
|
|
|
stx dest
|
|
|
|
dex
|
|
|
|
stx dest+1
|
|
|
|
-----------
|
|
|
|
|
|
|
|
ADDRESSING MODES
|
|
|
|
----------------
|
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
Addressing modes are entered in the standard 6502 convention.
|
|
|
|
An exception is the accumulator mode marked with the `@` character
|
|
|
|
for compatibility with Quick Assembler.
|
2019-08-24 07:46:29 +00:00
|
|
|
|
2021-06-21 20:44:34 +00:00
|
|
|
Also for Quick Assembler compatibility there are two extra immediate
|
2019-08-24 07:46:29 +00:00
|
|
|
addressing modes: `<` and `>`, which use the low/high byte of a 16-bit word constant.
|
|
|
|
Unlike in Quick Assembler, you can alternatively use
|
|
|
|
the more common syntax: `#<` and `#>`.
|
|
|
|
Note the difference:
|
|
|
|
-------------------------------
|
|
|
|
lda >$ff+5 ; loads 1 (>$104)
|
|
|
|
lda #>$ff+5 ; loads 5 (0+5)
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
You can explicitly specify absolute (`a:`) and zero-page (`z:`) addressing modes.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
--------------------------------------
|
|
|
|
nop
|
|
|
|
asl @
|
|
|
|
lda >$1234 assembles to lda #$12
|
|
|
|
lda $100,x
|
|
|
|
lda 0 zero-page (8-bit address)
|
|
|
|
lda a:0 absolute (16-bit address)
|
|
|
|
jmp ($0a)
|
|
|
|
lda ($80),y
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
[[new_adrmodes]]
|
|
|
|
There are 'pseudo addressing modes', which are similar to pseudo commands.
|
|
|
|
You may use them just like standard addressing modes in all 6502 commands
|
|
|
|
and pseudo commands, except for `MWA`, `MWX` and `MWY`:
|
|
|
|
------------------------------------------
|
|
|
|
cmd a,x+ = cmd a,x : inx
|
|
|
|
cmd a,x- = cmd a,x : dex
|
|
|
|
cmd a,y+ = cmd a,y : iny
|
|
|
|
cmd a,y- = cmd a,y : dey
|
|
|
|
cmd (z),y+ = cmd (z),y : iny
|
|
|
|
cmd (z),y- = cmd (z),y : dey
|
|
|
|
cmd (z,0) = ldx #0 : cmd (z,x)
|
|
|
|
cmd (z),0 = ldy #0 : cmd (z),y
|
|
|
|
cmd (z),0+ = ldy #0 : cmd (z),y : iny
|
|
|
|
cmd (z),0- = ldy #0 : cmd (z),y : dey
|
|
|
|
------------------------------------------
|
|
|
|
|
|
|
|
HISTORY
|
|
|
|
-------
|
|
|
|
|
2022-11-26 20:11:31 +00:00
|
|
|
Version 3.x.x (20xx-xx-xx)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- source can optionally be read from standard input, and object can be
|
|
|
|
written to standard output instead of files (by Adrian Matoga)
|
2021-03-14 22:32:32 +00:00
|
|
|
- <<new_pairing,any number of instructions in one line>> (by Adrian Matoga)
|
2022-11-26 20:11:31 +00:00
|
|
|
|
2021-06-22 19:20:00 +00:00
|
|
|
Version 3.2.0 (2021-06-22)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- <<new_locallabel,local labels>> (contributed by Adrian Matoga)
|
|
|
|
- fixed emitted bytes not shown in the listing after `OPT L+` (by Adrian Matoga)
|
|
|
|
- emit shorter code for moving a negative immediate value with `MWX`/`MWY`
|
|
|
|
- Windows binary signed
|
|
|
|
- macOS binary signed, notarized, installed in `/usr/local/bin`
|
|
|
|
|
2019-11-20 16:43:51 +00:00
|
|
|
Version 3.1.1 (2019-11-20)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- remove partial object file on error (requested by Bill Kendrick)
|
|
|
|
- report label name in the unused label warning (requested by Peter Dell)
|
|
|
|
- support `a:`/`f:` modifiers for `RUN`/`INI`
|
|
|
|
- improved performance with network drives (reported by Marek Pavlik)
|
|
|
|
|
2019-08-24 07:46:29 +00:00
|
|
|
Version 3.1.0 (2014-07-20)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- OS X, Ubuntu and Fedora distributions
|
|
|
|
- `INS` can be repeated (suggested by Marek Pavlik) and taken "opcode" of
|
|
|
|
- `OPT U-` disables <<new_unlabels,*/u*>> unused label warnings
|
|
|
|
(suggested by Marek Pavlik)
|
2021-06-21 20:44:34 +00:00
|
|
|
- if the file to be included cannot be opened, report an error in the `ICL` line
|
2019-08-24 07:46:29 +00:00
|
|
|
(suggested by Peter Dell)
|
|
|
|
- removed duplicate filenames for <<new_makefile,*/M*>>
|
|
|
|
- implemented <<new_fullpaths,*/p*>> outside Windows
|
|
|
|
- source code updated from D1 to D2
|
|
|
|
- project moved to GitHub
|
|
|
|
|
|
|
|
Version 3.0.2 (2009-10-17)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- fixed "Branch out of range" error message - was overstated by 256 bytes
|
|
|
|
for backward branches
|
|
|
|
- <<new_makefile,new command-line option */M* prints a Makefile rule>>
|
|
|
|
- command-line options are now case-insensitive
|
2021-06-21 20:44:34 +00:00
|
|
|
- on Windows, error messages are printed in red, warnings in yellow
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Version 3.0.1 (2007-04-22)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- fixed a bug in `OPT H-` mode
|
|
|
|
- made *xasm* compilable with the latest D compiler v1.010
|
|
|
|
(there were incompatible changes in the D language and library)
|
|
|
|
|
|
|
|
Version 3.0.0 (2005-05-22)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- rewritten from the x86 assembly language to the
|
|
|
|
http://dlang.org/[D programming language] - Linux version
|
|
|
|
is now available and DOS is no longer supported
|
2021-06-21 20:44:34 +00:00
|
|
|
- no limits on line length, number of `ICLs`, `ORGs`,`IFTs` and labels
|
2019-08-24 07:46:29 +00:00
|
|
|
- Unix-style command-line options are supported
|
2021-06-21 20:44:34 +00:00
|
|
|
- the */e* option is removed
|
2019-08-24 07:46:29 +00:00
|
|
|
- the label table is now sorted alphabetically
|
|
|
|
|
|
|
|
Version 2.6.1 (2005-05-21)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- no more "Arithmetic overflow" and "Division by zero" errors for correct
|
|
|
|
use of forward-referenced labels (bug found by Marcin Lewandowski)
|
|
|
|
- an error was reported in the following correct code:
|
|
|
|
+
|
|
|
|
---------
|
|
|
|
ift 0
|
|
|
|
foo equ 1
|
|
|
|
ift foo
|
|
|
|
eif
|
|
|
|
eif
|
|
|
|
---------
|
|
|
|
+
|
|
|
|
(bug found by Adrian Matoga)
|
|
|
|
|
|
|
|
- errors for non-existing `INC @` and `DEC @`
|
|
|
|
- negative numbers fixed in the listing
|
|
|
|
|
|
|
|
Version 2.6.0 (2005-02-07)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- long file names are supported under Windows
|
|
|
|
- <<new_orgr,support for code relocated at runtime>>
|
|
|
|
- <<new_linecnt,line repeat counter>>
|
|
|
|
- label values are now 32-bit, not just 17-bit
|
|
|
|
- command-line options */n* and */s* are no longer supported
|
2021-06-21 20:44:34 +00:00
|
|
|
- fatal I/O errors no longer print the annoying "Abort, Retry, Ignore" message
|
2019-08-24 07:46:29 +00:00
|
|
|
|
|
|
|
Version 2.5.2 (2002-10-03)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- version 2.5.1 broke Unix EOLs - fixed
|
|
|
|
- version 2.5.1 omitted all blank/comment/label lines, unless */c* was used
|
|
|
|
|
|
|
|
Version 2.5.1 (2002-08-21)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- fixed assembling sources with Atari EOLs
|
|
|
|
- blank/comment/label lines in false conditionals are now correctly omitted
|
|
|
|
in listing
|
|
|
|
|
|
|
|
Version 2.5 (2002-07-08)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
2021-06-21 20:44:34 +00:00
|
|
|
- fixed another bug similar to the previous one, for example:
|
2019-08-24 07:46:29 +00:00
|
|
|
+
|
|
|
|
----------
|
|
|
|
ift 0
|
|
|
|
:label nop
|
|
|
|
eif
|
|
|
|
----------
|
|
|
|
+
|
|
|
|
reported "Label not defined before" error for the repeat count
|
|
|
|
|
|
|
|
- <<new_opt,`OPT F+` causes `ORG` to fill the space
|
|
|
|
between the old and the new location with `$FFs`>>
|
|
|
|
- <<new_opt,`OPT G+` enables Atari 5200 mode for hardware
|
|
|
|
register abbreviations>>
|
|
|
|
|
|
|
|
Version 2.4.1 (2002-06-27)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- fixed a bug related to label definitions in conditionally skipped code,
|
|
|
|
e.g.
|
|
|
|
+
|
|
|
|
----------
|
|
|
|
ift 0
|
|
|
|
label
|
|
|
|
eif
|
|
|
|
----------
|
|
|
|
+
|
|
|
|
reported "No ORG specified" error for the label definition
|
|
|
|
|
|
|
|
Version 2.4 (2002-05-22)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- fixed incorrect unary operator precedence
|
|
|
|
- fixed wrong label value after a skip pseudo command
|
2021-06-21 20:44:34 +00:00
|
|
|
- the assembler is an .EXE (.COM caused problems with DJGPP *make* due
|
2019-08-24 07:46:29 +00:00
|
|
|
to a bug in the DJGPP runtime)
|
2021-06-21 20:44:34 +00:00
|
|
|
- the assembler executable is no longer compressed
|
|
|
|
- improved command-line parsing: options may be used before the source file name,
|
|
|
|
tab is a valid separator, slash may be used as a directory separator
|
2019-08-24 07:46:29 +00:00
|
|
|
- error and warning messages are written to stderr, not stdout
|
2021-06-21 20:44:34 +00:00
|
|
|
- added `==` (equals) operator, equivalent to `=`, but familiar to C/C++/Java programmers
|
2019-08-24 07:46:29 +00:00
|
|
|
- <<new_deflabel,added `/d:label=value` option: define a label>>
|
|
|
|
- <<new_fullpaths,added `/p` option: print full paths
|
|
|
|
in listing and error messages>>
|
|
|
|
- <<new_quiet,added `/q` option: quiet mode>>
|
|
|
|
- <<new_unlabels,added `/u` option: warn of unused labels>>
|
|
|
|
- <<new_opt,writing to the object file may be suppressed with `OPT O-`>>
|
|
|
|
- <<new_eli,added `ELI` (else if) directive>>
|
|
|
|
- <<new_mwinde,`MWX` and `MWY` may use `INX`/`DEX` and `INY`/`DEY`,
|
|
|
|
respectively, for generating shorter code>>
|
|
|
|
|
|
|
|
Version 2.3 (2002-02-10)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- fixed double skip (e.g. `SCC:SNE`)
|
|
|
|
- fixed real numbers with two-digit exponent
|
|
|
|
- trailing spaces are trimmed from listing lines
|
|
|
|
- label definitions allowed in blank, comment and repeated lines
|
|
|
|
- <<new_unary,unary operators>>
|
|
|
|
- <<new_dta,`DTA` implied byte mode>>
|
|
|
|
- <<new_op_op,operand can be skipped for some opcodes>>
|
|
|
|
|
|
|
|
Version 2.2 (1999-09-10)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- fixed invalid opcodes of absolute `CPX` and `CPY`
|
|
|
|
- fixed: addressing mode not checked for branch commands
|
|
|
|
- fixed `ICL` in last line
|
|
|
|
- fixed `OPT H-H+`
|
|
|
|
- fixed first `ORG *`
|
2021-06-21 20:44:34 +00:00
|
|
|
- no need to set the origin counter until it's needed
|
2019-08-24 07:46:29 +00:00
|
|
|
- allow Unix, Macintosh and Atari EOLs
|
|
|
|
- value of 'true' changed to 1
|
|
|
|
- command-line option to set environment variables on error
|
2021-06-21 20:44:34 +00:00
|
|
|
- commane-line option to assemble only if the source is newer than the object file
|
2019-08-24 07:46:29 +00:00
|
|
|
- <<new_opcode,opcode extracting>>
|
|
|
|
- <<new_linerep,repeat line>>
|
|
|
|
- <<new_pairing,two instructions in line>>
|
|
|
|
- <<new_repskip,conditional repeat and skip pseudo commands>>
|
|
|
|
- <<new_adrmodes,`(),0+` and `(),0-` pseudo addressing modes>>
|
|
|
|
|
|
|
|
Version 2.0 (1998-11-12)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
2021-06-21 20:44:34 +00:00
|
|
|
- fixed: object filename was truncated
|
2019-08-24 07:46:29 +00:00
|
|
|
- fixed forward references in `EQU` and `DTA`
|
|
|
|
- fixed hex numbers
|
|
|
|
- `.OBX` is now the default extension for the object file
|
|
|
|
- options (command-line switches and `OPT`)
|
|
|
|
- listing
|
|
|
|
- label table
|
|
|
|
- conditional assembly
|
|
|
|
- user errors (`ERT`)
|
|
|
|
- warnings
|
|
|
|
- 6 new pseudo commands (memory-to-memory move)
|
|
|
|
- 8 pseudo addressing modes
|
|
|
|
- indirect conditional jumps
|
|
|
|
- Atari floating-point numbers
|
|
|
|
- object file headers optimization
|
|
|
|
- improved expressions - 19 operators and brackets, 32-bit arithmetic
|
|
|
|
- improved signed numbers
|
|
|
|
- improved `INS`: inserting specified part of file
|
|
|
|
|
|
|
|
Version 1.2 (1998-08-14)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- first release
|
|
|
|
|
|
|
|
AUTHOR
|
|
|
|
------
|
|
|
|
Piotr Fusik <fox@scene.pl>
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
|
|
|
|
Website: https://github.com/pfusik/xasm[]
|