flat assembler  version 1.70
Copyright (c) 1999-2012, Tomasz Grysztar.
All rights reserved.

=> adapted to Z80 instruction set by Karl-Heinz Dahlmann, Muenchen

Please see the license file for further information.


This is the original flat assembler from Tomasz Grysztar adapted for Zilog Z80 CPU.
It's based on version 1.70 and instruction set is modified to support of
Z80 instructions only. This version supports only the base instruction set
used in the 80's, today common for retro programming. 

There will be maybe in future or on special request from user at the board
an extended version with support of the undocumented instructions still 
working but not official released by Zilog (use of IX or IY register for nearly
all instructions where HL could be used) or which supports some newer commands
from the Z84xx series. For me is no need at the moment as I am working with
plain old Z80 processor.

Please take notice that this version does support ONLY Z80 instruction set and 
all x86 commands are deleted to keep it tiny, reduce the work of creating this 
version. Nearly all directives, data types and commands are kept, especially the
helpful and powerful macro definitions. This version is for people who like the
concept of FASM and maybe worked with another version of FASM before. Very easy
to start with.

For compatibility to old listings I added a new feature which is named 
"labelautodetect". Normally labels are marked by the word label or with a
colon following the label name. But styles are still working with this version
but there are some retro style listings missing this general label declaration.
To compile these assemler files you can add the following line at the top of file:

;labelautodetect

It was realised as a comment because it need to be present when running the
parser and could not realized as instruction because instructions are executed
only in assembler phase which is running after the parser.

There is another nice feature implemented in the IDE, generating an automatic
listing. The listing is based in general on the symbol file and there is a demo
program in the directory tools. I didn't find this very helpful as I like to have
it more integrated in the IDE and to get the listing simply with a keypress.
So I adapted the listing to the 8 bit processor and adjusted the width of columns
and you can get it while creating a symbol file with CTRL-F8. During this step or
lets say after the symbol file is created, the IDE runs automatically LISTZ80.EXE
and opens the created listing file (<source>.lst) in a new tab of the editor and 
on the disk.

There are two more commands implemented as comments in source with 
;LISTOFF
;LISTON
to switch listing on and off for the parts you need. These comments can be used
in any included file to keep a small effective listing to work with. LISTON is 
default at compile, so if none of these comments are found, a complete listing 
is generated. Be sure to set these commands always at the beginning of a line.


To do this all I have to thank Tomasz Grysztar for this great assembler
framework which is unfortunately undocumented - so was a bit hard to get
through the code sometimes. There are some papers published about concepts 
but internal structures are undocumented except the symbol file format.
But to work with the delivered IDE, which is treated to use as it is, this
wouldn't be a convenient way. I don't like to work with command line tools and 
the IDE is fine to program right out of the box and you have a small tiny editor 
as one exe file only and not a few hundred files or dozens of configuration options.

To use this version you need only two exe files, which can be copied in a new
or in your source directory:
FASMWZ80.EXE
LISTZ80.EXE

That's really all. A configuration file FASMWZ80.INI is automatically created after
using FASMWZ80 first time. Anyway you can modify the software which is delivered in
source or adapt the command set. The SOURCE directory contains the main part of the
assembler, the IDE subdirectory contains the IDE main file FASMWZ80.AMS which is the
adapted FASMW.ASM from original source. There are command line versions for DOS, 
WIN32 and LINUX available, which haven't been compiled yet but should work in the same
way. They could be compiled using the FASMW.EXE in the main direcory (x86 version).

Any comments could be placed at the board where you did find this version
http://board.flatassembler.net in section Non-x86-architectures.
