From 3d1c3e94077341d37b460683fd54d5df920c801e Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 18 Mar 2023 19:30:17 -0700 Subject: [PATCH] Keep trying to free some bytes --- src/utilsrc/tftpd.pla | 3 ++- src/vmsrc/apple/cmd.pla | 11 ++++------- src/vmsrc/apple/cmdjit.pla | 11 ++++------- src/vmsrc/apple/soscmd.pla | 20 +++++++++----------- src/vmsrc/apple/soscmdjit.pla | 20 +++++++++----------- src/vmsrc/apple/sossys.pla | 2 +- src/vmsrc/apple/sossysjit.pla | 2 +- 7 files changed, 30 insertions(+), 39 deletions(-) diff --git a/src/utilsrc/tftpd.pla b/src/utilsrc/tftpd.pla index c807d4d..e2b73f7 100644 --- a/src/utilsrc/tftpd.pla +++ b/src/utilsrc/tftpd.pla @@ -5,6 +5,7 @@ include "inc/cmdsys.plh" include "inc/inet.plh" include "inc/fileio.plh" include "inc/conio.plh" +sysflags nojitc // Keep JITC from compiling and pausing while transferring // // TFTP values // @@ -369,7 +370,7 @@ def volumes#0 next end -puts("TFTP Server,Version 2.0\n") +puts("TFTP Server, Version 2.0\n") if !iNet:initIP() return -1 fin diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 50722f4..a5abf48 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -1318,9 +1318,8 @@ end def docmds#0 word prefix - prefix = allocheap(64) - pfxop(prefix, GET_PFX) - while 1 + prefix = pfxop(heap, GET_PFX) + repeat if ^getlnbuf strcpy(@cmdln, getlnbuf) when toupper(parsecmd(getlnbuf)) @@ -1345,7 +1344,6 @@ def docmds#0 execsys(getlnbuf) break is '+' - releaseheap(prefix) // // Exec module // @@ -1354,7 +1352,6 @@ def docmds#0 // Clean up // resetmemfiles - prefix = allocheap(64) break otherwise cout('?') @@ -1367,7 +1364,7 @@ def docmds#0 fin prstr(pfxop(prefix, GET_PFX)) rdstr($BA) - loop + until 0 end // // Dummy definition to get free heap @@ -1381,7 +1378,7 @@ heap = @lastdef // // Print PLASMA version // -prstr("PLASMA 2.0 BETA 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 2.0 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index c5575f8..480f5d8 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1388,9 +1388,8 @@ def docmds#0 loadmod(jitmod) // Cannot do this in init code - it will overwrite it! xheap = $0400 // Reset heap to point at low memory xheaptop = $A000 // Top below JITC - prefix = allocheap(64) - pfxop(prefix, GET_PFX) - while 1 + prefix = pfxop(heap, GET_PFX) + repeat if ^getlnbuf strcpy(@cmdln, getlnbuf) when toupper(parsecmd(getlnbuf)) @@ -1415,7 +1414,6 @@ def docmds#0 execsys(getlnbuf) break is '+' - releaseheap(prefix) // // Set JIT code pointer // @@ -1428,7 +1426,6 @@ def docmds#0 // Clean up // resetmemfiles - prefix = allocheap(64) break otherwise cout('?') @@ -1441,7 +1438,7 @@ def docmds#0 fin prstr(pfxop(prefix, GET_PFX)) rdstr($BA) - loop + until 0 end // // Dummy definition to get free heap @@ -1455,7 +1452,7 @@ heap = @lastdef // // Print PLASMA version // -prstr("PLASMA 2.0 BETA 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 2.0 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // diff --git a/src/vmsrc/apple/soscmd.pla b/src/vmsrc/apple/soscmd.pla index 7b8526a..f5e958f 100755 --- a/src/vmsrc/apple/soscmd.pla +++ b/src/vmsrc/apple/soscmd.pla @@ -170,11 +170,10 @@ end // def shell#1 byte textmode[3] - word prefix + byte prefix[64] byte err[] word cmdptr - prefix = heapalloc(64) // // Copy AUTORUN commmand line // @@ -190,18 +189,18 @@ def shell#1 break is 'P' if ^cmdptr and ^(cmdptr + 1) <> '/' - strcat(prefix, cmdptr) + strcat(@prefix, cmdptr) else - strcpy(prefix, cmdptr) + strcpy(@prefix, cmdptr) fin - setpfx(prefix) + setpfx(@prefix) break is '/' repeat - ^prefix-- - until prefix->[^prefix] == '/' - if ^prefix > 1 - setpfx(prefix) + prefix-- + until prefix[prefix] == '/' + if prefix > 1 + setpfx(@prefix) fin break is 'S' @@ -212,7 +211,6 @@ def shell#1 volumes break is '+' - heaprelease(prefix) //cmdsys:modexec(striptrail(cmdptr)) return striptrail(cmdptr) //cmdsys:syswrite(cmdsys.refcons, @textmode, 3) @@ -229,7 +227,7 @@ def shell#1 fin putln fin - puts(getpfx(prefix)) + puts(getpfx(@prefix)) cmdptr = gets($BA) strcpy(cmdsys:cmdline, cmdptr) until 0 diff --git a/src/vmsrc/apple/soscmdjit.pla b/src/vmsrc/apple/soscmdjit.pla index 2afec51..7ae06c1 100755 --- a/src/vmsrc/apple/soscmdjit.pla +++ b/src/vmsrc/apple/soscmdjit.pla @@ -245,11 +245,10 @@ end // def shell#1 byte textmode[3] - word prefix + byte prefix[64] byte err[] word cmdptr - prefix = heapalloc(64) // // Copy AUTORUN commmand line // @@ -265,18 +264,18 @@ def shell#1 break is 'P' if ^cmdptr and ^(cmdptr + 1) <> '/' - strcat(prefix, cmdptr) + strcat(@prefix, cmdptr) else - strcpy(prefix, cmdptr) + strcpy(@prefix, cmdptr) fin - setpfx(prefix) + setpfx(@prefix) break is '/' repeat - ^prefix-- - until prefix->[^prefix] == '/' - if ^prefix > 1 - setpfx(prefix) + prefix-- + until prefix[prefix] == '/' + if prefix > 1 + setpfx(@prefix) fin break is 'S' @@ -287,7 +286,6 @@ def shell#1 volumes break is '+' - heaprelease(prefix) *jitcodeptr = jitcbuf //cmdsys:modexec(striptrail(cmdptr)) return striptrail(cmdptr) @@ -305,7 +303,7 @@ def shell#1 fin putln fin - puts(getpfx(prefix)) + puts(getpfx(@prefix)) cmdptr = gets($BA) strcpy(cmdsys:cmdline, cmdptr) until 0 diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index ad2cfaf..8d30bf9 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -1263,7 +1263,7 @@ cmdlnptr = @cmdln // Print PLASMA version // init_cons -prstr("PLASMA 2.0 BETA\n")//; putb(version.1); putc('.'); putb(version.0); putln +prstr("PLASMA 2.0\n")//; putb(version.1); putc('.'); putb(version.0); putln prstr("MEM:$"); prword(availheap); crout // // Exec command line parser diff --git a/src/vmsrc/apple/sossysjit.pla b/src/vmsrc/apple/sossysjit.pla index 4cf6f77..d3ebe3c 100755 --- a/src/vmsrc/apple/sossysjit.pla +++ b/src/vmsrc/apple/sossysjit.pla @@ -1286,7 +1286,7 @@ cmdlnptr = @cmdln // Print PLASMA version // init_cons -prstr("PLASMA 2.0 BETA JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln +prstr("PLASMA 2.0 JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln prstr("MEM:$"); prword(availheap); crout // // Exec command line parser