Create a single-segment BSO

To create and build a BAL shared object (BSO) that has one assembler source file (as specified by the BEGIN macro), has one entry point, and calls a function in a C library, follow these steps:

  1. Create a new makefile (/home/joe/mywork/billing/rt/src/bill.mak) as shown in the following example:
    APP := BILL
    maketpf_env := billing
    maketpf_env += base_rt
    LIBS := CRDT
    ASM_SRC := bill.asm
    include maketpf.rules
    Notes:
    • Both the billing and base_rt environment files are listed because the base_rt environment file provided by z/TPF is almost always required to enable the application program to access macros and header files that are included in z/TPF.
    • The first environment listed defines the owning environment and, therefore, the corresponding environment file defines the directory (under the first root directory listed) that is used for writing listings, objects, and executables. Both environments are used to define where the source files (including macros and header files) can be found.
    • The billing application calls the creditCheck function that is provided in the CRDT C function library.
  2. Create a source segment named /home/joe/mywork/billing/rt/src/bill.asm.
  3. Update the user control file with an entry for the new program:
    1. Create a copy of the control file in your working directory:
      cp /tpf/z11/local_mod/base/cntl/usr.cntl /home/joe/mywork/base/cntl/usr.cntl
    2. Edit the file that you just copied and add a new entry for the program named BILL. Enter the following information on one line.
      BILL;APP;billing/rt/src/bill.mak;1;ALL;OBJ;TPF_SBALL;LOADONLINE;STUB;DEMAND;DEBUG;
      50;PROGRAM;NOGRP;IBM_DEFT;BPAUTH;RESTRICT;MONTC;KEY0;NOCMB;TIMESLICE;;;;;;;;;;;;;
  4. Enter the maketpf command to build the program. This assumes that a file named maketpf.cfg exists in the /home/joe/mywork/build directory.
     cd /home/joe/mywork/build
     maketpf bill