|
- # E05-S03: build the object construction/deletion 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\object-test"
- New-Item -ItemType Directory -Force -Path $out | Out-Null
-
- $link = Invoke-Nova128Link -Name "object-test" -BuildDir $out `
- -Config (Join-Path $project "cfg\compiler.cfg") -Sources @(
- (Join-Path $project "src\runtime\print.s"),
- (Join-Path $project "src\runtime\heap.s"),
- (Join-Path $project "src\runtime\frames.s"),
- (Join-Path $project "src\runtime\objects.s"),
- (Join-Path $project "src\runtime\construct.s"),
- (Join-Path $project "tests\runtime\object-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 ("object-test ends at `$" + $end.ToString("X4") + "; it must stay below `$4000")
- }
-
- New-Nova128Disk -Path (Join-Path $out "object-test.d81") -Files @(
- @{ Name = "object-test"; Path = $link.Program; Type = "prg" })
- Write-Host ("built {0} (end {1:X4})" -f $link.Program, $end)
|