1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-01-09 13:33:26 +00:00

Update biuld environment for DRAWL

This commit is contained in:
David Schmenk 2024-06-05 09:02:01 -07:00
parent ec14660f87
commit 3ceba530a5
3 changed files with 71 additions and 41 deletions

View File

@ -97,6 +97,7 @@ PLFORTH = rel/PLFORTH\#FE1000
HRFORTH = rel/HRFORTH\#FE1000
HR2FORTH = rel/HR2FORTH\#FE1000
TX2FORTH = rel/TX2FORTH\#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
#
@ -115,7 +116,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) $(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) $(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
@ -171,6 +172,10 @@ $(PLFORTH): toolsrc/plforth.pla
./$(PLASM) -AMOW toolsrc/plforth.pla
acme --setpc 4094 -o $(PLFORTH) toolsrc/plforth.a
$(DRAWL): toolsrc/drawl.pla
./$(PLASM) -AMOW toolsrc/drawl.pla
acme --setpc 4094 -o $(DRAWL) toolsrc/drawl.a
#
# PLASMA VMs
#

View File

@ -59,6 +59,7 @@ cp rel/HRFORTH#FE1000 prodos/sys/HRFORTH.REL
cp rel/HR2FORTH#FE1000 prodos/sys/HR2FORTH.REL
cp rel/TX2FORTH#FE1000 prodos/sys/TX2FORTH.REL
cp rel/PLFORTH#FE1000 prodos/sys/PLFORTH.REL
cp rel/DRAWL#FE1000 prodos/sys/DRAWL.REL
mkdir prodos/sys/scripts
cp scripts/plasma.4th prodos/sys/scripts/PLASMA.4TH.TXT

View File

@ -1,67 +1,91 @@
include "inc/cmdsys.plh"
word readline
def is_num(c); return c >= '0' and c <= '9'; end
def is_alpha(c); c=toupper(c); return c >= 'A' and c <= 'Z'; end
def is_alphanum(c); return is_alpha(c) or is_num(c); end
def num_parse(instr)
while ^instr >= '0' and ^instr <= '9'
putc(^instr)
instr++
def num_parse(numptr)
while ^numptr >= '0' and ^numptr <= '9'
putc(^numptr)
numptr++
loop
return instr
return numptr
end
def sym_parse(instr)
while ^instr > ')' and toupper(^instr) <= 'Z'
putc(toupper(^instr))
instr++
def sym_parse(symptr)
while is_alphanum(^symptr)
putc(toupper(^symptr))
symptr++
loop
return instr
return symptr
end
def exp_parse(instr)
while ^instr
when ^instr
def expr_parse(evalptr, depth)
while TRUE
when ^evalptr
is 0
if depth > 0
// Refill input buffer
evalptr = gets('>'|$80)
^(evalptr + ^evalptr + 1) = 0
evalptr++
else
return evalptr
fin
break
is '!'
return 0
return FALSE
is ' '
instr++
evalptr++
break
is '('
putln
instr = exp_parse(instr + 1)
evalptr++
evalptr = expr_parse(evalptr, depth + 1)
break
is ')'
putln
return instr + 1
is '0'
is '1'
is '2'
is '3'
is '4'
is '5'
is '6'
is '7'
is '8'
is '9'
putc('.')
instr = num_parse(instr)
break
return evalptr
otherwise
if ^instr > ')' and toupper(^instr) <= 'Z'
if depth == 0
puts("Invalid S-Expression\n")
^evalptr = 0
return evalptr
fin
if is_alpha(^evalptr)
putc('.')
instr = sym_parse(instr)
evalptr = sym_parse(evalptr)
elsif is_num(^evalptr)
putc('.')
evalptr = num_parse(evalptr)
else
putc('\\')
putc(^instr)
instr++
putc(^evalptr)
evalptr++
fin
wend
loop
return instr
return evalptr
end
repeat
readline = gets('?'|$80)
^(readline + ^readline + 1) = 0
until not exp_parse(readline + 1)
def read
word readline
repeat
readline = gets('?'|$80)
^(readline + ^readline + 1) = 0
readline++
until ^readline
return expr_parse(readline, 0)
end
def eval(s_expr)
return s_expr
end
def print(s_expr)
return s_expr)
end
while print(eval(read)); loop
done