Linkstor80 1.1.0
dotnet add package Linkstor80 --version 1.1.0
NuGet\Install-Package Linkstor80 -Version 1.1.0
<PackageReference Include="Linkstor80" Version="1.1.0" />
<PackageVersion Include="Linkstor80" Version="1.1.0" />
<PackageReference Include="Linkstor80" />
paket add Linkstor80 --version 1.1.0
#r "nuget: Linkstor80, 1.1.0"
#:package Linkstor80@1.1.0
#addin nuget:?package=Linkstor80&version=1.1.0
#tool nuget:?package=Linkstor80&version=1.1.0
Nestor80 linker library
Nestor80 is a Z80, R800 and Z280 assembler almost fully compatible with Microsoft's Macro80 at the source code level. It can produce absolute and relocatable files; relocatable files can be linked using the Linkstor80 package. Linkstor80 is the linker used to combine together multiple relocatable files into an absolute binary file.
Linkstor80 is published as a standalone command line application, LK80
(or LK80.exe
). Additionally, you can use this NuGet package to link relocatable programmatically. The process is as follows:
Use Nestor80 (the
N80
orN80.exe
command line application, or the Nestor80 assembler NuGet package) to generate one or more relocatable files.Create a an array of instances of
ILinkingSequenceItem
. The classes tha implement this interface are:RelocatableFileReference
- refers to a relocatable file to process.SetCodeBeforeDataMode
- instructs the linker to switch to "code before data" linking mode (places the code segment before the data segment for each program).SetDataBeforeCodeMode
- instructs the linker to place the "data before code" linking mode (places the data segment before the code segment for each program).SetCodeSegmentAddress
- instructs the linker to use the provided the supplied address as the next code segment address (in "separate code and data" linking mode) or as the next program address (in the other linking modes).SetDataSegmentAddress
- instructs the linker to switch to "separate code and data" linking mode (all code segments from all programs are linked together, and same for the data segments) and use the provided the supplied address as the next data segment address.AlignCodeSegmentAddress
- instructs the linker to align the code segment of the next program (or the entire program, depending on the linking mode) to an address that is a multiple of the supplied value.AlignDataSegmentAddress
- instructs the linker to align the data segment of the next program to an address that is a multiple of the supplied value (can be used in "separate code and data" linking mode only).
These classes mimic the command line arguments of the LK80 application, you can get a reference by running LK80 --help
or by looking at the help text in the LK80 source code.
Create an instance of
LinkingConfiguration
and set its properties as appropriate. At the very least you should setLinkingSequenceItems
(with the array created in the previous step) andOpenFile
(a callback to open the involved relocatable files).Run
RelocatableFilesProcessor.Link
, passing the instance ofLinkingConfiguration
and an open writable stream for the binary file to generate. The items inLinkingSequenceItems
will be processed in the order in which they are found, and the output will be an instance ofLinkingResult
, where you can check if there was any error, and obtain information about the generated programs (as instances ofProgramData
), for example the public symbols with their absolute addresses.
You can take a look at the source of the LK80 tool for a real life example. See also:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Add the --align-code and --align-data arguments
https://github.com/Konamiman/Nestor80/pull/23