Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,37 +0,0 @@
|
|||
function Invoke-Subleq ([int[]]$Program)
|
||||
{
|
||||
[int]$ip, [string]$output = $null
|
||||
|
||||
try
|
||||
{
|
||||
while ($ip -ge 0)
|
||||
{
|
||||
if ($Program[$ip] -eq -1)
|
||||
{
|
||||
$Program[$Program[$ip + 1]] = [int](Read-Host -Prompt SUBLEQ)[0]
|
||||
}
|
||||
elseif ($Program[$ip + 1] -eq -1)
|
||||
{
|
||||
$output += "$([char]$Program[$Program[$ip]])"
|
||||
}
|
||||
else
|
||||
{
|
||||
$Program[$Program[$ip + 1]] -= $Program[$Program[$ip]]
|
||||
|
||||
if ($Program[$Program[$ip + 1]] -le 0)
|
||||
{
|
||||
$ip = $Program[$ip + 2]
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
$ip += 3
|
||||
}
|
||||
|
||||
return $output
|
||||
}
|
||||
catch [IndexOutOfRangeException],[Exception]
|
||||
{
|
||||
Write-Host "$($Error[0].Exception.Message)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Invoke-Subleq -Program 15,17,-1,17,-1,-1,16,1,-1,16,3,-1,15,15,0,0,-1,72,101,108,108,111,44,32,119,111,114,108,100,33,10,0
|
||||
Loading…
Add table
Add a link
Reference in a new issue