diff --git a/images/apple/DRAWL.po b/images/apple/DRAWL.po index 8b5a0a5..a660297 100644 Binary files a/images/apple/DRAWL.po and b/images/apple/DRAWL.po differ diff --git a/images/apple/PLEIADES-2.20-INST.po b/images/apple/PLEIADES-2.20-INST.po index 61e7695..e4ccd58 100644 Binary files a/images/apple/PLEIADES-2.20-INST.po and b/images/apple/PLEIADES-2.20-INST.po differ diff --git a/images/apple/PLEIADES-2.20.po b/images/apple/PLEIADES-2.20.po index 194dc25..2a36071 100644 Binary files a/images/apple/PLEIADES-2.20.po and b/images/apple/PLEIADES-2.20.po differ diff --git a/images/apple/PLEIADES-A3MAME.po b/images/apple/PLEIADES-A3MAME.po index d825ca3..4157908 100644 Binary files a/images/apple/PLEIADES-A3MAME.po and b/images/apple/PLEIADES-A3MAME.po differ diff --git a/images/apple/PLFORTH.po b/images/apple/PLFORTH.po index dcd868c..3b30cf2 100644 Binary files a/images/apple/PLFORTH.po and b/images/apple/PLFORTH.po differ diff --git a/images/apple/apple3.hd b/images/apple/apple3.hd index 95f14a0..72dbd03 100644 Binary files a/images/apple/apple3.hd and b/images/apple/apple3.hd differ diff --git a/src/libsrc/apple/conio.pla b/src/libsrc/apple/conio.pla index d52536f..5fb62b7 100644 --- a/src/libsrc/apple/conio.pla +++ b/src/libsrc/apple/conio.pla @@ -565,7 +565,7 @@ def a2viewport(left, top, width, height) if !width or !height left = 0 top = 0 - width = 40 + width = flags & txt80 ?? 80 :: 40 height = 24 fin ^WNDLEFT = left @@ -781,6 +781,9 @@ def a2textmode(columns) conio:textctrl = @a2ctrl columns = 40 fin + ^showtext + ^showfull + a2viewport(0, 0, 0, 0) conio:clear(cls) return columns end diff --git a/src/lisp/drawl.pla b/src/lisp/drawl.pla index f84fa02..67b4336 100644 --- a/src/lisp/drawl.pla +++ b/src/lisp/drawl.pla @@ -135,7 +135,7 @@ def natv_gr(symptr, expr) if eval_expr(expr=>car) conio:grmode(TRUE) // Mixed mode else - conio:textmode(40) // 40 column text + conio:textmode(0) // Text mode fin return expr end diff --git a/src/lisp/s-expr.pla b/src/lisp/s-expr.pla index 7f5016b..796390d 100644 --- a/src/lisp/s-expr.pla +++ b/src/lisp/s-expr.pla @@ -73,6 +73,12 @@ const ERR_NOT_STR = -12 const ERR_BAD_INDEX = -13 const ERR_BAD_GO = -14 +// +// Temp string size +// + +const TMPSTR_SIZE = 128 + // // Variables // @@ -106,7 +112,6 @@ word hashtbl[HASH_SIZE] var sym_nil, sym_true, sym_quote, sym_lambda, sym_funarg, sym_set var sym_macro, sym_cond, sym_if, sym_label, sym_for var prog, prog_expr, prog_return // Current PROG expressions -var tempstr predef print_expr(expr)#0 predef eval_expr(expr)#1 @@ -1220,14 +1225,15 @@ end def natv_number(symptr, expr) var num + char tempstr[TMPSTR_SIZE] expr = eval_expr(expr=>car) if not expr; return NULL; fin when expr->type & TYPE_MASK is STRING_TYPE // Convert string to number - memcpy(tempstr, expr + stringstr, expr->stringstr + 1) - ^(tempstr + ^tempstr + 1) = 0 - drop, expr = parse_num(tempstr + 1) + memcpy(@tempstr, expr + stringstr, expr->stringstr + 1) + tempstr[tempstr[0] + 1] = 0 + drop, expr = parse_num(@tempstr + 1) break is SYM_TYPE is ARRAY_TYPE @@ -1491,35 +1497,37 @@ end // def natv_string(symptr, expr) + char tempstr[TMPSTR_SIZE] + expr = eval_expr(expr=>car) if not expr; return NULL; fin - ^tempstr = 0 + tempstr[0] = 0 when expr->type & TYPE_MASK is NUM_TYPE when expr->type is NUM_INT - i32tos(expr + intval, tempstr) + i32tos(expr + intval, @tempstr) break is NUM_FLOAT - ext2str(expr + floatval, tempstr, fmt_fpint, fmt_fpfrac, fmt_fp) - if ^(tempstr + 1) == ' ' // Remove leading space - memcpy (tempstr + 1, tempstr + 2, ^tempstr) - ^tempstr-- + ext2str(expr + floatval, @tempstr, fmt_fpint, fmt_fpfrac, fmt_fp) + if tempstr[1] == ' ' // Remove leading space + memcpy (@tempstr + 1, @tempstr + 2, tempstr[0]) + tempstr[0]-- fin break wend break is SYM_TYPE - ^tempstr = expr->type & SYM_LEN - memcpy(tempstr + 1, expr + name, ^tempstr) + tempstr[0] = expr->type & SYM_LEN + memcpy(@tempstr + 1, expr + name, tempstr[0]) break; is ARRAY_TYPE - ^tempstr = 2 - ^(tempstr + 1) = '[' - ^(tempstr + 2) = ']' + tempstr[0] = 2 + tempstr[1] = '[' + tempstr[2] = ']' break; wend - return new_string(tempstr) + return new_string(@tempstr) end def natv_stringp(symptr, expr) @@ -1529,6 +1537,7 @@ end def natv_subs(symptr, expr) var stringptr byte ofst, len + char tempstr[TMPSTR_SIZE] stringptr = eval_expr(expr=>car) if stringptr->type <> STRING_TYPE @@ -1553,27 +1562,28 @@ def natv_subs(symptr, expr) if ofst + len > stringptr->stringstr len = stringptr->stringstr - ofst fin - memcpy(tempstr + 1, stringptr + stringstr + ofst + 1, len) - ^tempstr = len - return new_string(tempstr) + memcpy(@tempstr + 1, stringptr + stringstr + ofst + 1, len) + tempstr[0] = len + return new_string(@tempstr) end def natv_cats(symptr, expr) var len, stringptr + char tempstr[TMPSTR_SIZE] len = 0 while expr stringptr = eval_expr(expr=>car) if stringptr->type == STRING_TYPE - if len + stringptr->stringstr < 255 - memcpy(tempstr + len + 1, stringptr + stringstr + 1, stringptr->stringstr) + if len + stringptr->stringstr < TMPSTR_SIZE + memcpy(@tempstr + len + 1, stringptr + stringstr + 1, stringptr->stringstr) len = len + stringptr->stringstr fin fin expr = expr=>cdr loop - ^tempstr = len - return new_string(tempstr) + tempstr[0] = len + return new_string(@tempstr) end def natv_lens(symptr, expr) @@ -1586,16 +1596,18 @@ def natv_lens(symptr, expr) end def natv_chars(symptr, expr) - ^tempstr = 0 + char tempstr[TMPSTR_SIZE] + + tempstr[0] = 0 while expr symptr = eval_expr(expr=>car) if symptr->type == NUM_INT - ^tempstr++ - ^(tempstr + ^tempstr) = symptr=>intval[0] + tempstr[0]++ + tempstr[tempstr[0]] = symptr=>intval[0] fin expr = expr=>cdr loop - return new_string(tempstr) + return new_string(@tempstr) end def natv_ascii(symptr, expr) @@ -1836,6 +1848,5 @@ new_sym("LENS")=>natv = @natv_lens new_sym("CHARS")=>natv = @natv_chars new_sym("ASCII")=>natv = @natv_ascii //new_sym("SYMS")=>natv = @natv_syms -tempstr = heapalloc(256) return modkeep | modinitkeep done diff --git a/src/scripts/conio.4th b/src/scripts/conio.4th index ff11815..c4c22e3 100644 --- a/src/scripts/conio.4th +++ b/src/scripts/conio.4th @@ -7,7 +7,7 @@ CONIOAPI 6 IFACE PLASMA _TEXTTYPE : NORMALTEXT 1 $FF _TEXTTYPE DROP ; : INVERSETEXT 1 $3F _TEXTTYPE DROP ; : FLASHTEXT 1 $7F _TEXTTYPE DROP ; -CONIOAPI 7 IFACE PLASMA _TEXT : TEXT 40 _TEXT DROP ; +CONIOAPI 7 IFACE PLASMA _TEXT : TEXT 0 _TEXT DROP ; CONIOAPI 8 IFACE PLASMA _GR : GR 1 _GR DROP ; CONIOAPI 9 IFACE PLASMA _COLOR : COLOR _COLOR DROP ; CONIOAPI 10 IFACE PLASMA _PLOT : PLOT _PLOT DROP ; diff --git a/src/toolsrc/plforth.pla b/src/toolsrc/plforth.pla index 6b5a466..7b078ea 100644 --- a/src/toolsrc/plforth.pla +++ b/src/toolsrc/plforth.pla @@ -1813,8 +1813,9 @@ def _comment_#0 end def typelist(typestr, typemask, type)#0 word d - byte tab + byte tab, width + width = cmdsys:_sysflags_ & vid80col ?? 79 :: 39 puts(typestr) tab = ^typestr d = latest @@ -1822,7 +1823,7 @@ def typelist(typestr, typemask, type)#0 if ^d // Skip NONAME definitions if (typemask & ^_ffa_(d)) == type tab = tab + 1 + ^d - if tab > 39 + if tab > width putln; tab = ^d else