1
0
mirror of https://github.com/pfusik/xasm.git synced 2024-06-26 02:29:39 +00:00

Compare commits

...

85 Commits

Author SHA1 Message Date
Piotr Fusik
f5903fb199 Minor doc improvements. 2024-06-09 15:00:15 +02:00
Piotr Fusik
8eb2a5ae6f Migrate to the new macOS notarization tool.
The old one no longer works.
2024-05-18 21:45:34 +02:00
Piotr Fusik
9732817a0b Modernize the RPM spec. 2023-07-11 10:56:46 +02:00
Piotr Fusik
70c907bae6 Revert "Warn about a comment starting with a comma."
Breaks Jaskier's MPT player.
https://sourceforge.net/p/asap/bugs/32/

This reverts commit 7a666799ac.
2023-05-07 21:03:40 +02:00
Piotr Fusik
7a666799ac Warn about a comment starting with a comma. 2023-02-28 16:59:52 +01:00
Piotr Skamruk
95136d1546 Tune variable/func names after sequencing support added 2022-12-20 15:52:39 +01:00
Piotr Fusik
ca5e88950f xasm 3.2.1 release. 2022-12-08 11:49:40 +01:00
Piotr Fusik
138331193a DMD seems to no longer append ".exe". 2022-12-08 09:53:32 +01:00
Piotr Fusik
30c96357bc Allow stdout for the listing and label table. 2022-12-08 09:27:19 +01:00
Jakub Husak
83d2f8ff1d Refactor LDA and STA with existing routines. 2022-12-02 15:23:07 +01:00
Adrian Matoga
9aae1ad4c4 Instruction pairing extended to more than two instructions. 2022-11-30 10:11:12 +01:00
Piotr Fusik
f33c112ac6 Switch CI from Travis to GitHub Actions.
Close #10
2022-11-29 14:08:39 +01:00
Piotr Fusik
57661276c2 Fix "Error processing arguments: Missing value for argument --compiler=". 2022-11-29 14:04:51 +01:00
Piotr Fusik
a4225b6128 GitHub Actions don't know gdc. 2022-11-29 14:01:33 +01:00
Piotr Fusik
1da9f77458 Add the missing part of GitHub Actions. 2022-11-29 13:59:41 +01:00
Piotr Fusik
2b7d21ae43 Continuous Integration with GitHub Actions. 2022-11-29 13:51:14 +01:00
Adrian Matoga
2f67b3bab4 Allow stdin/stdout instead of files for source and object. 2022-11-29 11:22:55 +01:00
Piotr Fusik
afb9f7830e Update DEB packaging. 2022-07-23 11:45:14 +02:00
Piotr Fusik
95cb5ae592 install-scite non-executable. 2021-12-23 16:43:11 +01:00
Piotr Fusik
8f6621f079 Update DEB packaging. 2021-12-23 16:41:52 +01:00
Piotr Fusik
52982169df xasm 3.2.0 release. 2021-06-22 21:20:00 +02:00
Piotr Fusik
8c7ef1a922 Reword the manual. 2021-06-21 22:44:34 +02:00
Piotr Fusik
1a90ca04d3 Bump the copyright year. 2021-06-21 22:42:13 +02:00
Piotr Fusik
73b382f9b7 Fix macOS notarization. 2021-06-21 22:40:50 +02:00
Piotr Fusik
7ba3f9f597 Signed the Windows binary. 2021-06-20 19:01:53 +02:00
Piotr Fusik
b815a448cd Migrate to travis-ci.com. 2021-06-16 09:11:04 +02:00
Piotr Fusik
274dda9dd2 Wait for macOS notarization. 2021-06-04 21:50:23 +02:00
Piotr Fusik
da58ad7950 Sign and notarize the macOS binary. 2021-06-04 21:38:25 +02:00
Piotr Fusik
52ef8c05d6 OPT ?+ for MADS compatibility. 2021-03-25 09:03:23 +01:00
Piotr Fusik
6f25038d95 On macOS install in /usr/local/bin.
Close #8
2021-03-24 10:49:14 +01:00
Adrian Matoga
57ef9b5c83 Fix failed assertion when opt l+ is used 2021-03-15 07:18:15 +01:00
Adrian Matoga
8f06fec50c Enable simple local labels. 2021-03-14 19:46:09 +01:00
Piotr Fusik
d50d484e1f Update DEB packaging. 2020-10-29 20:07:35 +01:00
Piotr Fusik
65a2c1fbdd Deprecate DOS-style options. 2020-05-25 21:36:28 +02:00
Piotr Fusik
d3908ec95e Don't report error deleting the object file on error.
Most likely the file doesn't exist.
2020-05-21 19:38:49 +02:00
Piotr Fusik
647cf9f3cf Don't cast to arrays of mutable bytes. 2019-12-04 23:23:47 +01:00
Piotr Fusik
819701b9be Optimize moving negative immediate word. 2019-12-04 23:16:21 +01:00
Piotr Fusik
301b904f60 xasm 3.1.1 release. 2019-11-20 17:43:51 +01:00
Piotr Fusik
420a83a897 Adapt srcdist to new tools. 2019-10-29 20:16:03 +01:00
Piotr Fusik
2f8e97499d Fix unreachable statement. 2019-10-16 09:28:13 +02:00
Piotr Fusik
7ad066fc6f Remove the object file on error even if not written.
Close #4.
2019-10-16 09:24:36 +02:00
Piotr Fusik
a0bfe1366d Remove the object file on error.
Close #4.
2019-10-14 10:56:46 +02:00
Piotr Fusik
384643ab84 Test with GDC and LDC. 2019-10-06 18:46:12 +02:00
Piotr Fusik
177ece15fc Add Travis badge. 2019-10-06 17:35:21 +02:00
Piotr Fusik
99099938b5 Silence unit tests. 2019-10-06 17:24:59 +02:00
Piotr Fusik
cb92f715a9 Fix "dub test". 2019-10-06 17:07:42 +02:00
Piotr Fusik
110d2c4dad Introduce DUB. 2019-10-06 17:00:48 +02:00
Piotr Fusik
ce134af833 Cleanup .gitignore. 2019-08-24 09:47:52 +02:00
Piotr Fusik
92eac212cc Apply dos2unix. 2019-08-24 09:46:29 +02:00
Piotr Fusik
90276dbe86 std.conv is already imported. 2019-08-24 09:43:41 +02:00
maraflush
2e43507088 fix compilation issue
fix :
xasm.d(2655): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"ea" instead.
xasm.d(2656): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"18a2006105" instead.
xasm.d(2657): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"a9cd8d3412a9ab8d3512" instead.
xasm.d(2658): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"05a6efef8945" instead.
xasm.d(2660): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"400100000000 401200000000 410123000000 441234567890 461234567890 3f5000000000 3f0300000000 3f1664534589 701000000000" instead.
2019-08-24 09:17:57 +02:00
Piotr Fusik
cc0eaf0e48 Rename the documentation so that GitHub formats it. 2019-03-26 23:48:10 +01:00
Piotr Fusik
2dad630a75 Update some links. 2019-03-26 23:34:56 +01:00
Piotr Fusik
36a4853b54 Fix whitespace. 2017-07-29 14:06:15 +02:00
Piotr Fusik
c4fc8ef51a License. 2017-07-28 21:36:10 +02:00
Piotr Fusik
ef297a78c7 Reword README slightly. 2017-02-08 19:59:22 +01:00
Piotr Fusik
061088aa62 Update for DMD v2.073. 2017-02-08 19:32:42 +01:00
Piotr Fusik
dd3466a947 SciTE: Fix the open filter. Add to the Language menu. 2016-12-15 20:43:40 +01:00
peterdell
d2bd24a128 Add .gitignore 2016-01-03 11:23:16 +01:00
peterdell
8d0870d1a1 Fix typo in readme 2016-01-03 11:21:17 +01:00
Piotr Fusik
d7c22cec84 Include label name in the unused label warning.
Close #1.
2016-01-03 08:47:19 +01:00
Piotr Fusik
b42f9dc2bf Support a:/f: modifiers on run/ini. 2014-12-31 14:30:09 +01:00
Piotr Fusik
5680efc7f5 Improve I/O performance on Windows (especially network drives).
Reported by Marek Pavlik.
2014-09-26 16:42:54 +02:00
Piotr Fusik
8c6ff185af vim-xasm 2014-07-22 10:22:17 +02:00
Piotr Fusik
5970a93423 xasm 3.1.0 release. 2014-07-20 19:10:41 +02:00
Piotr Fusik
389f7446e0 Exclude xasm.o from OS X distribution. 2014-07-20 17:39:35 +02:00
Piotr Fusik
3cec1c8ee8 Extend OS X compatibility: 32-bit binary for 10.6. 2014-07-20 17:14:36 +02:00
Piotr Fusik
60d28a5c24 xasm-scite DEB. 2014-06-12 21:19:11 +02:00
Piotr Fusik
de22438740 More details about the SciTE integration. 2014-06-12 17:24:51 +02:00
Piotr Fusik
cc5568795e RPM and tar.gz distributions. 2014-06-12 17:24:12 +02:00
Piotr Fusik
d1276f3d97 DEB distribution. 2014-06-11 14:41:49 +02:00
Piotr Fusik
2d8b3cde17 Update README. 2014-06-11 12:00:06 +02:00
Piotr Fusik
c357fba52c OS X distribution. 2014-06-10 13:50:42 +02:00
Piotr Fusik
61327c8e5b "opt u-" disables "/u" unused label warnings. 2014-04-30 09:19:49 +02:00
Piotr Fusik
167c441fed INS: optimize "opcode" if length not specified as one. 2014-04-04 20:26:33 +02:00
Piotr Fusik
3a845f9a4f INS: allow line repeating (suggested by Marek Pavlik), taking "opcode", skip/repeat branches. 2014-04-04 20:20:40 +02:00
Piotr Fusik
50bae061f7 Remove duplicate filenames for -M. 2014-02-21 23:29:58 +01:00
Piotr Fusik
520145268a If cannot open the file to be included, report error in the ICL line. 2014-02-21 23:06:03 +01:00
Piotr Fusik
059b631aab Generate manpage. 2013-10-02 13:24:57 +02:00
Piotr Fusik
f2e7796c87 6502 inflate is a separate project. 2013-10-02 13:16:42 +02:00
Piotr Fusik
61bffbb8ec README for GitHub. 2013-05-10 20:14:56 +02:00
Piotr Fusik
a2d6f9c864 DMD64 compilation errors reported by Vadim Akimov. 2013-03-19 11:13:26 +01:00
Piotr Fusik
3fc9b5c0f5 Get rid of the deprecated std.stream. 2013-03-19 11:12:12 +01:00
Piotr Fusik
406354e06c Updated to DMD 2.061. Implemented /p outside Windows. Restored blank lines in the listing. 2013-02-19 17:37:14 +01:00
Adrian Matoga
6992795f55 Upgraded to DMD 2.051. 2013-02-19 14:59:55 +01:00
18 changed files with 4340 additions and 4257 deletions

