A68: 68000 Assembler

A68.TTP sometimes bombs out during compilation.  This is usually caused by 
a  bad assembler mnemonic.  Users should note particularly that HS and  LO 
are  not  allowed as synonyms for the CC and CS conditions and  that  DBRA 
must be given as DBF.

Hence:
          write BCC  for BHS
                BCS  for BLO
                SCC  for SHS
                SCS  for SLO
                DBCC for DBHS
                DBCS for DBLO
                DBF  for DBRA

All  text  may be in any mixture of upper and lower  case.  Everything  is 
translated  to  upper case by the assembler  before  processing.  Hence  a 
difference in case does not mean labels are different.

Blank lines are not allowed.  The assembler appears to treat end of  lines 
in  the same manner as spaces.  Following a blank line everything  becomes 
shifted  into  the  next field,  ie.  labels  are  treated  as  mnemonics, 
mnemonics  are treated as opcodes etc.  If you wish to leave a line  blank 
you must put a '*' at the beginning.

Note: I had tried using a program with the following code in it:

          MOVEA.L   #MEMBLOCK,a0
          MOVE.L    a0,FREEHEAD
          MOVE.L    a0,FREETAIL
            .
            .
          MOVEA.L   FREEHEAD,A3
          MOVE.L    (A3),D1

      The program originally had FREEHEAD and FREETAIL initialized in  the 
source code itself
ie.
MEMBLOCK  DC.L      n
          .
          .
FREEHEAD  DC.L      MEMBLOCK
FREETAIL  DC.L      MEMBLOCK

     The program assembled using a68 apparently ok but when I executed the 
.PRG file it crashed at the MOVE.L (A3),D1.  Further investigation  showed 
that A3 contained not the relocated address of MEMBLOCK but the offset  of 
MEMBLOCK relative to the start of the program ie.  the value given by  a68 
at the end of assembly. This occurred both when initialisation of FREEHEAD 
was  done at compile time and when it was done at run  time.  Either  I've 
missed  something  obvious or a68 screws the relocation map  up  for  some 
reason!  I suspect it may just be me, I'm sure I've done something similar 
before with no problems...

2:08 AM 1/1/87 EUREKA!!!!

Using  LEA  MEMBLOCK,A0  instead of MOVEA.L MEMBLOCK,A0 in  the  run  time 
initialisation works! It appears that a68 looks at the opcode field of the 
assembler instruction to decide whether to make it relocating or not,  and 
then sometimes gets it wrong!  To be precise a label used as an  immediate 
operand  appears  to  be  always relative to the  start  of  the  program. 
Similarly  it seems a label used as the operand field of a DC  instruction 
is always non relocating!

 Watch for this one its a ^&%&*!

Later...

 I still seem to be having problems.
 I suspect that the MOVE.L A0,FREEHEAD/TAIL instructions are using 
the relative instead of absolute address as well.

 This makes it practically impossible to write programs of any size  using 
this  assembler  and  certainly makes it impossible to  use  it  to  write 
programs  which use AES calls even if you go to the trouble  of  labelling 
every element of the intin/out arrays etc to get round the lack of compile 
time arithmetic support (ie +/-).
  If  your trying to get example programs from books etc  to  work  you'll 
probably  find  that all but the simplest will compile ok but  then  crash 
without apparently doing anything.  Dont worry,  its probably this bug  in 
the assembler not the book that's at fault!
 Anyone else got a PD assembler?
