# E05-S04: build the field/self/concrete-call emitter fixture and its disk. [CmdletBinding()] param() $ErrorActionPreference = "Stop" $project = Split-Path $PSScriptRoot -Parent Import-Module (Join-Path $PSScriptRoot "lib\Nova128Test.psm1") -Force $out = Join-Path $project "build\member-test" New-Item -ItemType Directory -Force -Path $out | Out-Null $link = Invoke-Nova128Link -Name "member-test" -BuildDir $out ` -Config (Join-Path $project "cfg\compiler.cfg") -Sources @( (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\runtime\frames.s"), (Join-Path $project "src\runtime\print.s"), (Join-Path $project "tests\codegen\member-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 ("member-test ends at `$" + $end.ToString("X4") + "; it must stay below `$4000") } New-Nova128Disk -Path (Join-Path $out "member-test.d81") -Files @( @{ Name = "member-test"; Path = $link.Program; Type = "prg" }) Write-Host ("built {0} (end {1:X4})" -f $link.Program, $end)