From be5dfdba4bb7f23adec11ce42195662977c8d15d Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 5 Feb 2018 14:54:06 -0800 Subject: [PATCH] Could this be it? --- src/libsrc/longjmp.pla | 4 ---- src/toolsrc/ed.pla | 12 +++++------- src/toolsrc/plasm.pla | 5 ++++- src/vmsrc/cmd.pla | 2 +- src/vmsrc/soscmd.pla | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/libsrc/longjmp.pla b/src/libsrc/longjmp.pla index 78c9128..99aa92e 100644 --- a/src/libsrc/longjmp.pla +++ b/src/libsrc/longjmp.pla @@ -20,8 +20,6 @@ export asm except(env) TSX STX TMPL LDY TMPL - LDA IPX ; APPLE 3-ISM - STA TMPH - LDA $0100,Y STA (SRC),Y INY @@ -60,8 +58,6 @@ export asm throw(env, retval) INX BNE - DEC DST+1 - LDA TMPH ; APPLE 3-ISM - STA IPX LDX TMPL TXS LDY TMPL diff --git a/src/toolsrc/ed.pla b/src/toolsrc/ed.pla index ff17804..135db79 100755 --- a/src/toolsrc/ed.pla +++ b/src/toolsrc/ed.pla @@ -315,12 +315,13 @@ end // // File routines // -def readtxt(filename)#0 +def readtxt(filename, startline)#0 byte txtbuf[81], refnum, i, j refnum = fileio:open(filename) if refnum fileio:newline(refnum, $7F, $0D) + numlines = startline repeat txtbuf = fileio:read(refnum, @txtbuf + 1, MAXLNLEN) if txtbuf @@ -1065,16 +1066,14 @@ def cmdmode#0 cmdptr = gets($BA) when toupper(parsecmd(cmdptr)) is 'A' - readtxt(cmdptr) + readtxt(cmdptr, numlines) flags = flags | changed break is 'R' if chkchng inittxtbuf - numlines = 0 strstripcpy(@filename, cmdptr) - readtxt(@filename) - if numlines == 0; numlines = 1; fin + readtxt(@filename, 0) flags = flags & ~changed fin break @@ -1135,8 +1134,7 @@ arg = argNext(argFirst) if ^arg strcpy(@filename, arg) puts(@filename) - numlines = 0 - readtxt(@filename) + readtxt(@filename, 0) fin curschr = '+' flags = flags | insmode diff --git a/src/toolsrc/plasm.pla b/src/toolsrc/plasm.pla index 31572f4..42fd156 100644 --- a/src/toolsrc/plasm.pla +++ b/src/toolsrc/plasm.pla @@ -386,7 +386,10 @@ def exit_err(err)#0 if err & ERR_TABLE; puts("table"); fin if err & ERR_SYNTAX; puts("syntax"); fin putcurln - fileio:close(0) // Close all open files + if incref + fileio:close(incref) // Close include file if open + fin + fileio:close(srcref) // Close source file throw(exit, TRUE) end // diff --git a/src/vmsrc/cmd.pla b/src/vmsrc/cmd.pla index db0195d..feff331 100755 --- a/src/vmsrc/cmd.pla +++ b/src/vmsrc/cmd.pla @@ -1433,7 +1433,7 @@ heap = *freemem // // Print PLASMA version // -prstr("PLASMA Pre3 "); prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA "); prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // diff --git a/src/vmsrc/soscmd.pla b/src/vmsrc/soscmd.pla index 82c422c..59c7a0f 100755 --- a/src/vmsrc/soscmd.pla +++ b/src/vmsrc/soscmd.pla @@ -1441,7 +1441,7 @@ init_cons // // Print PLASMA version // -prstr("PLASMA Pre4 "); prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA "); prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init 2K symbol table. //