asxa
Assembler for NXP XA-51 Microcontrollers

A project hosted at
SourceForge.net Logo

asxa is an assembler for the XA-51 family os microcontrollers. Our aim is to support the complete instruction set described in the "XA User Guide" (The link loads a 1.7MB *.PDF manual from NXP).

Motivation

When we decided to build a computer based on the Philips XA-S37 microcontroller, we searched the Internet looking for development tools for this architecture. What we found where commercial programs, most of them not free and very expensive and all of them only for Windows. This program aims to fill this gap, providing a minimum development tool for the XA architecture that is free and mutiplatform.

It is such a long time since the last upgrade to this page that even the name of the company that makes the XA architecture changed: it is now NXP instead of Philips. (Maybe I should change the name of this project to something like "asxa - Assembler for NXP XA Microcontrollers").

This package includes the assembler and a set of examples, including a monitor written in XA assembly language, with a disassembler and a step-by-step debugger.

How to Download

This program is freely distributed under GNU-GPL. You may get it from
http://sourceforge.net/projects/asxa There you may download files and browse CVS.

This is version 1.12 released in may/2007

asxa-1.12.tar.gzFor Linux
asxa112.zipFor MSDOS/Windows
The latest version may be obtained using anonymous CVS with the command: (Linux version).
cvs -d:pserver:anonymous@asxa.cvs.sourceforge.net:/cvsroot/asxa co asxa

How to compile

Linux To compile the assembler just go to the asxa directory and type on a command line:
 
make
 
The command
 
make install
 
will copy the executable asxa to the directory "/usr/local/bin" and the manual page asxa.1 to "/usr/local/man/man1". You will need to have write permission to these directories for a successful "make install".

To compile you will need gcc and the GNU Bison parser generator. The files "asxatab.c" and "asxatab.h" are generated by Bison using the file "asxa.y".

The command
 
make clean
 
removes all the files generated by a compilation.

To remove the files copied by "make install", use
 
make uninstall
 

Windows

In the Windows distribution we included the file asxa.exe compiled for 32 bit Windows and asxados.exe for MSDOS, so there is no need to compile. Include are the following executable programs:

asxa.exe
The assembler compiled for win32
asxados.exe
The assembler compiled for MSDOS
wtser.exe
A serial terminal for Windows console prompt to be used to communicate with the microcontroller and to upload *.hex files.
wtsg49.exe
This is a terminal with special commands to program the ISP Flash memory of XA-G39/XA-G49 Microcontrollers

If you want to compile anyway, I recommend you to use Dev-Cpp/mingw/gcc from http://www.bloodshed.net. Using devcpp, open the project:
asxa112/src/asxa/asxa.dev
and compile. Other C compilers may also do the job as well.

Additional files

The command line options and the basic assembly language syntax rules are documented in the manual page man asxa.

The examples subdirectory contains programs written in XA Assembly Language. There are the following files:
xa-g3.equ
xa-s3.equ
xa-g49.equ
These are header files intended to be included in the source program using the $INCLUDE directive. They contain the special function register (SFR) and specilal bit (SBIT) definitions for some particular variants of the XA architecture. You may create your own header files for other XA variants.
disasm.xa This is a disassembler to be embedded in a XA microcontroller system. It lists the code memory contents as XA instructions.
monxa.xa This is a monitor program. It runs in a XA system using the serial interface for Input/Output. The monitor calls the file disasm.xa as an $INCLUDE file. The monitor can load files in Intel HEX format, show and edit memory, show code as XA instructions (disassembly), and run programs step by step, showing register values and the current instruction. It responds to the following commands:

<ESC> The Escape key exits from any command
A show All registers
B set Breakpoint
C Dump code memory
D Dump external memory
E Edit (change/view memory)
F Finish (continue running a program)
G Go to (Run a program in single step mode)
J Jump to (Run a program normally)
L List (disassemble)
M Move data memory blocks
P Proceed (single step) with fast subroutine execution
R Show/Set Register
T Trace (single step into subroutines)
0,1,2,3 Set I/O port P0, P1, P2 or P3
X Execute a program at 0x8000

Before compiling the monitor we recommend you to check the custommization section at the begining of the file monxa.xa.

uart_int.xa This is a small application program showing how to set up a serial interface using interrupts to implement input and output FIFO buffers.
timer_int.xa This application implements a kind of a clock, using timer and UART interrupts.
test.xa This file is not intended to be executed as a program. It is used as a test to check if the assembler is producing the right code for every instruction.