Modernization Hub

Base Address

Enhanced Definition

In the context of IBM mainframe architecture and z/OS, a **base address** is a starting memory location used in conjunction with a displacement (offset) to form an effective memory address. It serves as a reference point, typically held in a general-purpose register (a **base register**), to access data or instructions within a program's address space. This mechanism is fundamental for efficient memory addressing and enabling program relocation.

Key Characteristics

    • Reference Point: It establishes a known starting point in memory from which other locations are calculated by adding an offset (displacement), typically a 12-bit value.
    • Base Register Usage: In assembly language, a general-purpose register (GPR) is designated as a base register and loaded with the base address, allowing subsequent instructions to reference memory relative to that register.
    • Addressability: A single base register, combined with a 12-bit displacement, can typically address a 4KB (4096-byte) range of memory. For larger programs or data areas, multiple base registers or different addressing schemes are employed.
    • Program Relocation: Base addressing facilitates program relocation by allowing programs to be loaded anywhere in memory. The base address is adjusted at load time, and all internal references remain valid relative to that new base.
    • Compiler Abstraction: High-level languages like COBOL or PL/I abstract this concept; the compiler and runtime environment manage base addresses and registers implicitly for data access and instruction execution.
    • Addressing Modes: Its usage adapts to different addressing modes (24-bit, 31-bit, 64-bit), determining the maximum addressable memory and the size of the base address itself.

Use Cases

    • Assembly Language Programming: Explicitly used by programmers to establish addressability for code sections, data areas (e.g., DSECTs), and control blocks using instructions like BALR (Branch and Link Register) and the USING directive.
    • Accessing Program Data: A program's data sections (e.g., WORKING-STORAGE in COBOL, DSECTs in assembly) are often addressed relative to a base address established for that program or data area.
    • Dynamic Storage Allocation: When storage is acquired dynamically (e.g., using GETMAIN or STORAGE OBTAIN), a base address for the newly acquired storage is typically established to allow the program to access it.
    • Module Linkage: When calling subroutines or external modules, base addresses are crucial for establishing addressability to parameters passed between modules and to the called module's own code and data.
    • Operating System Services: The z/OS operating system itself uses base addressing extensively for its own code, control blocks, and managing user program address spaces.

Related Concepts

The base address is intrinsically linked to the concept of a base register, which is a general-purpose register holding this address. Together, they form the foundation for effective address calculation, where `Effective Address =

Related Vendors

ASE

3 products

IBM

646 products

Trax Softworks

3 products

Broadcom

235 products

Tone Software

14 products

Related Categories

Operating System

154 products

Browse and Edit

64 products

CASE/Code Generation

19 products

Automation

222 products