RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
cpm86.h
1#ifndef CPM86_H
2#define CPM86_H
3
4#include <array>
5#include <map>
6#include <set>
7#include <vector>
8#include "../common.h"
9#include "../linker/module.h"
10#include "../linker/options.h"
11#include "../linker/segment.h"
12#include "../linker/segment_manager.h"
13#include "../linker/writer.h"
14#include "../dumper/dumper.h"
15
16namespace DigitalResearch
17{
31 class CPM86Format : public virtual Linker::SegmentManager
32 {
33 public:
34 /* * * General members * * */
35
56 {
57 public:
97 uint16_t size_paras = 0;
99 uint16_t load_segment = 0;
101 uint16_t min_size_paras = 0;
103 uint16_t max_size_paras = 0;
110 uint32_t offset = 0;
112 std::shared_ptr<Linker::Image> image = nullptr;
114 bool attach_zero_page = false;
115
116 virtual void Clear();
117
119 {
120 Clear();
121 }
122
126 virtual uint16_t GetSizeParas(const CPM86Format& module) const;
127
128 void ReadDescriptor(Linker::Reader& rd);
129
133 void Prepare(CPM86Format& module);
134
135 void WriteDescriptor(Linker::Writer& wr, const CPM86Format& module) const;
136
137 virtual void WriteData(Linker::Writer& wr, const CPM86Format& module) const;
138
139 std::string GetDefaultName() const;
140
141 virtual void ReadData(Linker::Reader& rd, const CPM86Format& module);
142 };
143
148 {
150 number_t segment;
152 offset_t offset;
153
155 : segment(0), offset(0)
156 {
157 }
158
159 relocation_source(size_t segment, offset_t offset)
161 {
162 }
163
164 bool operator==(const relocation_source& other) const;
165 bool operator<(const relocation_source& other) const;
166 };
167
168 typedef relocation_source relocation_target;
169
174 {
175 uint8_t source = 0;
176 uint16_t paragraph = 0;
177 uint8_t offset = 0;
178 uint8_t target = 0;
179
180 Relocation()
181 {
182 }
183
184 Relocation(uint8_t source, uint16_t paragraph, uint16_t offset, uint8_t target)
185 : source(source), paragraph(paragraph), offset(offset), target(target)
186 {
187 }
188
189 Relocation(relocation_source source, uint8_t target = 0)
190 : source(source.segment), paragraph(source.offset >> 4), offset(source.offset & 0xF), target(target)
191 {
192 }
193
194 operator bool() const;
195
196 void Read(Linker::Reader& rd, CPM86Format& module, bool is_library = false);
197
198 void Write(Linker::Writer& wr) const;
199
200 relocation_source GetSource() const;
201 };
202
209 {
211 std::string rsx_file_name;
213 std::string name;
220 uint16_t offset_record = 0;
221 static constexpr uint16_t RSX_TERMINATE = 0xFFFF;
222 static constexpr uint16_t RSX_DYNAMIC = 0x0000;
226 std::shared_ptr<Linker::Image> contents;
227
228 void Clear();
229
230 void Read(Linker::Reader& rd);
231
232 void ReadModule(Linker::Reader& rd);
233
234 void Write(Linker::Writer& wr) const;
235
236 void WriteModule(Linker::Writer& wr) const;
237
238 offset_t GetFullFileSize() const;
239 void SetOffset(offset_t new_offset);
240
241 void Dump(Dumper::Dumper& dump) const;
242 };
243
251 {
253 std::string name;
255 uint16_t major_version = 0;
257 uint16_t minor_version = 0;
259 uint32_t flags = 0x11010000;
260
261 library_id() { }
262
263 library_id(std::string name, uint16_t major_version, uint16_t minor_version)
265 {
266 }
267
268 library_id(std::string name, uint16_t major_version, uint16_t minor_version, uint32_t flags)
270 {
271 }
272
273 library_id(const library_id& lib) = default;
274
276 static library_id ParseNameAndVersion(std::string name_and_version);
277
278 bool operator ==(const library_id& other) const;
279
280 void Write(Linker::Writer& wr) const;
281
282 void Read(Linker::Reader& rd);
283 };
284
291 struct library : public library_id
292 {
294 std::vector<Relocation> relocations;
296 uint16_t relocation_count = 0;
297
299 uint16_t first_selector = 0;
301 uint16_t unknown = 0;
302
304 std::set<relocation_source> relocation_targets;
305
306 library()
307 {
308 }
309
310 library(std::string name, uint16_t major_version, uint16_t minor_version)
312 {
313 }
314
315 library(std::string name, uint16_t major_version, uint16_t minor_version, uint32_t flags)
316 : library_id(name, major_version, minor_version, flags)
317 {
318 }
319
320 library(const library_id& lib)
321 : library_id(lib)
322 {
323 }
324
325 void Write(Linker::Writer& wr) const;
326
327 void WriteExtended(Linker::Writer& wr) const;
328
329 void Read(Linker::Reader& rd);
330
331 void ReadExtended(Linker::Reader& rd);
332 };
333
336 {
337 public:
339 std::vector<library> libraries;
340
341 void Clear() override;
342
346 void Prepare(CPM86Format& module);
347
348#if 0
352 bool IsFastLoadFormat() const;
353#endif
354
355 library& FetchImportedLibrary(std::string name_dot_version);
356
357 library& FetchImportedLibrary(library_id id);
358
359 uint16_t GetSizeParas(const CPM86Format& module) const override;
360
361 void WriteData(Linker::Writer& wr, const CPM86Format& module) const override;
362
363 void ReadData(Linker::Reader& rd, const CPM86Format& module) override;
364 };
365
368 {
369 public:
371 uint16_t maximum_entries = 0;
373 uint16_t first_free_entry = 0;
375 uint16_t index_base = 0;
377 uint16_t first_used_index = 0;
378
380 {
382 uint16_t limit = 0;
384 uint32_t address = 0;
386 uint8_t group = 0;
387 uint16_t reserved = 0;
388
389 void Read(Linker::Reader& rd);
390
391 void Write(Linker::Writer& wr) const;
392 };
393
394 std::vector<ldt_descriptor> ldt;
395
396 void Clear() override;
397
398 uint16_t GetSizeParas(const CPM86Format& module) const override;
399
400 void WriteData(Linker::Writer& wr, const CPM86Format& module) const override;
401
402 void ReadData(Linker::Reader& rd, const CPM86Format& module) override;
403 };
404
408 std::array<Descriptor, 8> descriptors;
424 std::vector<Relocation> relocations;
428 uint32_t relocations_offset = 0;
432 std::array<rsx_record, 8> rsx_table;
436 uint32_t rsx_table_offset = 0;
440 uint8_t flags = 0;
444 uint8_t cpm_flags = 0;
445
449 uint32_t file_offset = 0;
451 mutable offset_t file_size = offset_t(-1);
452
453 enum
454 {
462 FLAG_RSX = 0x10,
469 };
470
471 enum
472 {
473 CPM_FLAG_F1 = 0x01,
474 CPM_FLAG_F2 = 0x02,
475 CPM_FLAG_F3 = 0x03,
476 CPM_FLAG_F4 = 0x04,
477 };
478
479 void Clear() override;
480
511
535
538 {
539 }
540
542 {
543 Clear();
544 }
545
546 uint16_t GetRelocationSizeParas() const;
547
548 size_t CountValidGroups();
549
550 number_t FindSegmentGroup(unsigned group) const;
551
552 void CheckValidSegmentGroup(unsigned group);
553
554 bool IsFastLoadFormat() const;
555 bool IsSharedRunTimeLibrary() const;
556
557 void ReadRelocations(Linker::Reader& rd);
558
559 void WriteRelocations(Linker::Writer& wr) const;
560
561 offset_t MeasureRelocations();
562
563 void ReadFile(Linker::Reader& rd) override;
564
565 offset_t ImageSize() const override;
566
568 offset_t WriteFile(Linker::Writer& wr) const override;
569
570 offset_t GetFullFileSize() const;
571
572 void Dump(Dumper::Dumper& dump) const override;
573
574 void CalculateValues() override;
575
576 /* * * Writer members * * */
577
579 {
580 public:
581 Linker::Option<bool> noreloc{"noreloc", "Suppress generating relocations"};
582 Linker::Option<bool> sharedcode{"sharedcode", "Make the code segment shared (descriptor type 9)"};
583 Linker::Option<std::optional<std::vector<std::string>>> rsx_file_names{"rsx", "List of filenames to append as Resident System Extensions (CP/M)"};
584 Linker::Option<bool> fixupgroup{"fixupgroup", "Generates group descriptor for fixups (FlexOS)"};
585 Linker::Option<std::optional<std::string>> srtl{"srtl", "Generate shared run-time library, parameter: <library name>.<major version>.<minor version>[.<optional flags as hexadecimal value>] (TODO: untested)"}; // TODO
586 Linker::Option<std::string> x87{"8087", "Sets 8087 usage, valid values: off/on/auto", "off"};
587 Linker::Option<bool> directvideo{"directvideo", "Direct video access"};
588 Linker::Option<bool> mpmlock{"mpmlock", "MP/M-style record handling (Concurrent DOS)"};
589 Linker::Option<bool> nobank{"nobank", "Cannot run in banked memory"};
590 Linker::Option<bool> f1{"f1", "CP/M F1 flag (Concurrent DOS)"};
591 Linker::Option<bool> f2{"f2", "CP/M F2 flag (Concurrent DOS)"};
592 Linker::Option<bool> f3{"f3", "CP/M F3 flag (Concurrent DOS)"};
593 Linker::Option<bool> f4{"f4", "CP/M F4 flag (Concurrent DOS)"};
594
596 {
597 InitializeFields(noreloc, sharedcode, rsx_file_names, fixupgroup, srtl, x87, directvideo, mpmlock, nobank, f1, f2, f3, f4);
598 }
599 };
600
602 bool option_shared_code = false;
607
610 {
611 MODEL_DEFAULT,
618 };
621
622 bool FormatSupportsSegmentation() const override;
623
624 bool FormatIs16bit() const override;
625
626 bool FormatIsProtectedMode() const override;
627
628 bool FormatSupportsLibraries() const override;
629
630 unsigned FormatAdditionalSectionFlags(std::string section_name) const override;
631
632 std::vector<std::shared_ptr<Linker::Segment>>& Segments();
633
635 std::map<std::shared_ptr<Linker::Segment>, Descriptor::group_type> segment_types;
636
638 void AssignSegmentTypes();
639
640 unsigned GetSegmentNumber(std::shared_ptr<Linker::Segment> segment);
641
642 static std::vector<Linker::OptionDescription<void>> MemoryModelNames;
643
644 std::vector<Linker::OptionDescription<void>> GetMemoryModelNames() override;
645
646 void SetModel(std::string model) override;
647
648 std::shared_ptr<Linker::OptionCollector> GetOptions() override;
649
650 void SetOptions(std::map<std::string, std::string>& options) override;
651
652 std::unique_ptr<Script::List> GetScript(Linker::Module& module);
653
654 void Link(Linker::Module& module);
655
657 void BuildLDTImage(Linker::Module& module);
658
659 void ProcessModule(Linker::Module& module) override;
660
661 void GenerateFile(std::string filename, Linker::Module& module) override;
662
664 std::string GetDefaultExtension(Linker::Module& module, std::string filename) const override;
665 };
666
667}
668
669#endif /* CPM86_H */
A representation of segment group within the executable.
Definition cpm86.h:56
uint16_t load_segment
Load segment address of the group, or 0 if it can be relocated. Not to be used outside of system driv...
Definition cpm86.h:99
void Prepare(CPM86Format &module)
Sets up any values before it can be written to file.
Definition cpm86.cc:39
bool attach_zero_page
Set to true if a supplementary 256 bytes of zeros are required. When generating image,...
Definition cpm86.h:114
group_type type
The type of the group.
Definition cpm86.h:95
uint16_t max_size_paras
Maximum required size of the group, when loaded into memory, in 16-byte paragraphs.
Definition cpm86.h:103
virtual uint16_t GetSizeParas(const CPM86Format &module) const
Returns the size of the segment group in 16-byte paragraphs.
Definition cpm86.cc:18
uint16_t min_size_paras
Minimum required size of the group, when loaded into memory, in 16-byte paragraphs.
Definition cpm86.h:101
uint32_t offset
Offset to image in file.
Definition cpm86.h:110
std::shared_ptr< Linker::Image > image
The actual binary image of the group.
Definition cpm86.h:112
uint16_t size_paras
Size of the group, as stored on disk, in 16-byte paragraphs.
Definition cpm86.h:97
group_type
Group type, stored as the first byte of the descriptor.
Definition cpm86.h:60
@ Code
A group containing executable instructions, the starting segment will be loaded into CS....
Definition cpm86.h:64
@ Auxiliary2
A group containing data.
Definition cpm86.h:74
@ Undefined
This group type is not the type of an actual group. Instead, it signals the end of the group descript...
Definition cpm86.h:62
@ Libraries
(FlexOS 286 only) The shared runtime library group descriptor is stored at offset 0x48 in the header,...
Definition cpm86.h:87
@ Data
A group containing data, the starting segment will be loaded into DS.
Definition cpm86.h:66
@ Fixups
(FlexOS 286 only) The group containing the relocations. Not required, since the offset to the relocat...
Definition cpm86.h:83
@ Auxiliary3
A group containing data.
Definition cpm86.h:76
@ Extra
A group containing data, the starting semgnet will be loaded into ES.
Definition cpm86.h:68
@ Stack
A group describing the stack data. Unlike the other associated segments, SS does not point to it at t...
Definition cpm86.h:70
@ Auxiliary4
A group containing data. The group type was later repurposed to represent the relocations in a file....
Definition cpm86.h:78
@ ActualFixups
(FlexOS 286 only) The group containing the relocations, used when it is clear this is a fixup group
Definition cpm86.h:92
@ Auxiliary1
A group containing data.
Definition cpm86.h:72
@ ActualAuxiliary4
A group containing data, used when it is clear this is an auxiliary group.
Definition cpm86.h:90
@ FastLoad
(FlexOS 286 only) The fast load group descriptor is stored at offset 0x51 in the header,...
Definition cpm86.h:85
@ SharedCode
A group containing executable instructions, the starting segment will be loaded into CS....
Definition cpm86.h:80
(FlexOS 286 only) The fast loading group (unimplemented)
Definition cpm86.h:368
uint16_t GetSizeParas(const CPM86Format &module) const override
Returns the size of the segment group in 16-byte paragraphs.
Definition cpm86.cc:425
uint16_t index_base
The index base.
Definition cpm86.h:375
uint16_t first_used_index
First used index.
Definition cpm86.h:377
uint16_t first_free_entry
First free entry in LDT after last filled entry.
Definition cpm86.h:373
uint16_t maximum_entries
Maximum allowed LDT entries.
Definition cpm86.h:371
A special descriptor to represent the group for imported shared runtime libraries.
Definition cpm86.h:336
uint16_t GetSizeParas(const CPM86Format &module) const override
Returns the size of the segment group in 16-byte paragraphs.
Definition cpm86.cc:354
void Prepare(CPM86Format &module)
Sets up any values before it can be written to file.
Definition cpm86.cc:327
std::vector< library > libraries
The shared runtime libraries to be imported.
Definition cpm86.h:339
The native file format for 8086 based CP/M derived operating systems, including FlexOS 186/286.
Definition cpm86.h:32
uint8_t cpm_flags
CP/M specific flags used by Concurrent DOS, stored at offset 0x7A.
Definition cpm86.h:444
uint32_t rsx_table_offset
The actual RSX table, stored in 128 byte units at offset 0x7B.
Definition cpm86.h:436
offset_t file_size
The full size of the image.
Definition cpm86.h:451
void CalculateValues() override
Intermediate step between processing module and generating output file to set up headers and manageme...
Definition cpm86.cc:1011
std::shared_ptr< Linker::OptionCollector > GetOptions() override
Returns object containing a sequence of option fields provided with the -S command line flag.
Definition cpm86.cc:1298
void ProcessModule(Linker::Module &module) override
Processes the module object and initializes format fields.
Definition cpm86.cc:1849
std::array< Descriptor, 8 > descriptors
A .cmd file may contain up to 8 descriptors that describer the segment groups.
Definition cpm86.h:408
void BuildLDTImage(Linker::Module &module)
Creates the LDT image for a fastload FlexOS binary.
Definition cpm86.cc:1691
bool option_no_relocation
Flag to indicate that relocations must be suppressed.
Definition cpm86.h:604
application_type application
Target application type.
Definition cpm86.h:534
std::array< rsx_record, 8 > rsx_table
Represents a list of attached RSX modules.
Definition cpm86.h:432
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition cpm86.cc:582
@ FLAG_DIRECT_VIDEO
Set when the program uses direct video access. Such programs cannot execute in the background.
Definition cpm86.h:464
@ FLAG_FIXUPS
Set when relocations are present, indicates that the executable is relocatable and needs fixing up be...
Definition cpm86.h:456
@ FLAG_REQUIRED_8087
Set when the software only runs if an 8087 is present. The system will allocate 8087 resources.
Definition cpm86.h:460
@ FLAG_RSX
Set for residential system extensions (RSX files)
Definition cpm86.h:462
@ FLAG_MPMLOCK
Program uses record locking functions of MP/M-86 instead of those of Concurrent CP/M-86 or Concurrent...
Definition cpm86.h:466
@ FLAG_NO_BANKING
Set when the program cannot run in banked memory.
Definition cpm86.h:468
@ FLAG_OPTIONAL_8087
Set when the software expects the system to allocate 8087 resources, but it can emulate the missing 8...
Definition cpm86.h:458
FastLoadDescriptor fastload_descriptor
FlexOS 286 defines a fast load segment (unknown name) at offset 0x51.
Definition cpm86.h:416
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition cpm86.cc:790
format_type
Describes the number and type of segment groups, as well as the target operating system.
Definition cpm86.h:483
@ FORMAT_FASTLOAD
FlexOS 286 fastload format as generated by postlink, with an LDT image in file (unfinished)
Definition cpm86.h:507
@ FORMAT_FLEXOS
FlexOS 286 format, running in protected mode, possible SRTL shared libraries (untested)
Definition cpm86.h:503
@ FORMAT_COMPACT
CP/M-86 format, each non-executable section will have its own group, including stack and up to 4 auxi...
Definition cpm86.h:499
@ FORMAT_8080
CP/M-86 format, only a single non-shared code group is present, with optional relocations and attache...
Definition cpm86.h:491
@ FORMAT_UNKNOWN
Unspecified.
Definition cpm86.h:487
@ FORMAT_SMALL
CP/M-86 format, only code (possibly shared) and a separate data group is present, also used for mediu...
Definition cpm86.h:495
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition cpm86.cc:673
memory_model_t memory_model
Memory model of generated code, determines how the offsets are calculated within a segment group.
Definition cpm86.h:620
memory_model_t
Represents the memory model of the running executable, which is the way in which the segments are set...
Definition cpm86.h:610
@ MODEL_COMPACT
DS!=SS!=ES.
Definition cpm86.h:617
@ MODEL_TINY
CS=DS=SS=ES, only possible in 8080 mode.
Definition cpm86.h:613
@ MODEL_SMALL
DS=SS=ES, only possible in 8080 or small mode.
Definition cpm86.h:615
std::vector< Relocation > relocations
The sequence of intramodule relocations.
Definition cpm86.h:424
offset_t ImageSize() const override
Retrieves size of stored data.
Definition cpm86.cc:668
uint32_t relocations_offset
Offset of relocation records, stored in 128 byte units at offset 0x7D.
Definition cpm86.h:428
bool FormatSupportsLibraries() const override
Whether the format supports libraries.
Definition cpm86.cc:1123
application_type
Definition cpm86.h:513
@ APPL_RSX
CP/M-86 .rsx resident system extension file.
Definition cpm86.h:519
@ APPL_OVR
CP/M-86 .ovr overlay (unsupported)
Definition cpm86.h:527
@ APPL_RSP
MP/M-86 or Concurrent CP/M-86 .rsp resident system process file (unsupported)
Definition cpm86.h:521
@ APPL_286
FlexOS 286 .286 executable file (limited support)
Definition cpm86.h:529
@ APPL_SRL
FlexOS 286 .SRL shared runtime library (limited support)
Definition cpm86.h:531
@ APPL_MPM
MP/M-86 .mpm system module file (unsupported)
Definition cpm86.h:523
@ APPL_UNKNOWN
Unspecified.
Definition cpm86.h:515
@ APPL_CMD
CP/M-86 .cmd executable file.
Definition cpm86.h:517
@ APPL_CON
Concurrent CP/M-86 .con system module file (unsupported)
Definition cpm86.h:525
bool FormatIs16bit() const override
Whether the format is 16-bit or not.
Definition cpm86.cc:1113
std::map< std::shared_ptr< Linker::Segment >, Descriptor::group_type > segment_types
Assignment from each segment to the segment group type number (1: code, 2: data, etc....
Definition cpm86.h:635
uint8_t flags
Execution flags, stored at offset 0x7F.
Definition cpm86.h:440
void SetModel(std::string model) override
Sets the way memory is organized, typically modifying a built-in script.
Definition cpm86.cc:1265
bool option_shared_code
Flag indicating that the code group is shared, not possible in 8080 format.
Definition cpm86.h:602
std::vector< Linker::OptionDescription< void > > GetMemoryModelNames() override
Returns a list of the supported memory models, used for documentation.
Definition cpm86.cc:1260
library_id lib_id
FlexOS 286 library identifier (for libraries) at offset 0x60.
Definition cpm86.h:420
void SetOptions(std::map< std::string, std::string > &options) override
Passes command line parameters as settings over to format object.
Definition cpm86.cc:1303
void Clear() override
Resets all fields to their default values, deallocate memory.
Definition cpm86.cc:456
void GenerateFile(std::string filename, Linker::Module &module) override
The main function that handles processing, calculating and generating the final image.
Definition cpm86.cc:2027
void AssignSegmentTypes()
Determine the segment group type number, must be called before accessing segment_types.
Definition cpm86.cc:1151
bool FormatSupportsSegmentation() const override
Whether the format supports multiple segments.
Definition cpm86.cc:1108
LibraryDescriptor library_descriptor
FlexOS 286 defines a shared runtime library group at offset 0x48.
Definition cpm86.h:412
format_type format
Format of file to generate.
Definition cpm86.h:510
std::string GetDefaultExtension(Linker::Module &module, std::string filename) const override
Appends a default extension to the filename.
Definition cpm86.cc:2037
uint32_t file_offset
The start of the image within the file, typically 0 except for embedded modules, usually for embedded...
Definition cpm86.h:449
bool FormatIsProtectedMode() const override
Whether the format is in protected mode or not (x86 only)
Definition cpm86.cc:1118
bool option_generate_fixup_group
On FlexOS, relocations can be part of its own group.
Definition cpm86.h:606
An abstract interface that separates structure and presentation of the data inside a file.
Definition dumper.h:586
offset_t WriteFile(Writer &wr) const override=0
Stores data in memory to file.
Encodes an object module file as a collection of sections, symbols and relocations.
Definition module.h:24
Helper class that contains the options interpreted by the format.
Definition options.h:308
Documents and handles command line options.
Definition options.h:196
virtual std::string GetDefaultExtension(Module &module, std::string filename) const
Appends a default extension to the filename.
A helper class, encapsulating functionality needed to import binary data.
Definition reader.h:16
A helper class to collect sections into segments.
Definition segment_manager.h:32
A helper class, encapsulating functionality needed to export binary data.
Definition writer.h:15
uint32_t address
Intel 286 descriptor base address, 24-bit.
Definition cpm86.h:384
uint8_t group
Group the segment belongs to.
Definition cpm86.h:386
uint16_t limit
Intel 286 descriptor limit.
Definition cpm86.h:382
Represents a single relocation.
Definition cpm86.h:174
(FlexOS only) A shared runtime library identifier
Definition cpm86.h:251
uint16_t major_version
The major version of the library.
Definition cpm86.h:255
std::string name
The name of the library, 8 characters long.
Definition cpm86.h:253
static library_id ParseNameAndVersion(std::string name_and_version)
Converts a string in the format "FILENAME.MAJ.MIN.FLAGS" to an identifier.
Definition cpm86.cc:228
uint32_t flags
System specific flags, undocumented.
Definition cpm86.h:259
uint16_t minor_version
The minor version of the library.
Definition cpm86.h:257
(FlexOS 286 only) A shared runtime library entry in the shared runtime library group
Definition cpm86.h:292
uint16_t relocation_count
Relocation count.
Definition cpm86.h:296
uint16_t first_selector
(FASTLOAD only) First selector that references this library
Definition cpm86.h:299
uint16_t unknown
(FASTLOAD only) Unknown
Definition cpm86.h:301
std::vector< Relocation > relocations
The set of relocations.
Definition cpm86.h:294
std::set< relocation_source > relocation_targets
Unordered relocations, only used during binary generation.
Definition cpm86.h:304
Represents the location of a 16-bit words that needs to be relocated.
Definition cpm86.h:148
offset_t offset
The offset to the word within the segment group.
Definition cpm86.h:152
number_t segment
The segment group number that contains the required relocation.
Definition cpm86.h:150
Represents an attached RSX file (residential system extension)
Definition cpm86.h:209
std::shared_ptr< Linker::Image > contents
A reference to the stored module, either parsed or a raw block of data.
Definition cpm86.h:226
uint16_t offset_record
The offset to the attached RSX file, in 128-byte units.
Definition cpm86.h:220
std::string name
The filename of the RSX file, 8-byte long.
Definition cpm86.h:213
std::string rsx_file_name
The host filename of the RSX file, used only for writing.
Definition cpm86.h:211