|
- # E04-S06: build the self-field/self-call fixture and a D81 holding CALLS.N8.
- [CmdletBinding()]
- param()
-
- $ErrorActionPreference = "Stop"
- $project = Split-Path $PSScriptRoot -Parent
- Import-Module (Join-Path $PSScriptRoot "lib\Nova128Test.psm1") -Force
- $out = Join-Path $project "build\calls-test"
- New-Item -ItemType Directory -Force -Path $out | Out-Null
-
- $link = Invoke-Nova128Link -Name "calls-test" -BuildDir $out `
- -Config (Join-Path $project "cfg\compiler.cfg") -Sources @(
- (Join-Path $project "src\compiler\mmu.s"),
- (Join-Path $project "src\compiler\diskio.s"),
- (Join-Path $project "src\compiler\source.s"),
- (Join-Path $project "src\compiler\lexer.s"),
- (Join-Path $project "src\compiler\names.s"),
- (Join-Path $project "src\compiler\diagnostics.s"),
- (Join-Path $project "src\compiler\parser.s"),
- (Join-Path $project "src\compiler\interfaces.s"),
- (Join-Path $project "src\compiler\types.s"),
- (Join-Path $project "src\compiler\codegen.s"),
- (Join-Path $project "src\compiler\flow.s"),
- (Join-Path $project "src\compiler\members.s"),
- (Join-Path $project "src\compiler\emit.s"),
- (Join-Path $project "src\runtime\startup.s"),
- (Join-Path $project "tests\compiler\calls-test.s"))
- if ((Get-Nova128Label $link.Labels "test_entry") -ne 0x1C0D) { throw "test_entry is not at `$1C0D" }
-
- $pet = Join-Path $out "calls.pet"
- [IO.File]::WriteAllBytes($pet, (ConvertTo-Nova128Petscii (Get-Content -Raw -LiteralPath (Join-Path $project "tests\compiler\calls.n8"))))
- New-Nova128Disk -Path (Join-Path $out "calls-test.d81") -Files @(
- @{ Name = "calls-test"; Path = $link.Program; Type = "prg" },
- @{ Name = "calls.n8"; Path = $pet; Type = "seq" })
- Write-Host ("built {0}" -f $link.Program)
|