Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

33 řádky
1.6KB

  1. # E04-S05: build the hello compiler fixture and a D81 holding HELLO.N8.
  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\hello-test"
  8. New-Item -ItemType Directory -Force -Path $out | Out-Null
  9. $link = Invoke-Nova128Link -Name "hello-test" -BuildDir $out `
  10. -Config (Join-Path $project "cfg\compiler.cfg") -Sources @(
  11. (Join-Path $project "src\compiler\mmu.s"),
  12. (Join-Path $project "src\compiler\diskio.s"),
  13. (Join-Path $project "src\compiler\source.s"),
  14. (Join-Path $project "src\compiler\lexer.s"),
  15. (Join-Path $project "src\compiler\names.s"),
  16. (Join-Path $project "src\compiler\diagnostics.s"),
  17. (Join-Path $project "src\compiler\parser.s"),
  18. (Join-Path $project "src\compiler\interfaces.s"),
  19. (Join-Path $project "src\compiler\types.s"),
  20. (Join-Path $project "src\compiler\output.s"),
  21. (Join-Path $project "src\runtime\startup.s"),
  22. (Join-Path $project "tests\compiler\hello-test.s"))
  23. if ((Get-Nova128Label $link.Labels "test_entry") -ne 0x1C0D) { throw "test_entry is not at `$1C0D" }
  24. $pet = Join-Path $out "hello.pet"
  25. [IO.File]::WriteAllBytes($pet, (ConvertTo-Nova128Petscii (Get-Content -Raw -LiteralPath (Join-Path $project "tests\compiler\hello.n8"))))
  26. New-Nova128Disk -Path (Join-Path $out "hello-test.d81") -Files @(
  27. @{ Name = "hello-test"; Path = $link.Program; Type = "prg" },
  28. @{ Name = "hello.n8"; Path = $pet; Type = "seq" }) # lowercase -> unshifted PETSCII
  29. Write-Host ("built {0}" -f $link.Program)

Powered by TurnKey Linux.