16
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: tests
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
dc: [dmd-latest, ldc-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
- run: dub build
- run: dub test

10
.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
/xasm
/xasm.exe
/xasm.obj
/xasm.html
/xasm.1
/xasm-test-*
/MANIFEST
/.dub
/.project
/signed

View File

@ -1,53 +1,74 @@
VERSION = 3.0.2
VERSION = 3.2.1
ASCIIDOC = asciidoc -o $@ -a doctime
ASCIIDOC_POSTPROCESS = perl -pi.bak -e "s/527bbd;/20a0a0;/;END{unlink '$@.bak'}" $@
ASCIIDOC_VALIDATE = xmllint --valid --noout --nonet $@
RM = rm -f
ZIP = 7z a -mx=9 -tzip $@
prefix = /usr/local
bindir = $(prefix)/bin
mandir = $(prefix)/share/man/man1
ifeq ($(OS),Windows_NT)
EXEEXT = .exe
endif
all: xasm.exe xasm.html
SEVENZIP = 7z a -mx=9 -bd -bso0
xasm.exe: xasm.d
dmd -O -release $<
all: xasm$(EXEEXT) xasm.html
xasm.html: xasm.1.txt
$(ASCIIDOC) -d manpage $<
$(ASCIIDOC_POSTPROCESS)
$(ASCIIDOC_VALIDATE)
xasm$(EXEEXT): source/app.d
dmd -of$@ -O -release $<
dist: xasmpage-$(VERSION).zip
xasm.html: xasm.1.asciidoc
asciidoc -o - $< | sed -e "s/527bbd;/20a0a0;/" >$@
xasmpage-$(VERSION).zip: xasm261.zip xasm-$(VERSION)-src.zip xasm-$(VERSION)-windows.zip inflate6502.zip index.html inflate.html scite.png
$(RM) $@
$(ZIP) $^
xasm.1: xasm.1.asciidoc
a2x -f manpage $<
xasm-$(VERSION)-src.zip: xasm.d Makefile xasm.1.txt
$(RM) $@
$(ZIP) $^
install: xasm xasm.1
mkdir -p $(DESTDIR)$(bindir) && install xasm $(DESTDIR)$(bindir)/xasm
mkdir -p $(DESTDIR)$(mandir) && install -m 644 xasm.1 $(DESTDIR)$(mandir)/xasm.1
xasm-$(VERSION)-windows.zip: xasm.exe xasm.html xasm.properties
$(RM) $@
$(ZIP) $^
uninstall:
$(RM) $(DESTDIR)$(bindir)/xasm $(DESTDIR)$(mandir)/xasm.1
inflate6502.zip: inflate.asx gzip2deflate.c gzip2deflate.exe
$(RM) $@
$(ZIP) $^
install-scite: xasm.properties
mkdir -p $(DESTDIR)$(prefix)/share/scite && install -m 644 $< $(DESTDIR)$(prefix)/share/scite/xasm.properties
gzip2deflate.exe: gzip2deflate.c
mingw32-gcc -s -O2 -Wall -o $@ $<
uninstall-scite:
$(RM) $(DESTDIR)$(prefix)/share/scite/xasm.properties
index.html: index.txt
$(ASCIIDOC) $<
$(ASCIIDOC_POSTPROCESS)
$(ASCIIDOC_VALIDATE)
dist: srcdist ../xasm-$(VERSION)-windows.zip
inflate.html: inflate.txt
$(ASCIIDOC) $<
$(ASCIIDOC_POSTPROCESS)
$(ASCIIDOC_VALIDATE)
srcdist: MANIFEST
$(RM) ../xasm-$(VERSION).tar.gz && /usr/bin/tar -c --numeric-owner --owner=0 --group=0 --mode=644 -T MANIFEST --transform=s,,xasm-$(VERSION)/, | $(SEVENZIP) -tgzip -si ../xasm-$(VERSION).tar.gz
MANIFEST:
if test -e .git; then (git ls-files | grep -vF .gitignore && echo MANIFEST) | sort | dos2unix >$@ ; fi
../xasm-$(VERSION)-windows.zip: xasm.exe xasm.html xasm.properties signed
$(RM) $@ && $(SEVENZIP) -tzip $@ xasm.exe xasm.html xasm.properties
signed: xasm$(EXEEXT)
signtool sign -d "xasm $(VERSION)" -n "Open Source Developer, Piotr Fusik" -tr http://time.certum.pl -fd sha256 -td sha256 $< && touch $@
deb:
debuild -b -us -uc
osx: ../xasm-$(VERSION)-macos.dmg
../xasm-$(VERSION)-macos.dmg: osx/xasm osx/bin
ifdef PORK_CODESIGNING_IDENTITY
codesign --options runtime -f -s $(PORK_CODESIGNING_IDENTITY) osx/xasm
endif
hdiutil create -volname xasm-$(VERSION)-macos -srcfolder osx -format UDBZ -fs HFS+ -imagekey bzip2-level=3 -ov $@
/Applications/Xcode.app/Contents/Developer/usr/bin/notarytool submit --wait --keychain-profile recoilnotarization $@
osx/xasm: source/app.d
mkdir -p osx && dmd -of$@ -O -release $< && rm -f osx/xasm.o
osx/bin:
mkdir -p osx && ln -s /usr/local/bin $@
clean:
$(RM) xasmpage-$(VERSION).zip xasm-$(VERSION)-src.zip xasm-$(VERSION)-windows.zip xasm.exe xasm.html inflate6502.zip gzip2deflate.exe index.html inflate.html
$(RM) xasm xasm.exe xasm.obj xasm.html xasm.1 signed
rm -rf osx
.PHONY: all install uninstall install-scite uninstall-scite dist srcdist MANIFEST deb osx clean
.DELETE_ON_ERROR:

112
README.md Normal file
View File

@ -0,0 +1,112 @@
[![GitHub Actions](https://github.com/pfusik/xasm/actions/workflows/test.yml/badge.svg)](https://github.com/pfusik/xasm/actions/workflows/test.yml)
xasm
====
xasm is a 6502 cross-assembler with original syntax extensions.
By default it generates binaries
for [Atari 8-bit computers](http://en.wikipedia.org/wiki/Atari_8-bit_family).
Syntax
------
6502 assembly code is full of LDA, STA, LDA, STA sequences.
With xasm you can use MVA as a shortcut for an LDA/STA pair or even MWA for 16-bit transfers.
Short branches can be replaced with conditional skip and repeat pseudo-instructions.
You can use a pair of instructions with a shared argument.
These are just some of the features that help you program in a more concise way.
Let's look at typical 6502 code (which is also valid in xasm):
lda #<dest
sta ptr
lda #>dest
sta ptr+1
ldx #192
do_line
ldy #39
do_byte
lda pattern,y
sta (ptr),y
dey
bpl do_byte
lda #40
clc
adc ptr
sta ptr
bcc skip
inc ptr+1
skip
dex
bne do_line
Using xasm's features this code can be rewritten to:
mwa #dest ptr
ldx #192
do_line
ldy #39
mva:rpl pattern,y (ptr),y-
lda #40
add:sta ptr
scc:inc ptr+1
dex:bne do_line
xasm syntax is an extension of Quick Assembler's (created in 1991 for Atari 8-bit).
Accumulator shifts should be written as in `asl @`.
Whitespace is important: it is required before the instruction
and disallowed in the operands, because it separates a comment from the operand, e.g.
lda #0 this is a comment, no need for a semicolon
This may look weird at first, but it enables nice features such as instruction pairs
and two-argument pseudo-instructions.
Usage
-----
xasm is a command-line tool.
Therefore you additionally need a programmer's text editor.
I use [SciTE](http://www.scintilla.org/SciTE.html).
To install xasm syntax highlighting and single-keystroke compilation,
copy `xasm.properties` to the SciTE directory.
For single source file programs, press Ctrl+F7 to compile.
You can double-click error messages to go to the incorrect line.
Press F5 to run the program in the emulator.
For larger projects, I use GNU Make. Press F7 to build (and possibly run)
a project as described in the `Makefile`. You can find my Makefiles in
[my repositories](https://github.com/pfusik?tab=repositories) on GitHub.
If you prefer VIM, see a link below.
Poetic License
--------------
This work 'as-is' we provide.
No warranty express or implied.
We've done our best,
to debug and test.
Liability for damages denied.
Permission is granted hereby,
to copy, share, and modify.
Use as is fit,
free or for profit.
These rights, on this notice, rely.
Download
--------
[xasm 3.2.1](https://github.com/pfusik/xasm/releases) for Windows, macOS, Ubuntu and Fedora.
Links
-----
* [Atari800](https://atari800.github.io/) - portable emulator of Atari 8-bit computers
* [Atari XL/XE Source Archive](http://sources.pigwa.net/) - source code of Atari demos, utilities and games
* [cc65](https://cc65.github.io/) - C cross-compiler targeting 6502-based systems
* [MADS](http://mads.atari8.info/) - another 6502/65816 cross-assembler, partially supporting xasm's syntax
* [vim-xasm](https://github.com/lybrown/vim-xasm) - VIM syntax highlighting for xasm
* [WUDSN IDE](http://wudsn.com/) - Eclipse plugin, front-end to several 6502 cross-assemblers, including xasm

23
debian/changelog vendored Normal file
View File

@ -0,0 +1,23 @@
xasm (3.2.1-1) UNRELEASED; urgency=low
* New release.
-- Piotr Fusik <fox@scene.pl> Thu, 8 Dec 2022 09:30:29 +0100
xasm (3.2.0-1) UNRELEASED; urgency=low
* New release.
-- Piotr Fusik <fox@scene.pl> Tue, 22 Jun 2021 20:59:45 +0200
xasm (3.1.1-1) UNRELEASED; urgency=low
* New release.
-- Piotr Fusik <fox@scene.pl> Wed, 20 Nov 2019 13:30:11 +0100
xasm (3.1.0-1) UNRELEASED; urgency=low
* First deb packaging.
-- Piotr Fusik <fox@scene.pl> Sun, 20 Jul 2014 19:08:15 +0200

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

16
debian/control vendored Normal file
View File

@ -0,0 +1,16 @@
Source: xasm
Maintainer: Piotr Fusik <fox@scene.pl>
Section: devel
Priority: optional
Standards-Version: 4.6.0
Build-Depends: debhelper (>= 7), dmd (>= 2), asciidoc-base
Package: xasm
Architecture: any
Depends: ${shlibs:Depends}
Description: 6502 cross-assembler with original syntax extensions.
Package: xasm-scite
Architecture: all
Depends: scite
Description: xasm syntax highlighting and single keystroke compilation for SciTE.

7
debian/copyright vendored Normal file
View File

@ -0,0 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Name: xasm
Source: https://github.com/pfusik/xasm
Files: *
Copyright: 1998-2021 Piotr Fusik <fox@scene.pl>
License: Poetic

6
debian/rules vendored Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_install:
$(MAKE) DESTDIR=$$(pwd)/debian/tmp prefix=/usr install install-scite

1
debian/xasm-scite.install vendored Normal file
View File

@ -0,0 +1 @@
usr/share/scite/xasm.properties

2
debian/xasm.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/bin/xasm
usr/share/man/man1/xasm.1

5
dub.sdl Normal file
View File

@ -0,0 +1,5 @@
name "xasm"
description "6502 cross-assembler with original syntax extensions"
authors "Piotr Fusik"
copyright "Copyright © 1998-2021, Piotr Fusik"
license "poetic"

File diff suppressed because it is too large Load Diff

View File

@ -1,112 +0,0 @@
xasm - 6502 cross-assembler
===========================
xasm is a free tool for programming
http://en.wikipedia.org/wiki/Atari_8-bit_family[Atari 8-bit family computers].
History
-------
First version of xasm was written in 1998. I needed a cross-assembler
that could understand the syntax of Quick Assembler
which I used for 8-bit Atari programming before I got a PC.
Initially xasm supported the syntax of QA and nothing more.
I quickly realized that I could extend the syntax to make it more expressive.
This led to xasm 2.0, still in 1998. I added some more features
next year. In 2002 I released many versions which contained
mostly bugfixes. In 2005 there were some minor enhancements and bug fixes,
as well as the whole assembler was rewritten from the x86 assembly language
it was initially written in to the http://www.digitalmars.com/d/[D programming language].
Current version 3.0.2 was released 17th October 2009.
Syntax
------
6502 assembler code is usually full of LDA, STA, LDA, STA sequences.
With xasm you can use MVA as a shortcut for LDA/STA pair
or even MWA for 16-bit transfers. You can avoid defining labels
when you need short jumps, thanks to conditional skip
and repeat pseudo-instructions. You can put two instructions
that share their argument in one line.
These are just some of the features that help you program
in a more concise way. Let's look at typical 6502 code
(which is also valid in xasm):
-----------------------------
lda #<dest
sta ptr
lda #>dest
sta ptr+1
ldx #192
do_line
ldy #39
do_byte
lda pattern,y
sta (ptr),y
dey
bpl do_byte
lda #40
clc
adc ptr
sta ptr
bcc skip
inc ptr+1
skip
dex
bne do_line
-----------------------------
Using xasm's features this code can be rewritten to:
-----------------------------
mwa #dest ptr
ldx #192
do_line
ldy #39
mva:rpl pattern,y (ptr),y-
lda #40
add:sta ptr
scc:inc ptr+1
dex:bne do_line
-----------------------------
Usage
-----
xasm is a command-line tool.
Therefore you additionally need a programmer's text editor.
I use http://www.scintilla.org/SciTE.html[SciTE].
Syntax highlighting definition for it is included with xasm.
To install it, copy `xasm.properties` to the SciTE directory,
select _Options / Open Global Options File_, type `import xasm`
at the end and save the global configuration file.
image::scite.png[xasm code in SciTE]
Download
--------
- link:xasm-3.0.2-windows.zip[xasm 3.0.2 for Windows]
- link:xasm-3.0.2-src.zip[xasm 3.0.2 source code]
- link:xasm261.zip[xasm 2.6.1 for DOS]
For other systems, such as GNU/Linux and MacOS X, install a D 1.x compiler
and compile xasm from source code.
Inflate
-------
Do you need a good decompression routine for 6502?
See my link:inflate.html[inflate routine].
Links
-----
- http://atari800.sourceforge.net/[Atari800 emulator] - portable emulator of Atari 8-bit computers
- http://sources.pigwa.net/[Atari XL/XE Source Archive] - source code of Atari demos, utilities and games
- http://www.cc65.org/[cc65] - C cross-compiler targeting 6502-based systems
- http://epi.atari8.info/hcasm.php[HardCore Assembler] - 6502/65816 cross-assembler, partially supporting xasm's syntax
- http://mads.atari8.info/[MADS] - another 6502/65816 cross-assembler, partially supporting xasm's syntax
- http://wudsn.com/[WUDSN IDE] - Eclipse plugin, front-end to several 6502 cross-assemblers including xasm

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,6 +1,6 @@
XASM (1)
========
Piotr Fusik <fox@scene.pl>
:doctype: manpage
NAME
----
@ -16,6 +16,7 @@ DESCRIPTION
'SOURCE_FILE' is the name of the source file
(you may omit the default `.asx` extension).
Using '-' as 'SOURCE_FILE' makes *xasm* read from standard input.
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`.
@ -23,57 +24,61 @@ with the extension changed to `.obx`.
OPTIONS
-------
*/c*::
Specifies that lines skipped due to a false condition
should be included in the listing file.
*-c*::
The listing should include conditionally skipped lines.
[[new_deflabel]]*/d:*'LABEL'='VALUE'::
[[new_deflabel]]*-d* 'LABEL'='VALUE'::
Defines a label.
'LABEL' should be a valid label name.
'VALUE' may be any expression (may reference to labels defined in source files).
You may use several */d* options to define many labels from the command line.
'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.
*/i*::
Excludes included files from the listing file.
*-i*::
The listing file should exclude included files.
*/l*'[:LISTING_FILE]'::
Generates listing file.
*-l* '[LISTING_FILE]'::
Generates a listing file.
Using '-' as 'LISTING_FILE' makes *xasm* write to standard output.
If 'LISTING_FILE' is omitted, the listing filename
is 'SOURCE_FILE' with the extension changed to `.lst`.
[[new_makefile]]*/M*::
Prints a rule for use in a `Makefile`.
[[new_makefile]]*-M*::
Prints a `Makefile` rule.
First line of the rule lists 'OBJECT_FILE' as the target of the rule
and all source files (including the ones specified by `icl` and `ins` directives)
as dependencies. The second line contains the command line with `OBJECT_FILE`
replaced by the *make* macro `$@` and `SOURCE_FILE` replaced by the macro `$<`.
Dollars in the command line are doubled.
Your `make` or shell may require more escaping.
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 `$<`.
Dollar signs in the command line are doubled.
Your *make* or shell may require further escaping.
*/o*':OBJECT_FILE'::
*-o* 'OBJECT_FILE'::
Sets output file name.
The default is 'SOURCE_FILE' with the extension changed to `.obx`.
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.
[[new_fullpaths]]*/p*::
Prints fully qualified file names in listing and error messages.
This option works only on Windows and is silently ignored on other platforms.
[[new_fullpaths]]*-p*::
Prints absolute paths in listing and error messages.
[[new_quiet]]*/q*::
Quiet mode. Prevents *xasm* from printing the logo and the summary.
[[new_quiet]]*-q*::
Quiet mode. Prevents *xasm* from printing its banner and compilation summary.
*/t*'[:LABEL_FILE]'::
Generates label table.
If 'LABEL_FILE' is omitted then the table is appended to the listing.
*-t* '[LABEL_FILE]'::
Generates a label table.
Using '-' as 'LABEL_FILE' makes *xasm* write to standard output.
If 'LABEL_FILE' is omitted then the table is appended at the end of the listing.
[[new_unlabels]]*/u*::
Issues a warning message for each label whose value is unused.
[[new_unlabels]]*-u*::
Issues warnings for unreferenced labels.
Alternatively, you may use Unix-style options, for example:
Alternatively, you may use DOS-style options, for example:
-----------------------------------------------------------
xasm -i -d DEBUG=1 -l listing.lst source.asx
xasm /i /d:DEBUG=1 /l:listing.lst source.asx
-----------------------------------------------------------
These are deprecated because they are incompatible with https://www.msys2.org[MSYS2].
SYNTAX
------
@ -82,19 +87,41 @@ LF, CR, CR/LF and Atari ($9b) line terminators are supported.
Labels and instructions are case-insensitive.
*xasm* is backward compatible with Quick Assembler.
To compile QA sources with *xasm*, simply replace ATASCII-specific characters
with their integer codes. You also have to update all `OPT` directives,
but usually you can simply remove them.
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.
'Label' is a symbol that represents a signed 32-bit integer.
A 'label' is a symbol that represents a signed 32-bit integer.
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'
(i.e. the address of the compiled instruction),
unless you use it with the `EQU` directive where it is assigned
the value of the argument.
(that is, the address of the compiled instruction),
unless you use it with the `EQU` directive to assign the specified value.
Instructions and directives must be preceded with some whitespace.
[[new_locallabel]]
Any label name starting with a `?` (question mark) is a 'local label'.
It is implicitly prefixed with the name of the most recently defined
'global label' (that is, a label without any `?` in name),
and remains visible until another global label is defined.
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
----
'Instructions' and 'directives' must be preceded with some whitespace.
Without leading whitespace they are treated as label names.
For example:
----
@ -104,10 +131,10 @@ is a 6502 instruction, whereas
----
nop
----
defines a label called `nop`.
(without leading space) defines a label called `nop`.
Whole-line comments must start with a semicolon, an asterisk or a pipe,
with optional label definition and spaces before.
with an optional label definition and spaces before.
Here are examples of whole-line comments:
--------------------
; this is a comment
@ -121,12 +148,12 @@ To assemble a single line several times,
precede the repeat count with a colon, for example:
-----------------
:4 asl @
table :32*5 dta 5
mask_lookup :32 dta $80,$40,$20,$10,$08,$04,$02,$01
-----------------
In lines with instructions or directives, a comment starts immediately
after the instruction/directive has been successfully parsed.
That is, in these lines *xasm* does not require a special character
That is, in such lines *xasm* does 'not' require any special character
to start a comment.
-------------------------------------------------------------
lda foo ; this is a comment
@ -135,7 +162,7 @@ to start a comment.
-------------------------------------------------------------
[[new_pairing]]
You may put two instructions in one line so they share the operand.
You may put two or more instructions in one line, so they share their operand.
For example:
------------
eor:sta foo
@ -148,9 +175,9 @@ is equivalent to
Note that
------------
lda:tax #0
lda:tax:tay #0
------------
is allowed because `#0` is treated as a comment for `tax`.
is allowed because `#0` is treated as a comment for `tax` and `tay`.
EXPRESSIONS
-----------
@ -160,14 +187,14 @@ for 6502 indirect addressing.
A number is:
- a 32-bit decimal integer, e.g. `-12345`
- a 32-bit decimal integer, e.g. `12345`
- a 32-bit hexadecimal integer, e.g. `$abcd`
- a 32-bit binary integer, e.g. `%10100101`
- an ASCII character, e.g. `'a'` or `"a"`
- origin counter: `*`
- the current value of the origin counter: `*`
- a hardware register (see below), e.g. `^4e`
- [[new_opcode]]an opcode (see below), e.g. `{lda #0}` is `$a9`
- [[new_linecnt]]the line repeat counter (see below): `#`
- [[new_linecnt]]the current value of the line repeat counter (see below): `#`
Abbreviations of Atari hardware registers are provided
to save two characters (`$d40e` vs `^4e`)
@ -178,7 +205,7 @@ is the location of hardware registers.
[cols="^m,^d,^m,^d",options="header"]
|================================================
|Syntax|Chip |Value|Value (Atari 5200 mode `opt g+`)
|Syntax|Chip |Value|Value in Atari 5200 mode (`opt g+`)
| ^0x |GTIA |$D00x|`$C00x`
| ^1x |GTIA |$D01x|`$C01x`
| ^2x |POKEY|$D20x|`$E80x`
@ -228,14 +255,15 @@ The following 'binary operators' are supported:
[[new_unary]]
The following 'unary operators' are supported:
- `+` Plus (does nothing)
- `+` 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)
The operator precedence is following:
Although the operators are like those used in C, C++, C# and Java,
their precedence is different:
- first: `[]` (brackets)
- `+ - ~ < >` (unary)
@ -246,68 +274,79 @@ The operator precedence is following:
- `&&` (binary)
- last: `||` (binary)
Although the operators are similar to those used in C, C++ and Java,
their priorities are different than in these languages.
Compare and logical operators assume that zero is false and a non-zero
is true. They return 1 for true.
The compare and logical operators assume that zero is false
and a non-zero is true. They return 1 for true.
Expressions are calculated in signed 32-bit arithmetic.
"Arithmetic overflow" error signals overflow of the 32-bit range.
An overflow is signaled with an "Arithmetic overflow" error.
DIRECTIVES
----------
*EQU* - assign value of expression to label::
*EQU* - assign the value of an expression to a label::
Examples:
+
----------
five equ 5
here equ *
----------
[[new_opt]]*OPT* - set assembler options::
Five options are available:
- `F` - fill the space between memory areas with `$FF`
- `G` - Atari 5200 mode for hardware register abbreviations
Six options are available:
- `F` - fill the space between noncontiguous memory areas with `$FF` bytes
- `G` - Atari 5200 mode for hardware register abbreviations (`^xx`)
- `H` - generate Atari executable headers
- `L` - write to the listing
- `O` - write to the object file
- `L` - write the listing
- `O` - write the object file
- `U` - warn of unused labels
+
You can turn any of these on or off.
The default (if no `OPT` specified) is `opt f-g-h+l+o+`.
The default (before the first `OPT`) is `opt f-g-h+l+o+u+`.
For compatibility with MADS, `opt ?+` is accepted and ignored.
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
opt ?+ MADS compatibility, no effect
------------------------------------------------------------------------------
*ORG* - change value of the origin counter::
If Atari executable headers are enabled, you can include an operand prefix:
*ORG* - set the origin counter::
If Atari executable headers are enabled (`opt h+`), you can include an operand prefix:
- `a:` starts a new block even if it's superfluous
because the new address equals the current address.
- `f:` is same as `a:`, but additionally generates a double-`$FF` prefix
- `f:` is same as `a:`, but additionally generates a double `$FF` prefix
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).
[[new_orgr]]Starting with version 2.6.0, *xasm* supports code
that is relocated in the memory at runtime. Let's say you want your code
to be located on page zero. You can't normally load it directly into this
place, so you load it at a different address and then move in your program.
+
[[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.
`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
@ -320,10 +359,11 @@ 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,
because I think this is not useful. If you really need it, you can
always type something like:
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
---------------------------------------
@ -341,17 +381,17 @@ where_am_i equ *-code_zpage+code_loaded
You may enter many expressions in parentheses and combine different types
of data in single line, separating things with commas.
You may also define a sine lookup table. The syntax is:
You may also build a sine lookup table. The syntax is:
-------------------------------
sin(center,amp,size,first,last)
sin(center,amp,period,first,last)
-------------------------------
where:
* `center` is an integer which is added to every sine value
* `amp` is the sine amplitude
* `size` is the sine period
* `period` is the number of values per sine period
* `first,last` define the range of sine arguments.
They are optional. The default are `0,size-1`.
They are optional. The default are `0,period-1`.
Example:
----------------------------
@ -372,8 +412,7 @@ Real numbers are stored in the 6-byte Atari Floating-Point format.
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.
If the string is suffixed with a `*` character, bit 7 in every byte gets inverted.
--
+
Examples of `DTA`:
@ -384,56 +423,72 @@ Examples of `DTA`:
------------------------------------------------
*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'
-----------------
Note: for portability, use only relative paths and slash as the separator.
This way your sources will compile under Windows and Linux.
+
NOTE: For Windows/macOS/Linux portability use relative paths
and slashes as path separators.
*END* - end this source file::
*END* - end assembling file::
May be used if the source file ends with something which shouldn't
be read by *xasm* (e.g. your notes). At the end of file it's optional.
be read by *xasm* (e.g. your notes).
*INS* - insert binary file contents::
*INS* - insert contents of file::
Copies every byte of the specified file into the object file and updates
the origin counter, as if these bytes were defined with `DTA`.
the origin counter, as if these bytes were specified in a `DTA`.
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'
ins 'file',-256 insert last 256 bytes of file
ins 'file',10,10 insert bytes 10..19 of file
ins 'file',-256 ; insert last 256 bytes of file
ins 'file',10,10 ; insert bytes 10..19 of file
-----------------------------------------------
*RUN* - set run address in the Atari executable format::
*RUN* - set the Atari executable run address::
+
---------
run main
---------
+
is equivalent to:
+
------------
org $2e0
dta a(main)
------------
*INI* - set init address in the Atari executable format::
*INI* - set the Atari executable init address::
Example:
+
------------
ini showpic
ini showloadingpic
------------
*ERT* - generate error if expression evaluates to true::
*ERT* - abort the assembly with an error if an expression is true::
Examples:
+
-----------------------
ert *>$c000
ert len1>$ff||len2>$ff
@ -443,10 +498,12 @@ Examples:
*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
@ -459,7 +516,9 @@ widescr equ 1
eif
sta $22f
-------------
Note: the above example may be rewritten using the 'repeat line' feature:
+
NOTE: Alternatively, the above example can be written using the 'repeat line' feature:
+
--------------------------
noscr equ 1
widescr equ 1
@ -471,18 +530,21 @@ widescr equ 1
PSEUDO COMMANDS
---------------
'Pseudo commands' are built-in macros. There are no user-defined macros in *xasm*.
'Pseudo commands' are built-in macros. There are 'no' user-defined macros in *xasm*.
*ADD* - add without carry::
*ADD* - addition 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* - subtraction::
It is `SEC` and `SBC`.
*SUB* - subtract::
It is `SEC` followed by `SBC`.
[[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.
@ -505,6 +567,7 @@ copy_loop lda $500,x
--------------------
*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.
@ -518,9 +581,10 @@ Example:
+
In the above example the 16-bit variable `ptr` is incremented by 40.
*JCC, JCS, JEQ, JMI, JNE, JPL, JVC, JVS* - conditional jumps::
*JCC, JCS, JEQ, JMI, JNE, JPL, JVC, JVS* - conditional jump::
These are long branches. While standard branches (such as `BNE`)
have range of -128..+127, these jumps have range of 64 kB.
have range of -128..+127 bytes, these jumps have range of 64 KB.
For example:
+
---------
@ -534,6 +598,7 @@ is equivalent to:
-------------
*INW* - increment word::
Increments a 16-bit word in the memory.
Example:
+
@ -548,7 +613,8 @@ is equivalent to:
sne:inc dest+1
---------------
*MVA, MVX, MVY* - move byte using accumulator, X or Y::
*MVA, MVX, MVY* - move a byte using the accumulator, X or Y::
Each of these pseudo commands requires two operands
and substitutes two commands:
+
@ -559,33 +625,34 @@ and substitutes two commands:
----------------------------------------
[[new_mwinde]]*MWA, MWX, MWY* - move word using accumulator, X or Y::
These pseudo commands require two operands and are combinations of two `MV*`'s:
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 `MW*`.
Destination must be an absolute address, optionally indexed.
When source is also an absolute address, an `mw* source dest` expands to:
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:
+
--------------------
mv* source dest
mv* source+1 dest+1
mva source dest
mva source+1 dest+1
--------------------
+
When source is an immediate value, an `mw* #immed dest` expands to:
When source is an immediate value, an `mwa #immed dest` expands to:
+
------------------
mv* <immed dest
mv* >immed dest+1
mva <immed dest
mva >immed dest+1
------------------
+
When `<immed` equals `>immed` and `immed` is not forward-referenced,
*xasm* skips the second `LD*`:
*xasm* skips the second `LDA`, generating the following code:
+
----------------
mv* <immed dest
st* dest+1
mva <immed dest
sta dest+1
----------------
+
If possible, `MWX` and `MWY` use increment/decrement commands.
If possible, `MWX` and `MWY` use increment/decrement instructions.
For example, `mwx #1 dest` expands to:
+
-----------
@ -598,11 +665,11 @@ For example, `mwx #1 dest` expands to:
ADDRESSING MODES
----------------
All addressing modes are entered in the standard 6502 convention
except for the accumulator addressing mode,
which should be marked with the `@` character (as in Quick Assembler).
Addressing modes are entered in the standard 6502 convention.
An exception is the accumulator mode marked with the `@` character
for compatibility with Quick Assembler.
For Quick Assembler compatibility, there are two extra immediate
Also for Quick Assembler compatibility, there are two extra immediate
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 `#>`.
@ -646,13 +713,47 @@ and pseudo commands, except for `MWA`, `MWX` and `MWY`:
HISTORY
-------
Version 3.2.1 (2022-12-08)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- source can optionally be read from standard input, and object can be
written to standard output instead of files (by Adrian Matoga)
- <<new_pairing,any number of instructions in one line>> (by Adrian Matoga)
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`
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)
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)
- if the file to be included cannot be opened, report an error in the `ICL` line
(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 Makefile rule>>
- <<new_makefile,new command-line option */M* prints a Makefile rule>>
- command-line options are now case-insensitive
- on Windows error messages are printed in red, warnings in yellow
- on Windows, error messages are printed in red, warnings in yellow
Version 3.0.1 (2007-04-22)
~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -663,11 +764,11 @@ Version 3.0.1 (2007-04-22)
Version 3.0.0 (2005-05-22)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- rewritten from the x86 assembly language to the
http://www.digitalmars.com/d[D programming language] - Linux version
http://dlang.org/[D programming language] - Linux version
is now available and DOS is no longer supported
- no limits for line length, number of `ICLs`, `ORGs`,`IFTs` and labels
- no limits on line length, number of `ICLs`, `ORGs`, `IFTs` and labels
- Unix-style command-line options are supported
- */e* option is no longer supported
- the */e* option is removed
- the label table is now sorted alphabetically
Version 2.6.1 (2005-05-21)
@ -696,8 +797,7 @@ Version 2.6.0 (2005-02-07)
- <<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
- fatal I/O errors (such as floppy not ready) no longer print the annoying
"Abort, Retry, Ignore" message
- fatal I/O errors no longer print the annoying "Abort, Retry, Ignore" message
Version 2.5.2 (2002-10-03)
~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -712,7 +812,7 @@ Version 2.5.1 (2002-08-21)
Version 2.5 (2002-07-08)
~~~~~~~~~~~~~~~~~~~~~~~~
- fixed another bug, very similar to the previous one, e.g.
- fixed another bug similar to the previous one, for example:
+
----------
ift 0
@ -744,14 +844,13 @@ Version 2.4 (2002-05-22)
~~~~~~~~~~~~~~~~~~~~~~~~
- fixed incorrect unary operator precedence
- fixed wrong label value after a skip pseudo command
- the assembler is .EXE (.COM caused problems with DJGPP *make* due
- the assembler is an .EXE (.COM caused problems with DJGPP *make* due
to a bug in the DJGPP runtime)
- the assembler executable is not compressed (so it occupies less space in the ZIP)
- improved command-line parsing: options may be used before source file name,
tab character is a valid separator, slash may be used as a directory separator
- 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
- error and warning messages are written to stderr, not stdout
- added `==` (equals) operator, which is equivalent to `=`,
but more natural for C/C++/Java programmers
- added `==` (equals) operator, equivalent to `=`, but familiar to C/C++/Java programmers
- <<new_deflabel,added `/d:label=value` option: define a label>>
- <<new_fullpaths,added `/p` option: print full paths
in listing and error messages>>
@ -779,11 +878,11 @@ Version 2.2 (1999-09-10)
- fixed `ICL` in last line
- fixed `OPT H-H+`
- fixed first `ORG *`
- no need to set origin counter until it's used
- no need to set the origin counter until it's needed
- allow Unix, Macintosh and Atari EOLs
- value of 'true' changed to 1
- command-line option to set environment variables on error
- commane-line option to assemble only if source is newer than object file
- command-line option to assemble only if the source is newer than the object file
- <<new_opcode,opcode extracting>>
- <<new_linerep,repeat line>>
- <<new_pairing,two instructions in line>>
@ -792,7 +891,7 @@ Version 2.2 (1999-09-10)
Version 2.0 (1998-11-12)
~~~~~~~~~~~~~~~~~~~~~~~~
- fixed: name of object file was truncated
- fixed: object filename was truncated
- fixed forward references in `EQU` and `DTA`
- fixed hex numbers
- `.OBX` is now the default extension for the object file
@ -822,4 +921,4 @@ Piotr Fusik <fox@scene.pl>
SEE ALSO
--------
Website: http://xasm.atari.org[]
Website: https://github.com/pfusik/xasm[]

View File

@ -1,10 +1,12 @@
# xasm settings for SciTE (http://www.scintilla.org/SciTE.html)
file.patterns.asx=*.asx
filter.asx=xasm (asx)|$(file.patterns.asm)|
lexer.$(file.patterns.asx)=asm
file.patterns.xasm=*.asx
filter.xasm=xasm (asx)|$(file.patterns.xasm)|
*filter.xasm=$(filter.xasm)
lexer.$(file.patterns.xasm)=asm
*language.xasm=xasm|asx||
keywords.$(file.patterns.asx)= \
keywords.$(file.patterns.xasm)= \
adc add and asl bcc bcs beq bit \
bmi bne bpl brk bvc bvs clc cld \
cli clv cmp cpx cpy dec dex dey \
@ -32,9 +34,9 @@ style.asm.7=
style.asm.12=$(colour.char)
style.asm.13=$(colour.error)
command.compile.$(file.patterns.asx)=xasm /o:$(FileName).xex $(FilePath)
command.build.$(file.patterns.asx)=make
command.compile.$(file.patterns.xasm)=xasm /o:$(FileName).xex $(FilePath)
command.build.$(file.patterns.xasm)=make
if PLAT_WIN
command.go.$(file.patterns.asx)=start $(FileName).xex
command.go.$(file.patterns.xasm)=start $(FileName).xex
if PLAT_GTK
command.go.$(file.patterns.asx)=atari800 -run $(FileName).xex
command.go.$(file.patterns.xasm)=atari800 -run $(FileName).xex

40
xasm.spec Normal file
View File

@ -0,0 +1,40 @@
Name: xasm
Version: 3.2.1
Release: 1
Summary: 6502 cross-assembler
License: Poetic
Source: http://pfusik.github.io/xasm/xasm-%{version}.tar.gz
URL: https://github.com/pfusik/xasm
BuildRequires: dmd >= 2, asciidoc
%description
xasm is a 6502 cross-assembler with original syntax extensions.
%global debug_package %{nil}
%prep
%setup -q
%build
make xasm xasm.1
%install
make DESTDIR=%{buildroot} prefix=%{_prefix} install
%files
%{_bindir}/xasm
%{_mandir}/man1/xasm.1.gz
%changelog
* Thu Dec 8 2022 Piotr Fusik <fox@scene.pl>
- 3.2.1-1
* Tue Jun 22 2021 Piotr Fusik <fox@scene.pl>
- 3.2.0-1
* Wed Nov 20 2019 Piotr Fusik <fox@scene.pl>
- 3.1.1-1
* Sun Jul 20 2014 Piotr Fusik <fox@scene.pl>
- 3.1.0-1
- Initial packaging