RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
Binary::AtariFormat::Segment Struct Reference

Represents a loadable segment in the binary. More...

#include <8bitexe.h>

Public Types

enum  segment_type : uint16_t {
  SIGNATURE_LOW = 0xFFFA , SDX_FIXED = 0xFFFA , SDX_SYMREQ = 0xFFFB , SDX_SYMDEF = 0xFFFC ,
  SDX_FIXUPS = 0xFFFD , SDX_RAMALLOC = 0xFFFE , SDX_POSIND = 0xFFFE , ATARI_SEGMENT = 0xFFFF
}
 Types of segments, represented by their signature values. More...
 
enum  control_byte_type : uint8_t {
  CB_CONVRAM = 0x00 , CB_SYSEXTAREA = 0x02 , CB_PROGEXTAREA = 0x04 , CB_PAGEALIGNED = 0x40 ,
  CB_RAMALLOC = 0x80
}
 

Public Member Functions

 Segment (bool header_type_optional=true)
 
 Segment (uint16_t header_type)
 
offset_t GetSize () const
 Retrieves the number of bytes in the segment body.
 
void ReadFile (Linker::Reader &rd)
 Reads a segment from a file into this object.
 
void WriteFile (Linker::Writer &wr) const
 Writes the segment into a file.
 
void ReadRelocations (Linker::Reader &rd)
 Read relocations.
 
void WriteRelocations (Linker::Writer &wr) const
 Writes relocations.
 

Public Attributes

segment_type header_type = ATARI_SEGMENT
 Header type, Atari DOS uses only 0xFFFF, signature only obligatory for the first segment.
 
bool header_type_optional = false
 Set if placing header type is optional, also set when signature is absent in file when reading.
 
uint16_t address = 0
 Address at which segment must be loaded.
 
uint8_t block_number = 0
 Only used for SDX_RAMALLOC/SDX_POSIND, SDX_SYMREQ.
 
control_byte_type control_byte = control_byte_type(0)
 Only used for SDX_RAMALLOC/SDX_POSIND.
 
uint16_t size = 0
 Only used for SDX_RAMALLOC/SDX_POSIND.
 
char symbol_name [8] = { }
 Only used for SDX_SYMREQ, SDX_SYMDEF.
 
std::shared_ptr< Linker::Imageimage
 The binary data in the segment.
 
std::set< uint16_t > relocations
 Relocations, only used for SDX_SYMREQ and SDX_FIXUPS.
 

Detailed Description

Represents a loadable segment in the binary.

Member Enumeration Documentation

◆ control_byte_type

Enumerator
CB_CONVRAM 

allocate in conventional RAM

CB_SYSEXTAREA 

allocate in system extended area

CB_PROGEXTAREA 

(SDX 4.47+) allocate in program extended area

CB_PAGEALIGNED 

(SDX 4.43+) page aligned

CB_RAMALLOC 

SDX_RAMALLOC instead of SDX_POSIND.

◆ segment_type

Types of segments, represented by their signature values.

Enumerator
SIGNATURE_LOW 

Lowest currently defined signature to check on reading.

SDX_FIXED 

SpartaDOS X fixed-address segment (not implemented)

SDX_SYMREQ 

SpartaDOS X required symbols (not implemented)

SDX_SYMDEF 

SpartaDOS X symbol definitions (not implemented)

SDX_FIXUPS 

SpartaDOS X fixup information (not implemented)

SDX_RAMALLOC 

SpartaDOS X RAM allocation block (not implemented)

SDX_POSIND 

SpartaDOS X position independent (not implemented)

ATARI_SEGMENT 

Atari segment type.


The documentation for this struct was generated from the following files: