Linkstor80 1.1.0

dotnet add package Linkstor80 --version 1.1.0
                    
NuGet\Install-Package Linkstor80 -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Linkstor80" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Linkstor80" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Linkstor80" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Linkstor80 --version 1.1.0
                    
#r "nuget: Linkstor80, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Linkstor80@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Linkstor80&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Linkstor80&version=1.1.0
                    
Install as a Cake Tool

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:

  1. Use Nestor80 (the N80 or N80.exe command line application, or the Nestor80 assembler NuGet package) to generate one or more relocatable files.

  2. 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.

  1. Create an instance of LinkingConfiguration and set its properties as appropriate. At the very least you should set LinkingSequenceItems (with the array created in the previous step) and OpenFile (a callback to open the involved relocatable files).

  2. Run RelocatableFilesProcessor.Link, passing the instance of LinkingConfiguration and an open writable stream for the binary file to generate. The items in LinkingSequenceItems will be processed in the order in which they are found, and the output will be an instance of LinkingResult, where you can check if there was any error, and obtain information about the generated programs (as instances of ProgramData), 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
1.1.0 294 6/11/2025
1.0.0 203 4/16/2025

Add the --align-code and --align-data arguments

https://github.com/Konamiman/Nestor80/pull/23