SOURCGEN Re-assembler for Atari 800 XL

Disk Contents
Symbol-Table & Editor
Generating Source Code
- from an SMB file
- for the ATARI OS
Creating SMB files
The Function Keys
The Functions A - U
A. ADDR/symb search
B. BYTE-change
C. CODE-search
D. DELETE symbols
K. KEY (0..9)
L. LIST symbols
M. MINIMUM-label
O. OBTAIN symbols
P. PREPARE labels
Q. QUIT (1)
S. SAVE symbols
U. UTILITY (V. 3.2)
The Fram-disk
Output Menu
Error Messages
Reference card
New in V.3.2

Creating an SMB file & Source Code Listing

The following steps are not intended to be a recipe but rather a guideline.

  1. To create a source code listing to a disk-file, hit <F> and enter the
    name of the file.
    To create a source listing for a program in RAM, hit <F> and enter FF
  2. Hit <.> and use the keys <3> and <4> to select 3.ADDRESS and deselect 4.COMMAND.
    Hit <RETURN>.
  3. Hit <K> and type the start-address of the listing. E.g. 2F00
    Hit <RETURN>.
    Hit <0> to begin listing.
  4. Use the <BREAK> key to alternately pause and continue listing.
    Determine the location of ASCII-code, screen-code, and bit patterns.
    Use the arrow-up-key to move the cursor to the start-address of these sections, and mark them with '"', '\', '$', or '%' (see E. EDIT).
    Mark the first address after the end of a section with ';'.
    The start-address of the listing should also be marked with ';' if this is not yet the case.
    In command mode, use <=> to list from the last address entered in the editor.
  5. After you have gone through the whole listing according to (4.), hit <P> (PREPARE labels). Enter the start and end addresses of the listing and hit <RETURN>. If the listing is long you will now have to wait a few seconds.
  6. Hit <0> to recommence listing. This time, determine where there are sections of normal code. For this, you will need a certain knowledge of assembly language. The function seys[<], [>] and <=> will be of help here.
    Notice that a line where there is a J or H-label usually contains normal code, whereas a T-label usually indicates a table or a section of text.
    Mark sections of normal code with ';' or a plain symbol.
  7. Go back and start listing again.
    Look for tables of addresses and mark these with '=' or '_' or '|'.
    Address references in a "display list" must be marked with '|'.
  8. You may have to repeat steps 5 to 7 a number of times. Be sure to frequently perform the P. PREPARE labels function.
    For some decisions you will need the C. CODE-search function to search through the code for particular bytes or addresses.
  9. Now you must investigate the sections of normal-code is the listing. Most importantly, you must find the places where two immediate addressing commands refer to an address. Mark the lines containing these commands with '&', or follow the procedure described in E. EDIT 5a and 5b.

    Keep an eye out for the following addresses, which are often accessed by immediate:

    $200 (VDSLST) - vector for the display-list-interrupt routine.
    $230 (SDLSTL) - points to the beginning address of the display-list.
    $58 (SAVMSK) - pointer to the address of the screen memory.
    $344 (ICBADR) - pointer to the address of various data.

    There may also be routines in the program that are accessed through two "immediate addressing" commands.

    Please study E. EDIT to learn more about all possible interpretations of code sections.

  10. After you have completed the listing to the best of your ability, you should use J. JUNK? to locate errors which you otherwise would have missed.
  11. Finally, use H. HEAD to create a source code listing that can be assembled using the ATMAS-II assembler or a campatible cross-assembler

    Don't forget to save your work using S. SAVE symbols