From 4c4924a34bfc64686ea458902eae08809be8552f Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 19 Jan 2025 07:43:43 -0800 Subject: [PATCH] Adjust native compiler buffer sizes for best useage --- src/dhgr.tk/makefile | 11 ++++++++++- src/toolsrc/codegen.pla | 4 ++-- src/toolsrc/plasm.pla | 6 ++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/dhgr.tk/makefile b/src/dhgr.tk/makefile index faf6f9d..c74690e 100644 --- a/src/dhgr.tk/makefile +++ b/src/dhgr.tk/makefile @@ -47,9 +47,18 @@ demos: $(PENGUINS) cp $(PENGUINS) prodos/dhgr.tk/demos/penguins/ cp dhgr.tk/demos/penguins/*.BIN prodos/dhgr.tk/demos/penguins/ +bld: $(DHGRLIB) $(DHGRUTILS) $(DHGRTEST) $(DHGRRGB) $(DHGRSHOW) + -mkdir prodos/bld/dhgr.tk/ + -mkdir prodos/bld/dhgr.tk/inc/ + cp dhgr.tk/inc/dhgrlib.plh prodos/bld/dhgr.tk/inc/DHGRLIB.PLH.TXT + cp dhgr.tk/inc/dhgrutils.plh prodos/bld/dhgr.tk/inc/DHGRUTILS.PLH.TXT + cp dhgr.tk/test/dhgrtest.pla prodos/bld/dhgr.tk/DHGRTEST.PLA.TXT + cp dhgr.tk/utils/dhgrrgb.pla prodos/bld/dhgr.tk/DHGRRGB.PLA.TXT + cp dhgr.tk/utils/dhgrshow.pla prodos/bld/dhgr.tk/DHGRSHOW.PLA.TXT + fontconv: $(TTFCONV) $(IIGSCONV) $(A2CONV) $(A2DEFAULT) $(DDCONV) -all: libs test utils demos +all: libs test utils demos bld clean: -rm dhgr.tk/demos/pengiuns/*.o dhgr.tk/demos/pengiuns/*.REL dhgr.tk/demos/pengiuns/*.a diff --git a/src/toolsrc/codegen.pla b/src/toolsrc/codegen.pla index 2e297d2..b5bf6c0 100644 --- a/src/toolsrc/codegen.pla +++ b/src/toolsrc/codegen.pla @@ -565,9 +565,9 @@ def init_idglobal#0 dfd_num = DFDNUM/2 tag_num = TAGNUM/2 fixup_num = FIXUPNUM/2 - globalbufsz = IDGLOBALSZ/2 + globalbufsz = IDGLOBALSZ-1024 localbufsz = IDLOCALSZ/2 - inbuff_len = MAX_INPUT_LEN/2 + inbuff_len = MAX_INPUT_LEN/2 fin // //Init free op sequence list diff --git a/src/toolsrc/plasm.pla b/src/toolsrc/plasm.pla index 14e5e12..a008e25 100755 --- a/src/toolsrc/plasm.pla +++ b/src/toolsrc/plasm.pla @@ -284,7 +284,7 @@ word srcline // Saved source line number // // Scanner variables // -const MAX_INPUT_LEN = 1024 +const MAX_INPUT_LEN = 512 word inbuff, inbuff_len = MAX_INPUT_LEN word scanptr byte token = EOL_TKN @@ -512,6 +512,7 @@ include "toolsrc/parse.pla" // Look at command line arguments and compile module // puts("PLASMA Compiler, Version 2.20\n") + arg = argNext(argFirst) if ^arg and ^(arg + 1) == '-' opt = arg + 2 @@ -582,12 +583,13 @@ if srcfile and relfile refnum = srcref parsefile = @srcfile strconstbuff = heapalloc(80) - if isult(heapavail, $6000); inbuff_len = MAX_INPUT_LEN/2; fin + if isult(heapavail, $6000); inbuff_len = MAX_INPUT_LEN/2; fin inbuff = heapalloc(inbuff_len) scanptr = inbuff ^inbuff = NULL exit = heapalloc(t_except) if not except(exit) + // puts("Available mem size = $"); puth(heapavail); putln // // Parse source code module //