mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Update version # and add stubs to reserve HGR pages for PLFORTH
This commit is contained in:
parent
41ad4e9778
commit
0d552c5e51
Binary file not shown.
12
src/makefile
12
src/makefile
@ -93,6 +93,8 @@ PLASM = plasm
|
||||
PLASMAPLASM = rel/PLASM\#FE1000
|
||||
CODEOPT = rel/CODEOPT\#FE1000
|
||||
PLFORTH = rel/PLFORTH\#FE1000
|
||||
HRFORTH = rel/HRFORTH\#FE1000
|
||||
HR2FORTH = rel/HR2FORTH\#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
|
||||
#
|
||||
@ -111,7 +113,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) $(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) $(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) $(CONIOTST)
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(PLFORTH) $(HRFORTH) $(HR2FORTH) $(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) $(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) $(CONIOTST)
|
||||
|
||||
-rm vmsrc/plvmzp.inc
|
||||
|
||||
@ -151,6 +153,14 @@ $(CODEOPT): toolsrc/codeopt.pla toolsrc/codeseq.plh
|
||||
./$(PLASM) -AMOW toolsrc/codeopt.pla
|
||||
acme --setpc 4094 -o $(CODEOPT) toolsrc/codeopt.a
|
||||
|
||||
$(HRFORTH): toolsrc/hrforth.pla
|
||||
./$(PLASM) -AMOW toolsrc/hrforth.pla
|
||||
acme --setpc 4094 -o $(HRFORTH) toolsrc/hrforth.a
|
||||
|
||||
$(HR2FORTH): toolsrc/hr2forth.pla
|
||||
./$(PLASM) -AMOW toolsrc/hr2forth.pla
|
||||
acme --setpc 4094 -o $(HR2FORTH) toolsrc/hr2forth.a
|
||||
|
||||
$(PLFORTH): toolsrc/plforth.pla
|
||||
./$(PLASM) -AMOW toolsrc/plforth.pla
|
||||
acme --setpc 4094 -o $(PLFORTH) toolsrc/plforth.a
|
||||
|
@ -51,6 +51,8 @@ cp ../sysfiles/FP6502.CODE#060000 prodos/sys/FP6502.CODE.BIN
|
||||
cp ../sysfiles/ELEMS.CODE#060000 prodos/sys/ELEMS.CODE.BIN
|
||||
cp rel/apple/SOS#FE1000 prodos/sys/SOS.REL
|
||||
cp rel/apple/GRAFIX#FE1000 prodos/sys/GRAFIX.REL
|
||||
cp rel/HRFORTH#FE1000 prodos/sys/HRFORTH.REL
|
||||
cp rel/HR2FORTH#FE1000 prodos/sys/HR2FORTH.REL
|
||||
cp rel/PLFORTH#FE1000 prodos/sys/PLFORTH.REL
|
||||
|
||||
rm -rf prodos/syspro
|
||||
|
@ -63,7 +63,7 @@
|
||||
MOVEBALL
|
||||
?TERMINAL
|
||||
UNTIL
|
||||
KEY
|
||||
KEY DROP
|
||||
0 GRMODE DROP
|
||||
;
|
||||
|
||||
|
@ -1,10 +1,6 @@
|
||||
: RESERVEHGR2
|
||||
$6000 HERE - DUP
|
||||
0< ABORT" Can't reserve HGR2"
|
||||
ALLOT
|
||||
;
|
||||
|
||||
RESERVEHGR2
|
||||
LOOKUP HRFORTH
|
||||
LOOKUP HR2FORTH
|
||||
OR NOT ABORT" Must run with HRFORTH."
|
||||
|
||||
: ?PLASMA
|
||||
" IFACE" FIND
|
||||
@ -64,14 +60,14 @@ RESERVEHGR2
|
||||
;
|
||||
|
||||
: BOUNCE
|
||||
2 HGRMODE DROP
|
||||
1 HGRDRAWBUF DROP
|
||||
1 HGRSHOW DROP
|
||||
1 HGRMODE DROP
|
||||
0 HGRDRAWBUF DROP
|
||||
0 HGRSHOW DROP
|
||||
BEGIN
|
||||
MOVEBALL
|
||||
?TERMINAL
|
||||
UNTIL
|
||||
KEY
|
||||
KEY DROP
|
||||
0 HGRMODE DROP
|
||||
;
|
||||
|
||||
|
@ -7,6 +7,14 @@ LOOKUP STRCPY PLASMA STRCPY
|
||||
LOOKUP STRCAT PLASMA STRCAT
|
||||
LOOKUP HEAPAVAIL PLASMA FREEMEM
|
||||
|
||||
: .PLASMAVER
|
||||
PLASMA_VER 12 RSHIFT $0F AND 48 + EMIT
|
||||
PLASMA_VER 8 RSHIFT $0F AND 48 + EMIT
|
||||
46 EMIT
|
||||
PLASMA_VER 4 RSHIFT $0F AND 48 + EMIT
|
||||
PLASMA_VER $0F AND 48 + EMIT
|
||||
;
|
||||
|
||||
: LOADMOD ( modulename paramstr -- )
|
||||
CMDLINE " . " STRCPY DROP ( Dummy parameter for module name )
|
||||
CMDLINE SWAP STRCAT DROP
|
||||
|
@ -56,7 +56,7 @@
|
||||
LOOP ( next )
|
||||
?TERMINAL
|
||||
UNTIL
|
||||
KEY
|
||||
KEY DROP
|
||||
TEXT
|
||||
;
|
||||
|
||||
|
@ -1631,7 +1631,7 @@ def cmdmode#0
|
||||
word cmdptr, line
|
||||
|
||||
clrscrn
|
||||
puts("PLASMA Editor, Version 2.0\n")
|
||||
puts("PLASMA Editor, Version 2.1\n")
|
||||
while not exit
|
||||
puts(@filename)
|
||||
cmdptr = gets($BA)
|
||||
|
5
src/toolsrc/hr2forth.pla
Normal file
5
src/toolsrc/hr2forth.pla
Normal file
@ -0,0 +1,5 @@
|
||||
include "inc/cmdsys.plh"
|
||||
sysflags reshgr1 | reshgr2 // Reserve HGR page 1 and 2
|
||||
|
||||
return cmdsys:modexec("PLFORTH")
|
||||
done
|
5
src/toolsrc/hrforth.pla
Normal file
5
src/toolsrc/hrforth.pla
Normal file
@ -0,0 +1,5 @@
|
||||
include "inc/cmdsys.plh"
|
||||
sysflags reshgr1 // Reserve HGR page 1
|
||||
|
||||
return cmdsys:modexec("PLFORTH")
|
||||
done
|
@ -508,7 +508,7 @@ include "toolsrc/parse.pla"
|
||||
//
|
||||
// Look at command line arguments and compile module
|
||||
//
|
||||
puts("PLASMA Compiler, Version 2.0\n")
|
||||
puts("PLASMA Compiler, Version 2.1\n")
|
||||
arg = argNext(argFirst)
|
||||
if ^arg and ^(arg + 1) == '-'
|
||||
opt = arg + 2
|
||||
|
@ -95,7 +95,7 @@ const hidden_flag = $80
|
||||
predef _drop_(a)#0, _swap_(a,b)#2, _dup_(a)#2, _dashdup_(a)#1, _over_(a,b,c)#4, _rot_(a,b,c)#3
|
||||
predef _add_(a,b)#1, _inc_(a)#1, _inc2_(a)#1, _dec_(a)#1, _dec2_(a)#1
|
||||
predef _sub_(a,b)#1, _mul_(a,b)#1, _div_(a,b)#1
|
||||
predef _neg_(a)#1, _and_(a,b)#1, _or_(a,b)#1, _xor_(a,b)#1, _not_(a)#1
|
||||
predef _neg_(a)#1, _and_(a,b)#1, _or_(a,b)#1, _xor_(a,b)#1, _compliment_(a)#1, _not_(a)#1
|
||||
predef _mod_(a,b)#1, _abs_(a)#1, _max_(a,b)#1, _min_(a,b)#1
|
||||
predef _lshift_(a,b)#1, _rshift_(a,b)#1
|
||||
predef _cset_(a,b)#0, _cget_(a)#1, _wset_(a,b)#0, _wplusset_(a,b)#0, _wget_(a)#1
|
||||
@ -200,10 +200,14 @@ word = @d_and, 0, @_or_, $96
|
||||
char d_xor = "XOR"
|
||||
byte = inline_flag
|
||||
word = @d_or, 0, @_xor_, $98
|
||||
// COMPLIMENT
|
||||
char d_compliment = "COMPLIMENT"
|
||||
byte = inline_flag
|
||||
word = @d_xor, 0, @_compliment_, $92
|
||||
// NOT
|
||||
char d_not = "NOT"
|
||||
byte = inline_flag
|
||||
word = @d_xor, 0, @_not_, $92
|
||||
word = @d_compliment, 0, @_not_, $80
|
||||
// LEFT SHIFT
|
||||
char d_lshift = "LSHIFT"
|
||||
byte = inline_flag
|
||||
@ -1118,9 +1122,12 @@ end
|
||||
def _xor_(a,b)#1
|
||||
return a ^ b
|
||||
end
|
||||
def _not_(a)#1
|
||||
def _compliment_(a)#1
|
||||
return ~a
|
||||
end
|
||||
def _not_(a)#1
|
||||
return not a
|
||||
end
|
||||
def _eq_(a,b)#1
|
||||
return a == b
|
||||
end
|
||||
@ -1951,7 +1958,7 @@ def _bye_#0
|
||||
throw(@exit, TRUE)
|
||||
end
|
||||
|
||||
puts("FORTH for PLASMA 2.0 WIP\n")
|
||||
puts("FORTH for PLASMA 2.1 WIP\n")
|
||||
if cmdsys:sysver < $0201
|
||||
puts("PLASMA >= 2.01 required\n")
|
||||
return
|
||||
|
@ -40,7 +40,7 @@ predef sext(a)#1, divmod(a,b)#2, execmod(modfile)#1, syslookuptbl(a)#1
|
||||
//
|
||||
// Exported CMDSYS table
|
||||
//
|
||||
word version = $0201 // 02.01
|
||||
word version = $0210 // 02.10
|
||||
word syspath
|
||||
word syscmdln
|
||||
word = @execmod
|
||||
|
@ -38,7 +38,7 @@ predef lookuptbl(dci)#1
|
||||
//
|
||||
// Exported CMDSYS table
|
||||
//
|
||||
word version = $0201 // 02.01 Dev
|
||||
word version = $0210 // 02.01 Dev
|
||||
word syspath
|
||||
word syscmdln
|
||||
word = @execmod, @open, @close, @read, @write
|
||||
@ -1381,7 +1381,7 @@ heap = @lastdef
|
||||
//
|
||||
// Print PLASMA version
|
||||
//
|
||||
prstr("PLASMA 2.0 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
prstr("PLASMA 2.1 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
//
|
||||
// Init symbol table.
|
||||
//
|
||||
|
@ -57,7 +57,7 @@ predef lookuptbl(dci)#1
|
||||
//
|
||||
// Exported CMDSYS table
|
||||
//
|
||||
word version = $0201 // 02.01 Dev
|
||||
word version = $0210 // 02.10
|
||||
word syspath
|
||||
word syscmdln
|
||||
word = @execmod, @open, @close, @read, 0 // Mark write() as NULL
|
||||
@ -1456,7 +1456,7 @@ heap = @lastdef
|
||||
//
|
||||
// Print PLASMA version
|
||||
//
|
||||
prstr("PLASMA 2.0 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
prstr("PLASMA 2.1 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
//
|
||||
// Init symbol table.
|
||||
//
|
||||
|
@ -45,7 +45,7 @@ predef syslookuptbl(dci)#1
|
||||
//
|
||||
// Exported CMDSYS table
|
||||
//
|
||||
word version = $0201 // 02.01 Dev
|
||||
word version = $0210 // 02.10
|
||||
word syspath
|
||||
word cmdlnptr
|
||||
word = @execmod, @open, @close, @read, @write
|
||||
@ -1268,7 +1268,7 @@ cmdlnptr = @cmdln
|
||||
// Print PLASMA version
|
||||
//
|
||||
init_cons
|
||||
prstr("PLASMA 2.0\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("PLASMA 2.1\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("MEM:$"); prword(availheap); crout
|
||||
//
|
||||
// Exec command line parser
|
||||
|
@ -56,7 +56,7 @@ predef syslookuptbl(dci)#1
|
||||
//
|
||||
// Exported CMDSYS table
|
||||
//
|
||||
word version = $0201 // 02.01 Dev
|
||||
word version = $0210 // 02.10
|
||||
word syspath
|
||||
word cmdlnptr
|
||||
word = @execmod, @open, @close, @read, @write
|
||||
@ -1291,7 +1291,7 @@ cmdlnptr = @cmdln
|
||||
// Print PLASMA version
|
||||
//
|
||||
init_cons
|
||||
prstr("PLASMA 2.0 JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("PLASMA 2.1 JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("MEM:$"); prword(availheap); crout
|
||||
//
|
||||
// Exec command line parser
|
||||
|
Loading…
x
Reference in New Issue
Block a user