|
- # E06-S04: build the conversion fixture and its D81.
- [CmdletBinding()]
- param()
-
- $ErrorActionPreference = "Stop"
- $project = Split-Path $PSScriptRoot -Parent
- Import-Module (Join-Path $PSScriptRoot "lib\Nova128Test.psm1") -Force
- $out = Join-Path $project "build\convert-test"
- New-Item -ItemType Directory -Force -Path $out | Out-Null
-
- $link = Invoke-Nova128Link -Name "convert-test" -BuildDir $out `
- -Config (Join-Path $project "cfg\compiler.cfg") -Sources @(
- (Join-Path $project "src\runtime\print.s"),
- (Join-Path $project "src\runtime\frames.s"),
- (Join-Path $project "src\runtime\interfaces.s"),
- (Join-Path $project "tests\runtime\convert-test.s"))
- if ((Get-Nova128Label $link.Labels "test_entry") -ne 0x1C0D) { throw "test_entry is not at `$1C0D" }
- $end = Get-Nova128Label $link.Labels "test_end"
- if ($end -ge 0x4000) {
- throw ("convert-test ends at `$" + $end.ToString("X4") + "; it must stay below `$4000")
- }
-
- New-Nova128Disk -Path (Join-Path $out "convert-test.d81") -Files @(
- @{ Name = "convert-test"; Path = $link.Program; Type = "prg" })
- Write-Host ("built {0} (end {1:X4})" -f $link.Program, $end)
|