|
- # E07-S03: build the single-file tokenizer PRG and a fresh D81 for it. The
- # editor-written SEQ file is added to the image after Vim creates it.
- [CmdletBinding()]
- param()
-
- $ErrorActionPreference = "Stop"
- $project = Split-Path $PSScriptRoot -Parent
- Import-Module (Join-Path $PSScriptRoot "lib\Nova128Test.psm1") -Force
- $out = Join-Path $project "build\vim-roundtrip"
- New-Item -ItemType Directory -Force -Path $out | Out-Null
-
- $link = Invoke-Nova128Link -Name "tokenize-seq" -BuildDir $out `
- -Config (Join-Path $project "cfg\compiler.cfg") -Sources @(
- (Join-Path $project "src\compiler\mmu.s"),
- (Join-Path $project "src\compiler\diskio.s"),
- (Join-Path $project "src\compiler\source.s"),
- (Join-Path $project "src\compiler\lexer.s"),
- (Join-Path $project "tests\disk\tokenize-seq.s"))
- if ((Get-Nova128Label $link.Labels "test_entry") -ne 0x1C0D) { throw "test_entry is not at `$1C0D" }
-
- $disk = Join-Path $out "tokenize-seq.d81"
- New-Nova128Disk -Path $disk -Files @(
- @{ Name = "tokenize-seq"; Path = $link.Program; Type = "prg" })
-
- Write-Host ("built {0}" -f $link.Program)
- Write-Host ("disk {0}" -f $disk)
|