From b0c5f1c2e9fe89b1766f92a9a00033499b3d5b10 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 13 Jul 2024 07:20:30 -0700 Subject: [PATCH] Refactor LISP modules --- doc/DRAWL.md | 3 +- src/lisp/drawl.pla | 33 +++-- src/lisp/s-expr.pla | 268 ++-------------------------------------- src/lisp/s-math.pla | 290 ++++++++++++++++++++++++++++++++++++++++++++ src/makefile | 7 +- src/mklisp | 2 + src/mkrel | 2 + 7 files changed, 334 insertions(+), 271 deletions(-) create mode 100644 src/lisp/s-math.pla diff --git a/doc/DRAWL.md b/doc/DRAWL.md index 1d9e335..67c1be5 100644 --- a/doc/DRAWL.md +++ b/doc/DRAWL.md @@ -4,7 +4,6 @@ LISP interpreted on a bytecode VM running on a 1 MHz 6502 is going to be sssllll ## Missing features of LISP 1.5 in DRAWL -- Number values are limited to 32 bit integers, no floating point - General recursion. The 6502 architecture limits recursion (but see tail recursion below), so don't expect too much here - Arrays not implemented @@ -12,7 +11,7 @@ However, the code is partitioned to allow for easy extension so some of these mi ## Features of DRAWL -- 32 bit integers and basic math operators. Hey, better than you probably expected +- 32 bit integers and 80 bir floating point with transcendental math operators - Tail recursion handles deep recursion. Check out [loop.lisp](https://github.com/dschmenk/PLASMA/blob/master/src/lisp/loop.lisp) - Fully garbage collected behind the scenes - Optionally read LISP source file at startup diff --git a/src/lisp/drawl.pla b/src/lisp/drawl.pla index 605f770..8db5f85 100644 --- a/src/lisp/drawl.pla +++ b/src/lisp/drawl.pla @@ -12,6 +12,7 @@ import sexpr const SYM_LEN = $0F const NUM_TYPE = $30 const NUM_INT = $31 + const NUM_FLOAT = $32 const MARK_BIT = $80 const MARK_MASK = $7F @@ -30,31 +31,25 @@ import sexpr word lambda char[0] name end - struc t_numint - res[t_elem] - word[2] intval - end predef gc#0 predef print_expr(expr)#0 predef parse_expr(evalptr, level, refill)#2 predef eval_expr(expr)#1 - predef eval_num(expr)#2 predef bool_pred(bool)#1 - predef new_cons#1 predef new_int(intlo, inthi)#1 predef new_sym(symstr)#1 predef new_assoc(symptr, valptr)#0 predef set_assoc(symptr, valptr)#0 end -// -// REPL and extension interface to S-expression evaluator -// +import smath +end var prog, prog_expr, prog_return // Current PROG expressions var sym_cond // Symbol for cond() var pred_true // Predicate for TRUE + const FILEBUF_SIZE = 128 var readfn // Read input routine var fileref, filebuf // File read vars @@ -126,6 +121,22 @@ def natv_go(expr) return NULL end +def natv_set(expr) + var valptr + + valptr = eval_expr(expr=>cdr=>car) + set_assoc(eval_expr(expr=>car), valptr) + return valptr +end + +def natv_setq(expr) + var valptr + + valptr = eval_expr(expr=>cdr=>car) + set_assoc(expr=>car, valptr) + return valptr +end + // // REPL native helper functions // @@ -228,11 +239,13 @@ end // REPL // -pred_true = eval_expr(new_sym("T")) // Capture value of TRUE +pred_true = bool_pred(TRUE) // Capture value of TRUE sym_cond = new_sym("COND") // This should actually match COND new_sym("PROG")=>natv = @natv_prog new_sym("GO")=>natv = @natv_go new_sym("RETURN")=>natv = @natv_return +new_sym("SET")=>natv = @natv_set +new_sym("SETQ")=>natv = @natv_setq new_sym("BYE")=>natv = @natv_bye new_sym("MEM")=>natv = @natv_memavail parse_cmdline diff --git a/src/lisp/s-expr.pla b/src/lisp/s-expr.pla index 9cf911b..ce13e90 100644 --- a/src/lisp/s-expr.pla +++ b/src/lisp/s-expr.pla @@ -1,7 +1,6 @@ include "inc/cmdsys.plh" include "inc/int32.plh" include "inc/fpstr.plh" -include "inc/fpu.plh" const TYPE_MASK = $70 const NIL = $00 @@ -37,7 +36,7 @@ struc t_numint end struc t_numfloat res[t_elem] - res[t_fpureg] floatval + res[10] floatval end predef eval_expr(expr) @@ -45,7 +44,6 @@ predef eval_expr(expr) var sym_quote, sym_lambda, sym_cond res[t_elem] pred_true = 0, 0, BOOL_TRUE res[t_elem] pred_false = 0, 0, BOOL_FALSE -res[t_numint] nan = 0, 0, NUM_INT, 0, 0, 0, 128 // NaN var cons_list = NULL var cons_free = NULL @@ -222,7 +220,7 @@ export def new_float(extptr)#1 floatptr=>link = float_list float_list = floatptr floatptr->type = NUM_FLOAT - memcpy(floatptr + floatval, extptr, t_fpureg) + memcpy(floatptr + floatval, extptr, 10) return floatptr end @@ -340,6 +338,7 @@ def print_atom(atom)#0 is NUM_TYPE when atom->type is NUM_INT + if atom=>intval[1] >= 0; putc(' '); fin // Add space for pos puti32(atom + intval) break is NUM_FLOAT @@ -388,7 +387,10 @@ end // Parse textual representation of S-expression // -def is_num(c); return c >= '0' and c <= '9'; end +def is_num(cptr) + if ^cptr == '-' or ^cptr == '+'; cptr++; fin + return ^cptr >= '0' and ^cptr <= '9' +end def is_alphasym(c) return (c >= '*' and c <= 'z') and (c <> '.') and (c <> ',') @@ -403,6 +405,8 @@ def parse_num(evalptr)#2 // return evalptr, intptr if ^evalptr == '-' sign = TRUE evalptr++ + elsif ^evalptr == '+' + evalptr++ fin startptr = evalptr while ^evalptr >= '0' and ^evalptr <= '9' @@ -416,7 +420,6 @@ def parse_num(evalptr)#2 // return evalptr, intptr loop fin if toupper(^evalptr) == 'E' - ^evalptr = 'E' evalptr++ if ^evalptr == '-' or ^evalptr == '+'; evalptr++; fin while ^evalptr >= '0' and ^evalptr <= '9' @@ -512,7 +515,7 @@ export def parse_expr(evalptr, level, refill)#2 // return evalptr, exprptr elemptr = NULL break otherwise - if is_num(^evalptr) or (^evalptr == '-' and is_num(^(evalptr+1))) + if is_num(evalptr) evalptr, elemptr = parse_num(evalptr) elsif is_alphasym(^evalptr) evalptr, elemptr = parse_sym(evalptr) @@ -738,246 +741,6 @@ def natv_define(expr) return funclist end -def natv_set(expr) - var valptr - - valptr = eval_expr(expr=>cdr=>car) - set_assoc(eval_expr(expr=>car), valptr) - return valptr -end - -def natv_setq(expr) - var valptr - - valptr = eval_expr(expr=>cdr=>car) - set_assoc(expr=>car, valptr) - return valptr -end - -export def eval_num(expr) - var result - - result = eval_expr(expr=>car) - if result and (result->type & TYPE_MASK == NUM_TYPE) - return result - fin - puts("Not an number\n") - return @nan -end - -def push_int32(intptr)#0 - var[2] int - byte isneg - - isneg = FALSE - if intptr=>[1] < 0 - load32(intptr) - isneg = TRUE - neg32 - store32(@int) - else - int[0] = intptr=>[0] - int[1] = intptr=>[1] - fin - fpu:pushInt(@int[1]) - fpu:scalebXInt(16) - fpu:pushInt(@int[0]) - fpu:addXY() - if isneg - fpu:negX() - fin -end - -def push_num(numptr)#0 - var int - - if numptr->type == NUM_FLOAT - fpu:pushExt(numptr + floatval) - elsif numptr->type == NUM_INT - push_int32(numptr + intval) - else - puts("Pushing non number!\n") - int = 0 - fpu:pushInt(@int) - fin -end - -def natv_add(expr) - var num - var[2] intsum - var[5] extsum - - intsum[0] = 0 - intsum[1] = 0 - num = eval_num(expr) - expr = expr=>cdr - if num->type == NUM_INT - // - // Sum as integers unless a float is encountered - // - intsum[0] = num=>intval[0] - intsum[1] = num=>intval[1] - while expr - num = eval_num(expr) - expr = expr=>cdr - if num->type == NUM_FLOAT - break - fin - load32(@intsum) - add32(num + intval) - store32(@intsum) - loop - fin - if num->type == NUM_FLOAT - // - // Sum as floating point numbers - // - push_int32(@intsum) - push_num(num) - fpu:addXY() - while expr - num = eval_num(expr) - push_num(num) - fpu:addXY() - expr = expr=>cdr - loop - fpu:pullExt(@extsum) - return new_float(@extsum) - fin - return new_int(intsum[0], intsum[1]) -end - -def natv_sub(expr) - var num1, num2 - var[2] dif - var[5] ext - - num1 = eval_num(expr) - num2 = eval_num(expr=>cdr) - if num1->type == NUM_INT and num2->type == NUM_INT - load32(num1 + intval) - sub32(num2 + intval) - store32(@dif) - return new_int(dif[0], dif[1]) - fin - push_num(num1) - push_num(num2) - fpu:subXY() - fpu:pullExt(@ext) - return new_float(@ext) -end - -def natv_mul(expr) - var num1, num2 - var[2] mul - var[5] ext - - num1 = eval_num(expr) - num2 = eval_num(expr=>cdr) - if num1->type == NUM_INT and num2->type == NUM_INT - load32(num1 + intval) - mul32(num2 + intval) - store32(@mul) - return new_int(mul[0], mul[1]) - fin - push_num(num1) - push_num(num2) - fpu:mulXY() - fpu:pullExt(@ext) - return new_float(@ext) -end - -def natv_div(expr) - var num1, num2 - var[2] div - var[5] ext - - num1 = eval_num(expr) - num2 = eval_num(expr=>cdr) - if num1->type == NUM_INT and num2->type == NUM_INT - load32(num1 + intval) - div32(num2 + intval) - store32(@div) - return new_int(div[0], div[1]) - fin - push_num(num1) - push_num(num2) - fpu:divXY() - fpu:pullExt(@ext) - return new_float(@ext) -end - -def natv_rem(expr) - var num1, num2 - var[2] rem, div - var[5] ext - - num1 = eval_num(expr) - num2 = eval_num(expr=>cdr) - if num1->type == NUM_INT and num2->type == NUM_INT - load32(num1 + intval) - rem[1], rem[0] = div32(num2 + intval) - return new_int(rem[0], rem[1]) - fin - push_num(num1) - push_num(num2) - fpu:remXY() - fpu:pullExt(@ext) - return new_float(@ext) -end - -def natv_neg(expr) - var num - var[2] neg - var[5] ext - - num = eval_num(expr) - if num=>type == NUM_INT - load32(num + intval) - neg32 - store32(@neg) - return new_int(neg[0], neg[1]) - fin - push_num(num) - fpu:negX() - fpu:pullExt(@ext) - return new_float(@ext) -end - -def natv_gt(expr) - var num1, num2 - var[5] ext - - num1 = eval_num(expr) - num2 = eval_num(expr=>cdr) - if num1->type == NUM_INT and num2->type == NUM_INT - load32(num1 + intval) - return bool_pred(isgt32(num2 + intval)) - fin - push_num(num2) - push_num(num1) - fpu:subXY() - fpu:pullExt(@ext) - return bool_pred(ext[4] < 0) -end - -def natv_lt(expr) - var num1, num2 - var[5] ext - - num1 = eval_num(expr) - num2 = eval_num(expr=>cdr) - if num1->type == NUM_INT and num2->type == NUM_INT - load32(num1 + intval) - return bool_pred(islt32(num2 + intval)) - fin - push_num(num1) - push_num(num2) - fpu:subXY() - fpu:pullExt(@ext) - return bool_pred(ext[4] < 0) -end - def natv_print(expr) expr = eval_expr(expr=>car) print_expr(expr) @@ -1004,20 +767,9 @@ new_sym("EQ")=>natv = @natv_eq new_sym("NOT")=>natv = @natv_not new_sym("AND")=>natv = @natv_and new_sym("OR")=>natv = @natv_or -new_sym("SET")=>natv = @natv_set -new_sym("SETQ")=>natv = @natv_setq new_sym("NULL")=>natv = @natv_null new_sym("LABEL")=>natv = @natv_label new_sym("DEFINE")=>natv = @natv_define -new_sym("+")=>natv = @natv_add -new_sym("-")=>natv = @natv_sub -new_sym("*")=>natv = @natv_mul -new_sym("/")=>natv = @natv_div -new_sym("REM")=>natv = @natv_rem -new_sym("NEG")=>natv = @natv_neg -new_sym(">")=>natv = @natv_gt -new_sym("<")=>natv = @natv_lt new_sym("PRINT")=>natv = @natv_print -fpu:reset() return modkeep | modinitkeep done diff --git a/src/lisp/s-math.pla b/src/lisp/s-math.pla new file mode 100644 index 0000000..225e209 --- /dev/null +++ b/src/lisp/s-math.pla @@ -0,0 +1,290 @@ +include "inc/cmdsys.plh" +include "inc/int32.plh" +include "inc/fpu.plh" + +import sexpr + const TYPE_MASK = $70 + const NIL = $00 + const BOOL_FALSE = $00 + const BOOL_TRUE = $01 + const CONS_TYPE = $10 + const SYM_TYPE = $20 + const SYM_LEN = $0F + const NUM_TYPE = $30 + const NUM_INT = $31 + const NUM_FLOAT = $32 + const MARK_BIT = $80 + const MARK_MASK = $7F + + struc t_elem + word link + byte type + end + struc t_cons + res[t_elem] + word car + word cdr + end + struc t_sym + res[t_elem] + word natv + word lambda + char[0] name + end + struc t_numint + res[t_elem] + word[2] intval + end + struc t_numfloat + res[t_elem] + res[t_fpureg] floatval + end + + predef new_sym(symstr)#1 + predef new_int(intlo, inthi)#1 + predef new_float(extptr)#1 + predef eval_expr(expr)#1 + predef bool_pred(bool)#1 +end + +res[t_numint] nan = 0, 0, NUM_INT, 0, 0, 0, 128 // NaN + +def eval_num(expr) + var result + + result = eval_expr(expr=>car) + if result and (result->type & TYPE_MASK == NUM_TYPE) + return result + fin + puts("Not an number\n") + return @nan +end + +def push_int32(intptr)#0 + var[2] int + byte isneg + + isneg = FALSE + if intptr=>[1] < 0 + load32(intptr) + isneg = TRUE + neg32 + store32(@int) + else + int[0] = intptr=>[0] + int[1] = intptr=>[1] + fin + fpu:pushInt(@int[1]) + fpu:scalebXInt(16) + fpu:pushInt(@int[0]) + fpu:addXY() + if isneg + fpu:negX() + fin +end + +def push_num(numptr)#0 + var int + + if numptr->type == NUM_FLOAT + fpu:pushExt(numptr + floatval) + elsif numptr->type == NUM_INT + push_int32(numptr + intval) + else + puts("Pushing non number!\n") + int = 0 + fpu:pushInt(@int) + fin +end + +def natv_add(expr) + var num + var[2] intsum + var[5] extsum + + intsum[0] = 0 + intsum[1] = 0 + num = eval_num(expr) + expr = expr=>cdr + if num->type == NUM_INT + // + // Sum as integers unless a float is encountered + // + intsum[0] = num=>intval[0] + intsum[1] = num=>intval[1] + while expr + num = eval_num(expr) + expr = expr=>cdr + if num->type == NUM_FLOAT + break + fin + load32(@intsum) + add32(num + intval) + store32(@intsum) + loop + fin + if num->type == NUM_FLOAT + // + // Sum as floating point numbers + // + push_int32(@intsum) + push_num(num) + fpu:addXY() + while expr + num = eval_num(expr) + push_num(num) + fpu:addXY() + expr = expr=>cdr + loop + fpu:pullExt(@extsum) + return new_float(@extsum) + fin + return new_int(intsum[0], intsum[1]) +end + +def natv_sub(expr) + var num1, num2 + var[2] dif + var[5] ext + + num1 = eval_num(expr) + num2 = eval_num(expr=>cdr) + if num1->type == NUM_INT and num2->type == NUM_INT + load32(num1 + intval) + sub32(num2 + intval) + store32(@dif) + return new_int(dif[0], dif[1]) + fin + push_num(num1) + push_num(num2) + fpu:subXY() + fpu:pullExt(@ext) + return new_float(@ext) +end + +def natv_mul(expr) + var num1, num2 + var[2] mul + var[5] ext + + num1 = eval_num(expr) + num2 = eval_num(expr=>cdr) + if num1->type == NUM_INT and num2->type == NUM_INT + load32(num1 + intval) + mul32(num2 + intval) + store32(@mul) + return new_int(mul[0], mul[1]) + fin + push_num(num1) + push_num(num2) + fpu:mulXY() + fpu:pullExt(@ext) + return new_float(@ext) +end + +def natv_div(expr) + var num1, num2 + var[2] div + var[5] ext + + num1 = eval_num(expr) + num2 = eval_num(expr=>cdr) + if num1->type == NUM_INT and num2->type == NUM_INT + load32(num1 + intval) + div32(num2 + intval) + store32(@div) + return new_int(div[0], div[1]) + fin + push_num(num1) + push_num(num2) + fpu:divXY() + fpu:pullExt(@ext) + return new_float(@ext) +end + +def natv_rem(expr) + var num1, num2 + var[2] rem, div + var[5] ext + + num1 = eval_num(expr) + num2 = eval_num(expr=>cdr) + if num1->type == NUM_INT and num2->type == NUM_INT + load32(num1 + intval) + rem[1], rem[0] = div32(num2 + intval) + return new_int(rem[0], rem[1]) + fin + push_num(num1) + push_num(num2) + fpu:remXY() + fpu:pullExt(@ext) + return new_float(@ext) +end + +def natv_neg(expr) + var num + var[2] neg + var[5] ext + + num = eval_num(expr) + if num=>type == NUM_INT + load32(num + intval) + neg32 + store32(@neg) + return new_int(neg[0], neg[1]) + fin + push_num(num) + fpu:negX() + fpu:pullExt(@ext) + return new_float(@ext) +end + +def natv_gt(expr) + var num1, num2 + var[5] ext + + num1 = eval_num(expr) + num2 = eval_num(expr=>cdr) + if num1->type == NUM_INT and num2->type == NUM_INT + load32(num1 + intval) + return bool_pred(isgt32(num2 + intval)) + fin + push_num(num2) + push_num(num1) + fpu:subXY() + fpu:pullExt(@ext) + return bool_pred(ext[4] < 0) +end + +def natv_lt(expr) + var num1, num2 + var[5] ext + + num1 = eval_num(expr) + num2 = eval_num(expr=>cdr) + if num1->type == NUM_INT and num2->type == NUM_INT + load32(num1 + intval) + return bool_pred(islt32(num2 + intval)) + fin + push_num(num1) + push_num(num2) + fpu:subXY() + fpu:pullExt(@ext) + return bool_pred(ext[4] < 0) +end + +// +// Install math functions +// + +new_sym("+")=>natv = @natv_add +new_sym("-")=>natv = @natv_sub +new_sym("*")=>natv = @natv_mul +new_sym("/")=>natv = @natv_div +new_sym("REM")=>natv = @natv_rem +new_sym("NEG")=>natv = @natv_neg +new_sym(">")=>natv = @natv_gt +new_sym("<")=>natv = @natv_lt +fpu:reset() +return modkeep | modinitkeep +done diff --git a/src/makefile b/src/makefile index df0be35..07eabfb 100755 --- a/src/makefile +++ b/src/makefile @@ -98,6 +98,7 @@ HRFORTH = rel/HRFORTH\#FE1000 HR2FORTH = rel/HR2FORTH\#FE1000 TX2FORTH = rel/TX2FORTH\#FE1000 SEXPR = rel/SEXPR\#FE1000 +SMATH = rel/SMATH\#FE1000 DRAWL = rel/DRAWL\#FE1000 INCS = toolsrc/plasm.h toolsrc/tokens.h toolsrc/symbols.h toolsrc/lex.h toolsrc/parse.h toolsrc/codegen.h OBJS = toolsrc/plasm.c toolsrc/parse.c toolsrc/lex.c toolsrc/codegen.c @@ -117,7 +118,7 @@ TXTTYPE = .TXT #SYSTYPE = \#FF2000 #TXTTYPE = \#040000 -apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(PLFORTH) $(HRFORTH) $(HR2FORTH) $(TX2FORTH) $(SEXPR) $(DRAWL) $(ZIPCHIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRTILE) $(HGRFONT) $(HGRSPRITE) $(HGRLIB) $(TILETEST) $(HGRTEST) $(DHGRLIB) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) $(CONIOTEST) +apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(PLFORTH) $(HRFORTH) $(HR2FORTH) $(TX2FORTH) $(SEXPR) $(SMATH) $(DRAWL) $(ZIPCHIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRTILE) $(HGRFONT) $(HGRSPRITE) $(HGRLIB) $(TILETEST) $(HGRTEST) $(DHGRLIB) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) $(CONIOTEST) -rm vmsrc/plvmzp.inc @@ -177,6 +178,10 @@ $(SEXPR): lisp/s-expr.pla ./$(PLASM) -AMOW lisp/s-expr.pla acme --setpc 4094 -o $(SEXPR) lisp/s-expr.a +$(SMATH): lisp/s-math.pla + ./$(PLASM) -AMOW lisp/s-math.pla + acme --setpc 4094 -o $(SMATH) lisp/s-math.a + $(DRAWL): lisp/drawl.pla ./$(PLASM) -AMOW lisp/drawl.pla acme --setpc 4094 -o $(DRAWL) lisp/drawl.a diff --git a/src/mklisp b/src/mklisp index ce2edb1..41f038d 100755 --- a/src/mklisp +++ b/src/mklisp @@ -16,6 +16,8 @@ cat rel/INT32#FE1000 | ./ac.jar -p DRAWL.po sys/INT32 REL cat rel/ED#FE1000 | ./ac.jar -p DRAWL.po sys/ED REL cat rel/SEXPR#FE1000 | ./ac.jar -p DRAWL.po lisp/SEXPR REL cat lisp/s-expr.pla | ./ac.jar -ptx DRAWL.po lisp/SEXPR.PLA TXT +cat rel/SMATH#FE1000 | ./ac.jar -p DRAWL.po lisp/SMATH REL +cat lisp/s-math.pla | ./ac.jar -ptx DRAWL.po lisp/SMATH.PLA TXT cat rel/DRAWL#FE1000 | ./ac.jar -p DRAWL.po lisp/DRAWL REL cat lisp/drawl.pla | ./ac.jar -ptx DRAWL.po lisp/DRAWL.PLA TXT cat lisp/set.lisp | ./ac.jar -ptx DRAWL.po lisp/SET.LISP TXT diff --git a/src/mkrel b/src/mkrel index 8626861..8b6ae12 100755 --- a/src/mkrel +++ b/src/mkrel @@ -176,6 +176,8 @@ cp scripts/hdinstall2.4th prodos/bld/scripts/HDINSTALL2.4TH.TXT mkdir prodos/bld/lisp cp rel/SEXPR#FE1000 prodos/bld/lisp/SEXPR.REL cp lisp/s-expr.pla prodos/bld/lisp/SEXPR.PLA.TXT +cp rel/SMATH#FE1000 prodos/bld/lisp/SMATH.REL +cp lisp/s-math.pla prodos/bld/lisp/SMATH.PLA.TXT cp rel/DRAWL#FE1000 prodos/bld/lisp/DRAWL.REL cp lisp/drawl.pla prodos/bld/lisp/DRAWL.PLA.TXT cp lisp/set.lisp prodos/bld/lisp/SET.LISP.TXT