Difference between revisions of "Programming under Unix-like operating systems"
m (Programming under Linux moved to Programming under Unix-like operating systems) |
m (Other Unixes placeholder) |
||
Line 157: | Line 157: | ||
| TIEmu 2 || 2.04 || /emulators/tiemu2 | | TIEmu 2 || 2.04 || /emulators/tiemu2 | ||
|} | |} | ||
+ | |||
+ | = Other Unixes = | ||
+ | <!--Replace with specific distributions as appropriate --> | ||
+ | {{Sectstub}} |
Revision as of 03:10, 6 August 2006
Here are the different tools at your disposal:
Contents
General Overviews
Emulators
- TilEm [1]
- VTI (with Wine)
Syntax highlighting
Several editors have native or extensional support for editing Z80 assembly code with syntax highlighting:
- Kwrite and Kate can be made to syntax-highlight Z80 assembly with the appropriate definition file. The file can be placed in /usr/share/apps/katepart/syntax to install it.
- SciTE and Emacs both have native modes for assembly code. For Emacs, one must make sure to turn on Font Lock mode as well.
- The Z80 Assembly IDE has simple syntax highlighting built-in.
- Users of Vim and WLA DX can use this syntax file.
Assembling
SPASM
Author: Spencer Putt
Home Page: http://www.revsoft.org/phpBB2/viewforum.php?f=21
SPASM is a portable Z80 assembler released under the GPL. Its distinguishing features are extremely fast assembly and powerful macro support. The output is only available in binary form, however with the use of Wabbitsign, written by James Montelongo and Spencer Putt, it can easily be converted to any desired program type.
assembler foo.asm foo.bin wabbit foo.bin foo.8xp
tpasm
Author: Todd Squires
Home page: http://www.sqrt.com/
tpasm is a Free (GPL) assembler which supports the Z80 as well as the 6805, 6809, 68HC11, 6502, Sunplus, 8051, PIC, and AVR. It uses syntax very similar to ZMASM.
tpasm 1.2 does not support binary file output, but you can use objcopy (from the GNU binutils package) to convert its Intel Hex output into binary; e.g.
tpasm foo.asm -o intel foo.hex -l foo.lst objcopy -I ihex foo.hex -O binary foo.bin
ASxxxx
Author: Alan R. Baldwin
Home page: http://shop-pdp.kent.edu/ashtml/asxxxx.htm
ASxxxx is a freeware assembler which supports the Z80 along with a large variety of other processors. It more closely resembles a modern PC assembler than a typical Z80 assembler, as it assembles each file into a relocatable object format which can then be linked with other files to produce the complete program. The linking is done by a separate program called ASlink (included with the package.)
To assemble and link a simple program you might do something like
asz80 -plogff foo.asm aslink -u -b _CODE=0x9D95 -i foo.ihx foo.rel objcopy -I ihex foo.ihx -O binary foo.bin
Note that the syntax is rather different from that of most Z80 assemblers. The important differences are
- Immediate values are marked with #.
- Indexed memory access is written as N(ix) rather than (ix+N).
- Constants are written differently: 0xAA, 0hAA, or $$AA for hexadecimal; 0o252, 0q252, or $&252 for octal; 0b10101010 or $%10101010 for binary.
For example,
ld hl,#str_hello add a,3(ix) xor #0x0f
There is also a modified version of ASxxxx distributed with the Small Device C Compiler. This version is, if anything, more confusing to use due to the poorly-documented changes made by the SDCC team.
TASM
Author: Thomas N. Anderson
Home page: http://home.comcast.net/~tasm/
TASM is a shareware assembler which also supports a variety of processors.
There are several ways that you can use tasm under Linux:
- The TASM 3.1 for Linux shareware release is still in the wild. To use this you will need to enable "a.out" support in your kernel (it may be available as the module binfmt_aout.) You will also need to obtain the ancient Linux libc version 4 (not glibc) which can be found here.
- You can use TASM 3.2 for Windows with Wine.
- You can pay the $40 and compile it yourself on the platform of your choice.
Brass
Author: benryves
Home page: http://benryves.com/bin/brass/
Brass runs under Linux thanks to Mono.
WLA DX
Author: Ville Helin
Home page: http://users.tkk.fi/~vhelin/wla.html
WLA DX is another open-source (GNU GPL) cross-assembler with a primary focus on targeting video game consoles. It is a high-powered assembler with a wide variety of features such as, e.g. separate compilation, POSIX-like file I/O, and code sectioning. However it is cumbersome when assembling small projects, and semantics are unorthodox compared to other assemblers. (~ is the XOR operator, macro arguments are passed by value, etc.) Furthermore, development appears to have ceased since January 2006.
WLA DX has had an influence in the development of Brass.
Pasmo
Author: Julián Albo
Home page: http://www.arrakis.es/~ninsesabe/pasmo/
Pasmo is another standalone Z80 cross-assembler with basic macro support, but without the ability to generate relocatable object files. It is licensed under the GNU GPL, and exists as the package pasmo in the Debian pool.
z80asm
Author: Bas Wijnen
Home page: http://savannah.nongnu.org/projects/z80asm/
z80asm is a standalone Z80 cross-assembler similar in nature to Pasmo, in that it has macro support but cannot generate relocatable object files. It too is licensed under the GNU GPL (version 2 or later), and exists as the package z80asm in the Debian pool.
GNU as
Author: the GNU binutils team
Home page: http://www.gnu.org/software/binutils/
Starting from version 2.17, the GNU assembler, part of the binutils package, is capable of cross-assembling Z80 code when configured for it at compile-time, such as with --target=z80-unknown-coff. binutils includes a powerful assembler and linker both, along with various utilities for handling object files, such as objcopy and objdump; for Z80, COFF is used for relocatable objects, with raw binary and Intel hex formats also supported. While this is probably one of the more powerful tools in the list for Z80 development, it also requires more work to start with, as the traditional way to get a cross-assembling binutils is to compile it oneself. Being a GNU package, binutils is naturally licensed under the GNU GPL (version 2 or later). Prepackaged binary versions of binutils are very common, but usually do not have cross-assembling capability.
Sending programs to the calc
- TILP
- titranz : commandline tool, only works for TI-83/TI-83+
FreeBSD
Much of the aforementioned software should compile independently without problem or with minor tweaking under FreeBSD, but it is best to utilize the ports collection whenever possible. Unfortunately, the current state of calculator-related software in the FreeBSD Ports Collection is lacking in variety.
- Development
Port | Current Version | Location |
---|---|---|
tpasm | 1.2_1 | /devel/tpasm |
z80asm | 0.1_1 | /devel/z80-asm |
TI-GCC | 0.96.b6_1 | /devel/tigcc |
libticalcs | 4.5.9_1 | /devel/libticalcs |
libtifiles | 0.6.5_1 | /devel/libtifiles |
- Communications
Port | Current Version | Location |
---|---|---|
TiLP | 6.79_1 | /comms/tilp |
libticables | 3.9.7_1 | /comms/libticables |
- Emulation
Port | Current Version | Location |
---|---|---|
TIEmu 2 | 2.04 | /emulators/tiemu2 |