Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

28 lines
1.2KB

  1. # E05-S03: build the object construction/deletion fixture and its D81.
  2. [CmdletBinding()]
  3. param()
  4. $ErrorActionPreference = "Stop"
  5. $project = Split-Path $PSScriptRoot -Parent
  6. Import-Module (Join-Path $PSScriptRoot "lib\Nova128Test.psm1") -Force
  7. $out = Join-Path $project "build\object-test"
  8. New-Item -ItemType Directory -Force -Path $out | Out-Null
  9. $link = Invoke-Nova128Link -Name "object-test" -BuildDir $out `
  10. -Config (Join-Path $project "cfg\compiler.cfg") -Sources @(
  11. (Join-Path $project "src\runtime\print.s"),
  12. (Join-Path $project "src\runtime\heap.s"),
  13. (Join-Path $project "src\runtime\frames.s"),
  14. (Join-Path $project "src\runtime\objects.s"),
  15. (Join-Path $project "src\runtime\construct.s"),
  16. (Join-Path $project "tests\runtime\object-test.s"))
  17. if ((Get-Nova128Label $link.Labels "test_entry") -ne 0x1C0D) { throw "test_entry is not at `$1C0D" }
  18. $end = Get-Nova128Label $link.Labels "test_end"
  19. if ($end -ge 0x4000) {
  20. throw ("object-test ends at `$" + $end.ToString("X4") + "; it must stay below `$4000")
  21. }
  22. New-Nova128Disk -Path (Join-Path $out "object-test.d81") -Files @(
  23. @{ Name = "object-test"; Path = $link.Program; Type = "prg" })
  24. Write-Host ("built {0} (end {1:X4})" -f $link.Program, $end)

Powered by TurnKey Linux.