Installation and porting notes for the TPU microassembler:

INSTALLATION

 To compile it you need an ANSI C compiler and optionally yacc and flex.
 The scanner relies on the flex buffers for include files and macro 
 expansions. If you have no flex and/or yacc (or bison) then you should
 still be able to compile it because the .c and .h files generated by 
 flex and bison are distributed with the source. (However, to use the
 bison generated stuff you have to have alloca() in your C lib).
 
 So, if you have flex and bison, take a look at the makefile, in which
 you can set the language from ENGLISH to one of the other supported
 languages or change to your favourite CFLAGS etc.
 Then type make clean; make and you should have a binary soon.
 
 If you don't have bison/yacc or flex, then take the look at the makefile
 but instead of make clean ; make type make distclean ; make. The
 distclean target leaves the yacc/flex generated files intact.
 If you have yacc, but no flex then make distclean ; touch parser.y ; make
 would do the trick.
 
 When you have the binary, you can copy it to your favourite bin directory
 in your path. You should also copy the manpage to the place in your
 manpath where you think it should be best suited. 
 
 That's it.
 
PORTING

 What can I say ? You know how to port. The assembler is very simple.
 It is worth to note that the symbol handling is especially inefficient,
 linear searches are performed on linked lists. When I started to write
 it, this was not an issue, when I was about to finish it, I thought that
 since at most you have 512 instructions all together, this is still not
 really an issue. I might change it to some hash table based thing or
 to a skiplist for fun, but later. If it annoys you now, feel free to
 change it :-)
 
 Tas was written with porting in mind, it does not rely on any gcc
 specific thing, GNU-make extensions and the like. It does, however,
 rely on the flex-way of handling input buffers so if you want to use
 something else, you have to heavily edit the include file and macro
 expansion handling code.
 
 The assembler has been tried (and worked) on Intel boxes running Linux,
 an old Amiga 3000 w/ 68040 card running NetBSD 1.1, HP 7xx machines 
 running HP-UX 9.0x (thanks to Joern Tietjen, tietjen@draeger.com). 

 In addition, if you want to port it to any non-unix system, you have to
 realise that I do not free any memory (and I allocate a lot), relying
 on the OS to do it for me when I'm finished. It is not very complex
 to find the to-be-freed objects before exiting but I don't do it now.
 I know, I'm sloppy and lazy and all that :-)
  
 My coding style is quite different from what I've seen in the Linux/GNU
 sources, it's hard tabs set to 4, lots of whitespace (as suggested by 
 Kernigham & Ritchie :-) and an indetation style that is similar, but not 
 identical,  to theirs in the original "The C programming language" book. 
 Guess what did I learn C from ... You may find it ugly, (I don't) but you 
 have to live with that :-)
 
 If your mother tongue is other than English, you may want to add your
 own language to the assembler's repertoaire. You have to edit the
 usage.h and the errors.h files; all text ever written out by the
 assembler is located in these except the 'parse error' generated by 
 bison.
 
Good luck,

Kocsonya, alias Zoltan Kocsi
