diff --git a/emulator.pas b/emulator.pas index 702cbaa..34b983d 100644 --- a/emulator.pas +++ b/emulator.pas @@ -267,7 +267,16 @@ begin //Punch if Punch.Path <> '' then begin assign (TapeOut, Punch.Path); - if Punch.Reset then begin + if FileExists (Punch.Path) = false then begin + try + rewrite (TapeOut); + write (TapeOut, R [X]); + close (TapeOut); + Punch.Reset := false; + except + end; + end + else if Punch.Reset then begin try rewrite (TapeOut); write (TapeOut, R [X]);