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.

38 lines
1.9KB

  1. # E04-S08: build the argument/prologue/return fixture and a D81 with ARGS.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\args-test"
  8. New-Item -ItemType Directory -Force -Path $out | Out-Null
  9. $link = Invoke-Nova128Link -Name "args-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\codegen.s"),
  21. (Join-Path $project "src\compiler\flow.s"),
  22. (Join-Path $project "src\compiler\members.s"),
  23. (Join-Path $project "src\compiler\sizing.s"),
  24. (Join-Path $project "src\compiler\emit.s"),
  25. (Join-Path $project "src\runtime\startup.s"),
  26. (Join-Path $project "src\runtime\frames.s"),
  27. (Join-Path $project "tests\compiler\args-test.s"))
  28. if ((Get-Nova128Label $link.Labels "test_entry") -ne 0x1C0D) { throw "test_entry is not at `$1C0D" }
  29. $pet = Join-Path $out "args.pet"
  30. [IO.File]::WriteAllBytes($pet, (ConvertTo-Nova128Petscii (Get-Content -Raw -LiteralPath (Join-Path $project "tests\compiler\args.n8"))))
  31. New-Nova128Disk -Path (Join-Path $out "args-test.d81") -Files @(
  32. @{ Name = "args-test"; Path = $link.Program; Type = "prg" },
  33. @{ Name = "args.n8"; Path = $pet; Type = "seq" })
  34. Write-Host ("built {0}" -f $link.Program)

Powered by TurnKey Linux.