Last update: August 9th 2012

LL - The Linking Loader

Download LL version 3.2 now
ti archiver file as ti archiver file (ARC)
ti dsk image or zipped disk-image (ZIP)

(first version somewhere 1987, latest version 3.2 dec 2000 so that I could build Dm2k)

The Linking Loader (LL) is a program to quickly load and run an assembly program in tagged object form. Also it is possible to create a program file of the loaded code. The LL archive is complete with source and manual. The LL program is build to use with 8Kb extra RAM at >6000 through >7FFF in the Editor/Assembler module.

LL MAIN
The LL in action while building SIM99.


Operation

The LL is an autorun program started with the Editor/Assembler option 3 Load and Run and uses a text file (or batch file) wich contains commands for loading tagged object files manipulating the REF/DEF table starting the loaded program or creating a program file out of the loaded object files.

The text file location and name is entered directly after the LL program name preceded by a '<' character. When LL is started a title ands version number is printed at top of the screen, the text files is opened and all lines in the text file are read, printed at the bottom of the sceen, and executed. If an error occurs a message is displayed below the last executed line or command.

In the following example the LL program is found on DSK1 and the text file is found on DSK2 with the name "SIM99_B".


  * LOAD AND RUN *

  FILE NAME?

  DSK1.LL <DSK2.SIM_B



A typical contents for a text file (or batch file) is for example:


  .D GPLLNK
  .L DSK2.SIM99_O
  .L DSK2.COMMANDS_O
  .L DSK2.SIM_O
  .L DSK2.HIRES_O
  .L DSK2.PL_O
  .L DSK2.DBASE_O
  .L DSK2.GPLLNK_O
  .L DSK2.BLKRAM_O
  .S DSK2.SIM99A SFIRST SLAST >2000 >2700

When the LL executes this batch file it will delete (.D) "GPLLNK" from the REF/DEF table, load (.L) all the named object files and save (.S) the loaded objects as a program file on DSK2 named "SIM99A". The program can be found in memory between the blocks SFIRST and SLAST and between the addresses >2000 and >2700. If the program file length exceeds 8192 bytes (8Kb) or a new block is started the last character of the name will be incremented by 1.


LL commands

The following commands are recognized by the Linking Loader:


          .L   -Load.

          With the Load command it is possible to load a
          objectfile into the computers memory.
          The load command works simular as option three of the
          editor/Assembler menu list.

          Example:

              .L DSK1.FILEIO


.D -Delete. The Delete command is useful to delete an existing name from the REF/DEF table to replace an internal routine for another one. The name must be erased in the REF/DEF table to avoid duplicate definition errors. Example: .D GPLLNK .L DSK1.GPLLNK Delete GPLLNK from the REF/DEF table and load your. own GPLLNK routine.
.R -RUN. The Run command makes it possible to Autostart your own application after loading all the objectfiles. Before your program is started the REF/DEF table is checked for any unresolved reference. Al the unresolved references are listed on the screen. If one or more unresolved reference is found, control is returned to the editor/assembler module. Example:. .R MYPROG .R >A000 Start execution of the users program at location MYPROG. If a label starts with the > character than the label will be considerd as a direct address.
.X -Xecute. The Execute command works simular as the run command. Unresolved references, if any, are listed on the screen, but your program is started anyway. It is the programmers responsibility to keep control over the computer. Example: .X MYPROG .X >A000 Start execution of the users program at location MYPROG. If a label starts with the > character than the label will be considerd as a direct address.
.C -COPY. The Copy command is useful to copy some files from one device to another, i.e. from disk to a Ram-Disk. If the Copy command is used, both the source filename and destination filename must be defined. Example: .C DSK1.DATA DSK5.MYFILE Copies the file DATA from a floppy disk in drive one to drive five (the Geneves Ram-Disk) and renames the DATA file in MYFILE.
.P -PROGRAM IMAGE LOAD. The P command is used to load a program image file in the computers memory. The program image file can be load on every address by defining a load address after te filename. After the program image file is loaded you can load an other program (i.e. a debugger). Be sure the program imagefile is the first file you load. It is possible that this file overwrites some other modules you've just loaded. Example: .P DSK1.PROGRAM D000 Loads a program image file in memory at address >D000.
.M -MOVE BYTES. The M command is used to move a number of bytes from one location to the other. Example: .M A000 B000 7F Move 127 bytes from address >A000 to address >B000.
.S -SAVE PROGRAM IMAGE FILE. The S command is used to make a program image file of all the modules currently loaded. To create a runable program a filename must be entered and a pair of labels (maximum is three) to define the start and end location of the memory image to save. If the length of a memory image of a file is more than 8kb or the memory image if label pair two or three is saved the file name will be incremented by one. Example: .S DSK1.PGM SFIRST SLAST LABEL1 LABEL2 .S DSK1.PGM SFIRST SLAST >2020 >2700 A program image file is made of all the loaded modules between the labels SFIRST and SLAST and LABEL1 to LABEL2 or >2020 to >2700. The file is named PGM. If a section of the program to be saved is more than 8kb long, the last character of the filename wil be incremented by one. If a label starts with the > character than the label will be considerd as a direct address.


LL error messages

MessageDescription
* No LL File name found The Linking Loader was not able the find the name of the batchfile. (i.e. forgotten to enter one or forgotten to use the '<' sign).
* Open Error on LL file The batchfilename entered does not exist.
* Read Error on LL file The Linking Loader was not able to read a commandline from the batchfile due to device errors.
* Error on Loader file The objectfilename after an .L command does not exist.
* Unrecognized command A command used in the batchfile isn't a command recognized by the Linking Loader.
* Program name not found Program name given after a .R command, a .X command or a .S command could not be found in the REF/DEF table.
* Can not copy The copy command couldn't be executed because of a device error, i.e. disk full, etc.
* Unresolved references There are unresolved references detected in the REF/DEF table. This error message is given before a .R command or a .X command is executed or at the end of the LL program.
* Not a hex value The address given for loading a program image file couldn't be properly converted into a hexadecimal address.
* Can not save The save comnmand can't create a program image file of loaded modules because of a disk error (i.e. disk full).
Warning: goto_ti99geek.html could not be included.