(original) (raw)

2004 dec 29 Albert van der Horst HCC Forth gg The Netherlands. Changes to as9 in behalf of porting to Linux. I put my changes in the public domain. This assembler is very wel documented, because the Motorola documentation for the 68h11 assembler still applies: as11v2.pdf See also the changes made by Mike Pashea (in particular a list file instead of stdout.) His and mine changes are on top of the Motorola documentation. Some bugs removed, in particular pointing to non-existing memory. I added a warning option ``w'' that is default on. The warning is about possible ill-formed comment. A star is an operator, so it is from now on only accepted at the start of a line. It serves as current program counter too. Other comment must now start with a comment symbol ``;''. This is incompatible with old Motorola Listings such as assist09.asm. Therefore this is a warning only, and can be disabled by the ``now'' option. NOTE: an expression that serves as an operand cannot contain white space e.g. ``bar - foo'' is interpreted as bar with ``- foo'' as comment. The ``w'' option being default of is intended to save you from this horror. All errors are flagged with ``ERROR'' such that you can find them in a long listing. If an error relates to data, such as an undefined symbol, that data is printed. File names can now be a comfortable 256 char's but still no check. (Was 9+dot+3, i.e. MSDOS file in working directory!). Labels can now be 80 chars, was 16. Lines can now be 256. The attempt at case insensitive comparison was replaced by a call to strncasecmp(). Other calls to tolower() strchr() where introduced were appropriate. Bugs : The w (warning) option sometimes gives spurious warnings, especially after a D operand. They must be ignored. (Getting this right would require more of a cleanup, than I'm prepared to do just now.) Sometimes an infinity of data was allocated on 32 bits machines (gigabytes), in programs that are incorrect anyway. This used to crash the assembler. It is not totally sure that the cleanups have removed this problem. If the assembler crashes you are advised to look for places where you allocate space with a length unknown in the first pass. The MS-DOS version still has a null pointer assignment. This seems not to interfere with the working of the program. This source is an example of bad style: early c-programming done by BASIC and assembler programmers. Don't blame me for ``int Oflag'' in header files, global variables hidden in unexpected places, prototypes within function bodies, no output to stderr, non-idiomatic variable names, idiosyncratic option specification etc.