!pr0
Large Assembly Listing into Text File.........Robert F. O'Brien
                                                Dublin, Ireland

I liked the procedure for getting listings into a text file during assembly (AAL July '83).  However, it won't work if the file is too large and requires .IN directives.  I recently did a large assembly using the following source code:

!lm+10
0      .DU
1      .TF LISTING
2      .IN PART1
3      .IN PART2
4      .ED
!lm-10

What I expected to get was a 356-sector text file on disk, but all I got was a 2-sector file -- the code for PART1 and PART2 was not sent to the disk (they did list to the screen!)

I first tried to solve my particular problem by making more RAM available for the assembly by moving the Symbol Table base down to $400.  I thought that should work, since I use an 80-column card and not the Apple's text screen.  However, the assembler and the system monitor had other ideas, and promptly destroyed the symbol table by scrolling the screen memory.

However, I did manage to get my large assembly listing to go to disk as a text file -- by doing it in two parts.  I used a utility program from the assembler disk to give each part the missing label definitions from the other part.

The steps are as follows:

!lm+8
!pp-3
1) Assemble the code normally with .IN directives.

!lm+10
0001       .IN PART1
0002       .IN PART2
!lm-10

2) BRUN B.MAKE EQUATE FILE (from the S-C Macro Version 1.1 Disk.)  That creates a file of .EQ statements called SYMBOLS which contains all the normal labels and values from the Symbol Table in memory.

3) Merge SYMBOLS with PART1 and delete all duplicate labels from the SYMBOLS section.

4) Assemble PART1 using the .DU-.TF-.ED trick, and using .LIST OFF/ON so that the SYMBOLS section does not write to the text file.

5) Repeat steps 3 and 4 on PART2.

!lm-8
!pp0
It is a bit laborious deleting all the duplicate labels in the two assemblies.  I hope someone can suggest a patch to the assembler to prevent it from reporting "EXTRA DEFINITION ERROR".  That certainly would make this listing process easier.
