1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-06-13 21:29:29 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
David Schmenk
9f45afe3d0 Maybe I have the compile words right 2024-01-10 13:52:21 -08:00
dschmenk
85710bbfdf Fix some SOS exemod memory problems and remove last hard-coded Apple
II-ism from PLFORTH
2024-01-10 12:11:32 -08:00
David Schmenk
ef9fc81ece Break out the scripts to build individual release floppy images 2024-01-10 09:01:08 -08:00
David Schmenk
2eacd75b69 SHOW pretty print improvements 2024-01-10 08:24:50 -08:00
14 changed files with 280 additions and 220 deletions

Binary file not shown.

View File

@ -23,14 +23,14 @@ const sysbuf = $0800
// //
// External interface // External interface
// //
predef a2getpfx(path), a23setpfx(path), a2getfileinfo(path, fileinfo), a2setfileinfo(path, fileinfo), a23geteof(refnum)#2, a23seteof(refnum, eofl, eofh), a2iobufs(iobufs), a2open(path), a2close(refnum) predef a2getpfx(path), a2setpfx(path), a2getfileinfo(path, fileinfo), a2setfileinfo(path, fileinfo), a23geteof(refnum)#2, a23seteof(refnum, eofl, eofh), a2iobufs(iobufs), a2open(path), a2close(refnum)
predef a23read(refnum, buf, len), a2write(refnum, buf, len), a2create(path, type, aux), a23destroy(path), a23rename(path, newpath) predef a23read(refnum, buf, len), a2write(refnum, buf, len), a2create(path, type, aux), a23destroy(path), a23rename(path, newpath)
predef a2newline(refnum, emask, nlchar), a2online(unit, buf), a2readblock(unit, buf, block), a2writeblock(unit, buf, block) predef a2newline(refnum, emask, nlchar), a2online(unit, buf), a2readblock(unit, buf, block), a2writeblock(unit, buf, block)
// //
// Exported function table. // Exported function table.
// //
word fileio[] word fileio[]
word = @a2getpfx, @a23setpfx, @a2getfileinfo, @a2setfileinfo, @a23geteof, @a23seteof, @a2iobufs, @a2open, @a2close word = @a2getpfx, @a2setpfx, @a2getfileinfo, @a2setfileinfo, @a23geteof, @a23seteof, @a2iobufs, @a2open, @a2close
word = @a23read, @a2write, @a2create, @a23destroy, @a23rename word = @a23read, @a2write, @a2create, @a23destroy, @a23rename
word = @a2newline, @a2online, @a2readblock, @a2writeblock word = @a2newline, @a2online, @a2readblock, @a2writeblock
// //
@ -60,7 +60,7 @@ def a2getpfx(path)
return path return path
end end
def a3getpfx(path) def a3getpfx(path)
byte params[3] byte params[4]
params.0 = 2 params.0 = 2
params:1 = path params:1 = path
@ -71,7 +71,7 @@ end
def a1setpfx(path) def a1setpfx(path)
return path return path
end end
def a23setpfx(path) def a2setpfx(path)
byte params[3] byte params[3]
params.0 = 1 params.0 = 1
@ -79,6 +79,29 @@ def a23setpfx(path)
perr = syscall($C6, @params) perr = syscall($C6, @params)
return path return path
end end
def a3setpfx(path)
byte params[6]
byte fileinfo[2]
char fullpath[65]
if ^path and ^(path + 1) <> '/' and ^(path + 1) <> '.'
a3getpfx(@fullpath)
strcat(@fullpath, path)
path = @fullpath
fin
params.0 = 3
params:1 = path
params:3 = @fileinfo
params.5 = 2
if not syscall($C4, @params) and (fileinfo.1 == $00 or fileinfo.1 == $0F) // Make sure it's a directory
params.0 = 1
params:1 = path
syscall($C6, @params)
else
a3getpfx(path) // Get current path
fin
return path
end
def a1getfileinfo(path, fileinfo) def a1getfileinfo(path, fileinfo)
perr = $01 perr = $01
return perr return perr
@ -445,6 +468,7 @@ end
when MACHID & MACHID_MODEL when MACHID & MACHID_MODEL
is MACHID_III is MACHID_III
fileio:getpfx = @a3getpfx fileio:getpfx = @a3getpfx
fileio:setpfx = @a3setpfx
fileio:getfileinfo = @a3getfileinfo fileio:getfileinfo = @a3getfileinfo
fileio:setfileinfo = @a3setfileinfo fileio:setfileinfo = @a3setfileinfo
fileio:iobufalloc = @a13iobufs fileio:iobufalloc = @a13iobufs

180
src/mk143
View File

@ -1,174 +1,6 @@
cp ../sysfiles/BLANK143.po PLASMA2-SYS.po ./mksys
./ac.jar -n PLASMA2-SYS.po PLASMA.SYS ./mk4th
#cat ../sysfiles/PRODOS#FF0000 | ./ac.jar -p PLASMA2-SYS.po PRODOS SYS ./mkfpsos
cat rel/apple/CMD#061000 | ./ac.jar -p PLASMA2-SYS.po CMD BIN $1000 ./mkbld
cat rel/apple/CMD128#061000 | ./ac.jar -p PLASMA2-SYS.po CMD128 BIN $1000 ./mkinet
cat rel/apple/PLASMA.SYSTEM#FF2000 | ./ac.jar -p PLASMA2-SYS.po PLASMA.SYSTEM SYS ./mkdemos
cat rel/apple/PLVM.128#FF2000 | ./ac.jar -p PLASMA2-SYS.po PLVM.128 SYS
cat rel/apple/PLVM16#FF2000 | ./ac.jar -p PLASMA2-SYS.po PLVM16 SYS
cat ../doc/Editor.md | ./ac.jar -ptx PLASMA2-SYS.po EDITOR.README TXT
cat rel/apple/FILEIO#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/FILEIO REL
cat rel/apple/CONIO#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/CONIO REL
cat rel/LINES#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/LINES REL
cat rel/apple/HGRFONT#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRFONT REL
cat rel/apple/HGRTILE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRTILE REL
cat rel/apple/HGRSPRITE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRSPRITE REL
cat rel/apple/HGRLIB#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRLIB REL
cat rel/apple/GRLIB#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/GRLIB REL
cat rel/apple/DGRLIB#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/DGRLIB REL
cat rel/apple/COPY#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/COPY REL
cat rel/apple/DEL#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/DEL REL
cat rel/apple/REN#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/REN REL
cat rel/apple/CAT#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/CAT REL
cat rel/apple/NEWDIR#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/NEWDIR REL
cat rel/apple/TYPE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/TYPE REL
cat rel/apple/MATCHFILES#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/MATCHFILES REL
cat rel/ARGS#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/ARGS REL
cat rel/ED#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/ED REL
cat rel/FIBER#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/FIBER REL
cat rel/LONGJMP#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/LONGJMP REL
cat rel/MEMMGR#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/MEMMGR REL
cat rel/apple/MOUSE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/MOUSE REL
cat rel/apple/PORTIO#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/PORTIO REL
cat rel/apple/JOYBUZZ#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JOYBUZZ REL
cat rel/apple/SNDSEQ#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/SNDSEQ REL
cat rel/apple/JIT#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JIT REL
cat rel/apple/JIT16#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JIT16 REL
cat rel/apple/JITUNE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JITUNE REL
cat rel/apple/ZIPCHIP#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/ZIPCHIP REL
cat rel/LZ4#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/LZ4 REL
cat rel/INT32#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/INT32 REL
cp ../sysfiles/BLANK143.po PLASMA2-4TH.po
./ac.jar -n PLASMA2-4TH.po PLASMA.4TH
cat rel/HRFORTH#FE1000 | ./ac.jar -p PLASMA2-4TH.po sys/HRFORTH REL
cat rel/HR2FORTH#FE1000 | ./ac.jar -p PLASMA2-4TH.po sys/HR2FORTH REL
cat rel/PLFORTH#FE1000 | ./ac.jar -p PLASMA2-4TH.po sys/PLFORTH REL
cat scripts/plasma.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/PLASMA.4TH TXT
cat scripts/conio.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/CONIO.4TH TXT
cat scripts/fileio.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/FILEIO.4TH TXT
cat scripts/grlib.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/GRLIB.4TH TXT
cat scripts/hgrlib.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/HGRLIB.4TH TXT
cat scripts/int32.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/INT32.4TH TXT
cat scripts/fpu.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/FPU.4TH TXT
cat scripts/rod.4th | ./ac.jar -ptx PLASMA2-4TH.po bld/scripts/ROD.4TH TXT
cat scripts/bounce.4th | ./ac.jar -ptx PLASMA2-4TH.po bld/scripts/BOUNCE.4TH TXT
cat scripts/hrbounce.4th | ./ac.jar -ptx PLASMA2-4TH.po bld/scripts/HRBOUNCE.4TH TXT
#mkdir sysinet
#mkdir sysinet/sys
#cat rel/INET#FE1000 | ./ac.jar -p PLASMA2-2.1.po sysinet/sys/INET REL
#cat rel/DHCP#FE1000 | ./ac.jar -p PLASMA2-2.1.po sysinet/sys/DHCP REL
#cat rel/ETHERIP#FE1000 | ./ac.jar -p PLASMA2-2.1.po sysinet/sys/ETHERIP REL
#cat rel/apple/UTHERNET2#FE1000 | ./ac.jar -p PLASMA2-2.1.po sysinet/sys/UTHERNET2 REL
#cat rel/apple/UTHERNET#FE1000 | ./ac.jar -p PLASMA2-2.1.po sysinet/sys/UTHERNET REL
#cat rel/TFTPD#FE1000 | ./ac.jar -p PLASMA2-2.1.po sysinet/sys/TFTPD REL
cp ../sysfiles/BLANK143.po PLASMA2-FPSOS.po
./ac.jar -n PLASMA2-FPSOS.po PLASMA.FPSOS
cat ../sysfiles/SOS.KERNEL#0C0000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.KERNEL \$0C
cat ../sysfiles/SOS.DRIVER#0C0000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.DRIVER \$0C
cat rel/apple/SOS.INTERP#050000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.INTERP \$05
cat rel/apple/SOS.CMD#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.CMD REL
cat rel/apple/SOS.INTERPJIT#050000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.INTERPJIT \$05
cat rel/apple/SOS.CMDJIT#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.CMDJIT REL
cat rel/apple/SOS#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/SOS REL
cat rel/apple/GRAFIX#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/GRAFIX REL
cat rel/FPSTR#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/FPSTR REL
cat rel/FPU#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/FPU REL
cat rel/SANE#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/SANE REL
cat ../sysfiles/FP6502.CODE#060000 | ./ac.jar -p PLASMA2-FPSOS.po sys/FP6502.CODE BIN
cat ../sysfiles/ELEMS.CODE#060000 | ./ac.jar -p PLASMA2-FPSOS.po sys/ELEMS.CODE BIN
#rm -rf demos
#cat rel/INT32TEST#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/INT32TEST REL
#cat rel/apple/CONIOTST#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/CONIOTST REL
#cat rel/apple/ROD#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/ROD REL
#cat rel/RPNCALC#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/RPNCALC REL
#cat rel/LZ4CAT#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/LZ4CAT REL
#cat ../doc/ROGUE.LZ4.BIN | ./ac.jar -p PLASMA2-2.1.po demos/ROGUE.LZ4 BIN
#cat rel/PRIMEGAP#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/PRIMEGAP REL
#cat rel/ROGUE#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/rogue/ROGUE REL
#cat rel/ROGUECOMBAT#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/rogue/ROGUECOMBAT REL
#cat rel/ROGUEMAP#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/rogue/ROGUEMAP REL
#cat samplesrc/LEVEL0#040000 | ./ac.jar -ptx PLASMA2-2.1.po demos/rogue/LEVEL0 TXT
#cat samplesrc/LEVEL1#040000 | ./ac.jar -ptx PLASMA2-2.1.po demos/rogue/LEVEL1 TXT
#cat rel/apple/PLAYSEQ#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/music/PLAYSEQ REL
#cat mockingboard/ultima3.seq | ./ac.jar -p PLASMA2-2.1.po demos/music/ULTIMA3.SEQ BIN
#cat mockingboard/startrek.seq | ./ac.jar -p PLASMA2-2.1.po demos/music/STARTREK.SEQ BIN
#cat rel/HTTPD#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/net/HTTPD REL
#cat samplesrc/index.html | ./ac.jar -ptx PLASMA2-2.1.po demos/net/INDEX.HTML TXT
#cat rel/apple/TILETEST#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/TILETEST REL
#cat rel/apple/HGRTEST#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/HGRTEST REL
#cat rel/apple/GRTEST#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/GRTEST REL
#cat rel/apple/DGRTEST#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/DGRTEST REL
#cat rel/apple/SFM#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/spiders/SFM REL
#cat rel/apple/SFMSPRT#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/spiders/SFMSPRT REL
#cat rel/apple/SPIPORT#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/sdutils/SPIPORT REL
#cat rel/apple/SDFAT#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/sdutils/SDFAT REL
#cat rel/apple/FATCAT#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/sdutils/FATCAT REL
#cat rel/apple/FATGET#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/sdutils/FATGET REL
#cat rel/apple/FATPUT#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/sdutils/FATPUT REL
#cat rel/apple/FATREADDSK#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/sdutils/FATREADDSK REL
#cat rel/apple/FATWRITEDSK#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple2/sdutils/FATWRITEDSK REL
#cat rel/apple/GFXDEMO#FE1000 | ./ac.jar -p PLASMA2-2.1.po demos/apple3/GFXDEMO REL
#cat samplesrc/APPLE3.PIX#060000 | ./ac.jar -p PLASMA2-2.1.po demos/apple3/APPLE3.PIX BIN
cp ../sysfiles/BLANK143.po PLASMA2-BLD.po
./ac.jar -n PLASMA2-BLD.po PLASMA.BLD
cat rel/PLASM#FE1000 | ./ac.jar -p PLASMA2-BLD.po bld/PLASM REL
cat rel/CODEOPT#FE1000 | ./ac.jar -p PLASMA2-BLD.po bld/CODEOPT REL
cat samplesrc/hello.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/HELLO.PLA TXT
cat samplesrc/int32test.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/INT32TEST.PLA TXT
cat samplesrc/coniotst.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/CONIOTST.PLA TXT
cat samplesrc/grtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/GRTEST.PLA TXT
cat samplesrc/dgrtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/DGRTEST.PLA TXT
cat samplesrc/hgrtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/HGRTEST.PLA TXT
cat samplesrc/tiletest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/TILETEST.PLA TXT
cat samplesrc/fibertest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/FIBERTEST.PLA TXT
cat samplesrc/mousetest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/MOUSETEST.PLA TXT
cat samplesrc/memtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/MEMTEST.PLA TXT
cat samplesrc/rod.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/ROD.PLA TXT
#cat samplesrc/sieve.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/SIEVE.PLA TXT
#cat samplesrc/test.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/TEST.PLA TXT
#cat samplesrc/testlib.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/TESTLIB.PLA TXT
cat samplesrc/playseq.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/PLAYSEQ.PLA TXT
cat samplesrc/rpncalc.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/RPNCALC.PLA TXT
cat samplesrc/fatcat.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/FATCAT.PLA TXT
cat samplesrc/gfxdemo.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/GFXDEMO.PLA TXT
cat samplesrc/lz4cat.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/LZ4CAT.PLA TXT
cat samplesrc/sfm.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/SFM.PLA TXT
cat samplesrc/sfmsprt.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/SFMSPRT.PLA TXT
cat samplesrc/fppow.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/FPPOW.PLA TXT
cat utilsrc/apple/mon.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/MON.PLA TXT
cat utilsrc/apple/zipchip.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/ZIPCHIP.PLA TXT
cat inc/args.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/ARGS.PLH TXT
cat inc/matchfiles.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/MATCHFILES.PLH TXT
cat inc/cmdsys.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/CMDSYS.PLH TXT
cat inc/conio.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/CONIO.PLH TXT
cat inc/lines.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/LINES.PLH TXT
cat inc/hgrfont.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRFONT.PLH TXT
cat inc/hgrtile.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRTILE.PLH TXT
cat inc/hgrsprite.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRSPRITE.PLH TXT
cat inc/hgrlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRLIB.PLH TXT
cat inc/grlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/GRLIB.PLH TXT
cat inc/dgrlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/DGRLIB.PLH TXT
cat inc/fiber.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FIBER.PLH TXT
cat inc/fileio.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FILEIO.PLH TXT
cat inc/int32.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/INT32.PLH TXT
cat inc/fpstr.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FPSTR.PLH TXT
cat inc/fpu.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FPU.PLH TXT
cat inc/mouse.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/MOUSE.PLH TXT
cat inc/inet.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/INET.PLH TXT
cat inc/longjmp.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/LONGJMP.PLH TXT
cat inc/memmgr.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/MEMMGR.PLH TXT
cat inc/sane.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SANE.PLH TXT
cat inc/joybuzz.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/JOYBUZZ.PLH TXT
cat inc/portio.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/PORTIO.PLH TXT
cat inc/sdfat.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SDFAT.PLH TXT
cat inc/sndseq.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SNDSEQ.PLH TXT
cat inc/spiport.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SPIPORT.PLH TXT
cat inc/testlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/TESTLIB.PLH TXT
cat inc/grafix.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/GRAFIX.PLH TXT
cat inc/lz4.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/LZ4.PLH TXT
cat vmsrc/apple/plvmzp.inc | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/PLVMZP.INC TXT

15
src/mk4th Executable file
View File

@ -0,0 +1,15 @@
cp ../sysfiles/BLANK143.po PLASMA2-4TH.po
./ac.jar -n PLASMA2-4TH.po PLASMA.4TH
cat rel/HRFORTH#FE1000 | ./ac.jar -p PLASMA2-4TH.po sys/HRFORTH REL
cat rel/HR2FORTH#FE1000 | ./ac.jar -p PLASMA2-4TH.po sys/HR2FORTH REL
cat rel/PLFORTH#FE1000 | ./ac.jar -p PLASMA2-4TH.po sys/PLFORTH REL
cat scripts/plasma.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/PLASMA.4TH TXT
cat scripts/conio.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/CONIO.4TH TXT
cat scripts/fileio.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/FILEIO.4TH TXT
cat scripts/grlib.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/GRLIB.4TH TXT
cat scripts/hgrlib.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/HGRLIB.4TH TXT
cat scripts/int32.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/INT32.4TH TXT
cat scripts/fpu.4th | ./ac.jar -ptx PLASMA2-4TH.po sys/scripts/FPU.4TH TXT
cat scripts/rod.4th | ./ac.jar -ptx PLASMA2-4TH.po bld/scripts/ROD.4TH TXT
cat scripts/bounce.4th | ./ac.jar -ptx PLASMA2-4TH.po bld/scripts/BOUNCE.4TH TXT
cat scripts/hrbounce.4th | ./ac.jar -ptx PLASMA2-4TH.po bld/scripts/HRBOUNCE.4TH TXT

58
src/mkbld Executable file
View File

@ -0,0 +1,58 @@
cp ../sysfiles/BLANK143.po PLASMA2-BLD.po
./ac.jar -n PLASMA2-BLD.po PLASMA.BLD
cat rel/PLASM#FE1000 | ./ac.jar -p PLASMA2-BLD.po bld/PLASM REL
cat rel/CODEOPT#FE1000 | ./ac.jar -p PLASMA2-BLD.po bld/CODEOPT REL
cat samplesrc/hello.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/HELLO.PLA TXT
cat samplesrc/int32test.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/INT32TEST.PLA TXT
cat samplesrc/coniotst.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/CONIOTST.PLA TXT
cat samplesrc/grtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/GRTEST.PLA TXT
cat samplesrc/dgrtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/DGRTEST.PLA TXT
cat samplesrc/hgrtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/HGRTEST.PLA TXT
cat samplesrc/tiletest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/TILETEST.PLA TXT
cat samplesrc/fibertest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/FIBERTEST.PLA TXT
cat samplesrc/mousetest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/MOUSETEST.PLA TXT
cat samplesrc/memtest.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/MEMTEST.PLA TXT
cat samplesrc/rod.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/ROD.PLA TXT
#cat samplesrc/sieve.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/SIEVE.PLA TXT
#cat samplesrc/test.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/TEST.PLA TXT
#cat samplesrc/testlib.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/TESTLIB.PLA TXT
cat samplesrc/playseq.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/PLAYSEQ.PLA TXT
cat samplesrc/rpncalc.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/RPNCALC.PLA TXT
cat samplesrc/fatcat.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/FATCAT.PLA TXT
cat samplesrc/gfxdemo.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/GFXDEMO.PLA TXT
cat samplesrc/lz4cat.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/LZ4CAT.PLA TXT
cat samplesrc/sfm.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/SFM.PLA TXT
cat samplesrc/sfmsprt.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/SFMSPRT.PLA TXT
cat samplesrc/fppow.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/FPPOW.PLA TXT
cat utilsrc/apple/mon.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/MON.PLA TXT
cat utilsrc/apple/zipchip.pla | ./ac.jar -ptx PLASMA2-BLD.po bld/samples/ZIPCHIP.PLA TXT
cat inc/args.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/ARGS.PLH TXT
cat inc/matchfiles.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/MATCHFILES.PLH TXT
cat inc/cmdsys.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/CMDSYS.PLH TXT
cat inc/conio.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/CONIO.PLH TXT
cat inc/lines.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/LINES.PLH TXT
cat inc/hgrfont.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRFONT.PLH TXT
cat inc/hgrtile.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRTILE.PLH TXT
cat inc/hgrsprite.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRSPRITE.PLH TXT
cat inc/hgrlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/HGRLIB.PLH TXT
cat inc/grlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/GRLIB.PLH TXT
cat inc/dgrlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/DGRLIB.PLH TXT
cat inc/fiber.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FIBER.PLH TXT
cat inc/fileio.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FILEIO.PLH TXT
cat inc/int32.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/INT32.PLH TXT
cat inc/fpstr.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FPSTR.PLH TXT
cat inc/fpu.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/FPU.PLH TXT
cat inc/mouse.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/MOUSE.PLH TXT
cat inc/inet.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/INET.PLH TXT
cat inc/longjmp.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/LONGJMP.PLH TXT
cat inc/memmgr.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/MEMMGR.PLH TXT
cat inc/sane.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SANE.PLH TXT
cat inc/joybuzz.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/JOYBUZZ.PLH TXT
cat inc/portio.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/PORTIO.PLH TXT
cat inc/sdfat.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SDFAT.PLH TXT
cat inc/sndseq.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SNDSEQ.PLH TXT
cat inc/spiport.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/SPIPORT.PLH TXT
cat inc/testlib.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/TESTLIB.PLH TXT
cat inc/grafix.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/GRAFIX.PLH TXT
cat inc/lz4.plh | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/LZ4.PLH TXT
cat vmsrc/apple/plvmzp.inc | ./ac.jar -ptx PLASMA2-BLD.po bld/inc/PLVMZP.INC TXT

34
src/mkdemos Executable file
View File

@ -0,0 +1,34 @@
cp ../sysfiles/BLANK143.po PLASMA2-DEMOS.po
./ac.jar -n PLASMA2-INET.po PLASMA.DEMOS
cat rel/INT32TEST#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/INT32TEST REL
cat rel/apple/CONIOTST#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/CONIOTST REL
cat rel/apple/ROD#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/ROD REL
cat rel/RPNCALC#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/RPNCALC REL
cat rel/LZ4CAT#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/LZ4CAT REL
cat ../doc/ROGUE.LZ4.BIN | ./ac.jar -p PLASMA2-DEMOS.po demos/ROGUE.LZ4 BIN
cat rel/PRIMEGAP#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/PRIMEGAP REL
cat rel/ROGUE#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/rogue/ROGUE REL
cat rel/ROGUECOMBAT#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/rogue/ROGUECOMBAT REL
cat rel/ROGUEMAP#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/rogue/ROGUEMAP REL
cat samplesrc/LEVEL0#040000 | ./ac.jar -ptx PLASMA2-DEMOS.po demos/rogue/LEVEL0 TXT
cat samplesrc/LEVEL1#040000 | ./ac.jar -ptx PLASMA2-DEMOS.po demos/rogue/LEVEL1 TXT
cat rel/apple/PLAYSEQ#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/music/PLAYSEQ REL
cat mockingboard/ultima3.seq | ./ac.jar -p PLASMA2-DEMOS.po demos/music/ULTIMA3.SEQ BIN
cat mockingboard/startrek.seq | ./ac.jar -p PLASMA2-DEMOS.po demos/music/STARTREK.SEQ BIN
cat rel/HTTPD#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/net/HTTPD REL
cat samplesrc/index.html | ./ac.jar -ptx PLASMA2-DEMOS.po demos/net/INDEX.HTML TXT
cat rel/apple/TILETEST#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/TILETEST REL
cat rel/apple/HGRTEST#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/HGRTEST REL
cat rel/apple/GRTEST#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/GRTEST REL
cat rel/apple/DGRTEST#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/DGRTEST REL
cat rel/apple/SFM#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/spiders/SFM REL
cat rel/apple/SFMSPRT#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/spiders/SFMSPRT REL
cat rel/apple/SPIPORT#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/sdutils/SPIPORT REL
cat rel/apple/SDFAT#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/sdutils/SDFAT REL
cat rel/apple/FATCAT#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/sdutils/FATCAT REL
cat rel/apple/FATGET#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/sdutils/FATGET REL
cat rel/apple/FATPUT#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/sdutils/FATPUT REL
cat rel/apple/FATREADDSK#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/sdutils/FATREADDSK REL
cat rel/apple/FATWRITEDSK#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple2/sdutils/FATWRITEDSK REL
cat rel/apple/GFXDEMO#FE1000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple3/GFXDEMO REL
cat samplesrc/APPLE3.PIX#060000 | ./ac.jar -p PLASMA2-DEMOS.po demos/apple3/APPLE3.PIX BIN

15
src/mkfpsos Executable file
View File

@ -0,0 +1,15 @@
cp ../sysfiles/BLANK143.po PLASMA2-FPSOS.po
./ac.jar -n PLASMA2-FPSOS.po PLASMA.FPSOS
cat ../sysfiles/SOS.KERNEL#0C0000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.KERNEL \$0C
cat ../sysfiles/SOS.DRIVER#0C0000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.DRIVER \$0C
cat rel/apple/SOS.INTERP#050000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.INTERP \$05
cat rel/apple/SOS.CMD#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.CMD REL
cat rel/apple/SOS.INTERPJIT#050000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.INTERPJIT \$05
cat rel/apple/SOS.CMDJIT#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po SOS.CMDJIT REL
cat rel/apple/SOS#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/SOS REL
cat rel/apple/GRAFIX#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/GRAFIX REL
cat rel/FPSTR#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/FPSTR REL
cat rel/FPU#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/FPU REL
cat rel/SANE#FE1000 | ./ac.jar -p PLASMA2-FPSOS.po sys/SANE REL
cat ../sysfiles/FP6502.CODE#060000 | ./ac.jar -p PLASMA2-FPSOS.po sys/FP6502.CODE BIN
cat ../sysfiles/ELEMS.CODE#060000 | ./ac.jar -p PLASMA2-FPSOS.po sys/ELEMS.CODE BIN

8
src/mkinet Executable file
View File

@ -0,0 +1,8 @@
cp ../sysfiles/BLANK143.po PLASMA2-INET.po
./ac.jar -n PLASMA2-INET.po PLASMA.INET
cat rel/INET#FE1000 | ./ac.jar -p PLASMA2-INET.po sys/INET REL
cat rel/DHCP#FE1000 | ./ac.jar -p PLASMA2-INET.po sys/DHCP REL
cat rel/ETHERIP#FE1000 | ./ac.jar -p PLASMA2-INET.po sys/ETHERIP REL
cat rel/apple/UTHERNET2#FE1000 | ./ac.jar -p PLASMA2-INET.po sys/UTHERNET2 REL
cat rel/apple/UTHERNET#FE1000 | ./ac.jar -p PLASMA2-INET.po sys/UTHERNET REL
cat rel/TFTPD#FE1000 | ./ac.jar -p PLASMA2-INET.po sys/TFTPD REL

40
src/mksys Executable file
View File

@ -0,0 +1,40 @@
cp ../sysfiles/BLANK143.po PLASMA2-SYS.po
./ac.jar -n PLASMA2-SYS.po PLASMA.SYS
#cat ../sysfiles/PRODOS#FF0000 | ./ac.jar -p PLASMA2-SYS.po PRODOS SYS
cat rel/apple/CMD#061000 | ./ac.jar -p PLASMA2-SYS.po CMD BIN $1000
cat rel/apple/CMD128#061000 | ./ac.jar -p PLASMA2-SYS.po CMD128 BIN $1000
cat rel/apple/PLASMA.SYSTEM#FF2000 | ./ac.jar -p PLASMA2-SYS.po PLASMA.SYSTEM SYS
cat rel/apple/PLVM.128#FF2000 | ./ac.jar -p PLASMA2-SYS.po PLVM.128 SYS
cat rel/apple/PLVM16#FF2000 | ./ac.jar -p PLASMA2-SYS.po PLVM16 SYS
cat ../doc/Editor.md | ./ac.jar -ptx PLASMA2-SYS.po EDITOR.README TXT
cat rel/apple/FILEIO#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/FILEIO REL
cat rel/apple/CONIO#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/CONIO REL
cat rel/LINES#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/LINES REL
cat rel/apple/HGRFONT#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRFONT REL
cat rel/apple/HGRTILE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRTILE REL
cat rel/apple/HGRSPRITE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRSPRITE REL
cat rel/apple/HGRLIB#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/HGRLIB REL
cat rel/apple/GRLIB#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/GRLIB REL
cat rel/apple/DGRLIB#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/DGRLIB REL
cat rel/apple/COPY#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/COPY REL
cat rel/apple/DEL#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/DEL REL
cat rel/apple/REN#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/REN REL
cat rel/apple/CAT#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/CAT REL
cat rel/apple/NEWDIR#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/NEWDIR REL
cat rel/apple/TYPE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/TYPE REL
cat rel/apple/MATCHFILES#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/MATCHFILES REL
cat rel/ARGS#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/ARGS REL
cat rel/ED#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/ED REL
cat rel/FIBER#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/FIBER REL
cat rel/LONGJMP#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/LONGJMP REL
cat rel/MEMMGR#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/MEMMGR REL
cat rel/apple/MOUSE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/MOUSE REL
cat rel/apple/PORTIO#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/PORTIO REL
cat rel/apple/JOYBUZZ#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JOYBUZZ REL
cat rel/apple/SNDSEQ#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/SNDSEQ REL
cat rel/apple/JIT#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JIT REL
cat rel/apple/JIT16#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JIT16 REL
cat rel/apple/JITUNE#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/JITUNE REL
cat rel/apple/ZIPCHIP#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/ZIPCHIP REL
cat rel/LZ4#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/LZ4 REL
cat rel/INT32#FE1000 | ./ac.jar -p PLASMA2-SYS.po sys/INT32 REL

View File

@ -6,22 +6,25 @@ include "inc/longjmp.plh"
// //
// Internal variables // Internal variables
// //
word vlist, infunc, inptr, IIP, W
word vmvect, startheap, arg
word keyinbuf = $1FF
const JSR = $20 // 6502 JSR opcode needed for VM entry const JSR = $20 // 6502 JSR opcode needed for VM entry
const SRCREFS = 2 const SRCREFS = 2
const INBUF_SIZE = 128 const INBUF_SIZE = 128
word vlist, infunc, inptr, IIP, W
word vmvect, startheap, arg
byte srclevel = 0 byte srclevel = 0
word inbufptr
byte inref[SRCREFS]
word previnptr[SRCREFS]
// //
// Internal buffers // Internal buffers
// //
res[SRCREFS * INBUF_SIZE] inbuf res[SRCREFS * INBUF_SIZE] inbuf
res[t_except] exitforth res[t_except] exitforth
// //
// Input references, pointers, and saved values
//
word keyinbuf = @inbuf // Point somewhere benign for starters (updated in keyin)
word inbufptr
byte inref[SRCREFS]
word previnptr[SRCREFS]
//
// RSTACK // RSTACK
// //
const RSTK_SIZE = 16 const RSTK_SIZE = 16
@ -101,8 +104,8 @@ predef _branch_#0, _0branch_(a)#0, _if_#0, _else_#0, _then_#0
predef _begin_#0, _again_#0, _until_#0, _while_#0, _repeat_#0 predef _begin_#0, _again_#0, _until_#0, _while_#0, _repeat_#0
predef _case_#0, _of_#0, _endof_#0, _endcase_#0 predef _case_#0, _of_#0, _endof_#0, _endcase_#0
predef _dodo_(a,b)#0, _do_#0, _doloop_#0, _doplusloop_(a)#0, _plusloop_#0, _loop_#0, _leave_#0, _j_#1 predef _dodo_(a,b)#0, _do_#0, _doloop_#0, _doplusloop_(a)#0, _plusloop_#0, _loop_#0, _leave_#0, _j_#1
predef _create_#0, _itcdoes_(a)#0, _does_#0, _compoff_#0, _compon_#0 predef _create_#0, _itcdoes_(a)#0, _does_#0, _compoff_#0, _compon_#0, _state_#1
predef _compile_#0, _dictaddw_(a)#0, _dictaddb_(a)#0, _colon_#0, _semi_#0 predef _compile_#0, _forcecomp_#0, _dictaddw_(a)#0, _dictaddb_(a)#0, _colon_#0, _semi_#0
predef _componly_#0, _interponly_#0, _immediate_#0, _exit_#0, _pad_#1, _trailing_(a,b)#2 predef _componly_#0, _interponly_#0, _immediate_#0, _exit_#0, _pad_#1, _trailing_(a,b)#2
predef _tors_(a)#0, _fromrs_#1, _toprs_#1, _lookup_#1 predef _tors_(a)#0, _fromrs_#1, _toprs_#1, _lookup_#1
predef _cmove_(a,b,c)#0, _move_(a,b,c)#0, _fill_(a,b,c)#0, _plasma_(a)#0 predef _cmove_(a,b,c)#0, _move_(a,b,c)#0, _fill_(a,b,c)#0, _plasma_(a)#0
@ -375,7 +378,7 @@ byte = imm_flag | componly_flag
word = @d_endcase, 0, @_do_ word = @d_endcase, 0, @_do_
// LEAVE // LEAVE
char d_leave = "LEAVE" char d_leave = "LEAVE"
byte = componly_flag byte = componly_flag | showcr_flag
word = @d_do, 0, @_leave_ word = @d_do, 0, @_leave_
// COMPILED LOOP ( not in vocabulary ) // COMPILED LOOP ( not in vocabulary )
char d_doloop = "(DOLOOP)" char d_doloop = "(DOLOOP)"
@ -445,10 +448,14 @@ word = @d_does, 0, @_dictaddw_
char d_commab = "C," char d_commab = "C,"
byte = showcr_flag byte = showcr_flag
word = @d_comma, 0, @_dictaddb_ word = @d_comma, 0, @_dictaddb_
// STATE
char d_state = "STATE"
byte = 0
word = @d_commab, 0, @_state_
// COLON // COLON
char d_colon = ":" char d_colon = ":"
byte = interponly_flag byte = interponly_flag
word = @d_commab, 0, @_colon_ word = @d_state, 0, @_colon_
// COMP OFF // COMP OFF
char d_compoff = "[" char d_compoff = "["
byte = imm_flag | componly_flag byte = imm_flag | componly_flag
@ -457,14 +464,22 @@ word = @d_colon, 0, @_compoff_
char d_compon = "]" char d_compon = "]"
byte = interponly_flag byte = interponly_flag
word = @d_compoff, 0, @_compon_ word = @d_compoff, 0, @_compon_
// COMPILE WORD ON STACK
char d_compword = "(COMPILE)"
byte = componly_flag
word = @d_compon, 0, @_compword_
// COMPILE NEXT WORD // COMPILE NEXT WORD
char d_compile = "[COMPILE]" char d_compile = "COMPILE"
byte = imm_flag | componly_flag byte = imm_flag | componly_flag
word = @d_compon, 0, @_compile_ word = @d_compword, 0, @_compile_
// FORCE COMPILE NEXT WORD
char d_forcecomp = "[COMPILE]"
byte = imm_flag | componly_flag
word = @d_compile, 0, @_forcecomp_
// COMPILE ONLY // COMPILE ONLY
char d_componly = "COMPONLY" char d_componly = "COMPONLY"
byte = imm_flag byte = imm_flag
word = @d_compile, 0, @_componly_ word = @d_forcecomp, 0, @_componly_
// INTERPRET ONLY // INTERPRET ONLY
char d_interponly = "INTERPONLY" char d_interponly = "INTERPONLY"
byte = imm_flag byte = imm_flag
@ -475,7 +490,7 @@ byte = imm_flag
word = @d_interponly, 0, @_immediate_ word = @d_interponly, 0, @_immediate_
// EXIT // EXIT
char d_exit = "EXIT" char d_exit = "EXIT"
byte = imm_flag | componly_flag | showcr_flag byte = imm_flag | componly_flag
word = @d_immediate, 0, @_exit_ word = @d_immediate, 0, @_exit_
// SEMI // SEMI
char d_semi = ";" char d_semi = ";"
@ -527,19 +542,19 @@ byte = 0
word = @d__isnum_, 0, @_trailing_ word = @d__isnum_, 0, @_trailing_
// PRINT @TOS // PRINT @TOS
char d_prat = "?" char d_prat = "?"
byte = showcr_flag byte = 0
word = @d_trailing, 0, @_prat_ word = @d_trailing, 0, @_prat_
// PRINT TOS // PRINT TOS
char d_prtos = "." char d_prtos = "."
byte = showcr_flag byte = 0
word = @d_prat, 0, @_prval_ word = @d_prat, 0, @_prval_
// PRINT TOS HEX // PRINT TOS HEX
char d_prtoshex = "$." char d_prtoshex = "$."
byte = showcr_flag byte = 0
word = @d_prtos, 0, @_prhex_ word = @d_prtos, 0, @_prhex_
// PRINT TOS HEX BYTE // PRINT TOS HEX BYTE
char d_prtosbyte = "C$." char d_prtosbyte = "C$."
byte = showcr_flag byte = 0
word = @d_prtoshex, 0, @_prbyte_ word = @d_prtoshex, 0, @_prbyte_
// EMIT // EMIT
char d_emit = "EMIT" char d_emit = "EMIT"
@ -547,7 +562,7 @@ byte = 0
word = @d_prtosbyte, 0, @putc word = @d_prtosbyte, 0, @putc
// CR // CR
char d_cr = "CR" char d_cr = "CR"
byte = 0 byte = showcr_flag
word = @d_emit, 0, @putln word = @d_emit, 0, @putln
// SPACE // SPACE
char d_space = "SPACE" char d_space = "SPACE"
@ -579,7 +594,7 @@ byte = param_flag | inline_flag
word = 0, 0, @_slit_, $2E word = 0, 0, @_slit_, $2E
// PRINT STRING FROM STACK // PRINT STRING FROM STACK
char d_doprstr = "(.\")" char d_doprstr = "(.\")"
byte = showcr_flag byte = 0
word = @d_str, 0, @puts word = @d_str, 0, @puts
// PRINT STRING // PRINT STRING
char d_prstr = ".\"" char d_prstr = ".\""
@ -627,7 +642,7 @@ byte = showcr_flag
word = @d_abortstr, 0, @_restart_ word = @d_abortstr, 0, @_restart_
// COMMENT // COMMENT
char d_comment = "(" char d_comment = "("
byte = imm_flag | showcr_flag byte = imm_flag
word = @d_exitforth, 0, @_comment_ word = @d_exitforth, 0, @_comment_
// //
// PLFORTH custom words // PLFORTH custom words
@ -642,31 +657,31 @@ byte = interponly_flag
word = @d_bye, 0, @_show_ word = @d_bye, 0, @_show_
// SHOW STACK // SHOW STACK
char d_showstack = "SHOWSTACK" char d_showstack = "SHOWSTACK"
byte = 0 byte = showcr_flag
word = @d_show, 0, @_showstack_ word = @d_show, 0, @_showstack_
// SHOW RSTACK // SHOW RSTACK
char d_showrstack = "SHOWRSTACK" char d_showrstack = "SHOWRSTACK"
byte = 0 byte = showcr_flag
word = @d_showstack, 0, @_showrstack_ word = @d_showstack, 0, @_showrstack_
// TRACE ON // TRACE ON
char d_tron = "TRON" char d_tron = "TRON"
byte = 0 byte = showcr_flag
word = @d_showrstack, 0, @_tron_ word = @d_showrstack, 0, @_tron_
// TRACE OFF // TRACE OFF
char d_troff = "TROFF" char d_troff = "TROFF"
byte = 0 byte = showcr_flag
word = @d_tron, 0, @_troff_ word = @d_tron, 0, @_troff_
// SINGLE STEP ON // SINGLE STEP ON
char d_stepon = "STEPON" char d_stepon = "STEPON"
byte = 0 byte = showcr_flag
word = @d_troff, 0, @_stepon_ word = @d_troff, 0, @_stepon_
// SINGLE STEP OFF // SINGLE STEP OFF
char d_stepoff = "STEPOFF" char d_stepoff = "STEPOFF"
byte = 0 byte = showcr_flag
word = @d_stepon, 0, @_stepoff_ word = @d_stepon, 0, @_stepoff_
// BREAK OUT // BREAK OUT
char d_brk = "BRK" char d_brk = "BRK"
byte = 0 byte = showcr_flag
word = @d_stepoff, 0, @_brk_ word = @d_stepoff, 0, @_brk_
// BREAK ON // BREAK ON
char d_brkon = "BRKON" char d_brkon = "BRKON"
@ -689,7 +704,7 @@ word = @d_itc, 0, @_pbc_
// //
// LIST VOCAB // LIST VOCAB
char d_vlist = "VLIST" char d_vlist = "VLIST"
byte = 0 byte = showcr_flag
word = @d_pbc, 0, @_vlist_ word = @d_pbc, 0, @_vlist_
// //
// Helper routines // Helper routines
@ -903,7 +918,7 @@ end
// Break handler // Break handler
// //
def showtrace(dentry)#0 def showtrace(dentry)#0
puts("\n( "); _showstack_; puts(") "); puts(dentry); putc(' ') putln; puts("( "); _showstack_; puts(") "); puts(dentry); putc(' ')
end end
def brkhandle(dentry)#0 def brkhandle(dentry)#0
word brk_infn, brk_inptr, brk_iip word brk_infn, brk_inptr, brk_iip
@ -1215,6 +1230,9 @@ def _create_#0
// 9 bytes after PFA, data follows... // 9 bytes after PFA, data follows...
// //
end end
def _state_#1
return state & comp_flag
end
def _dodoes_#0 def _dodoes_#0
(@push)(W + 11)#0 // Pointer to PFA storage (@push)(W + 11)#0 // Pointer to PFA storage
execwords(*(W + 2)) // Exec PFA ptr execwords(*(W + 2)) // Exec PFA ptr
@ -1293,7 +1311,24 @@ def _compile_#0
dentry = find(nextword(' ')) dentry = find(nextword(' '))
if dentry if dentry
_compword_(dentry) if ^_ffa_(dentry) & imm_flag
_compword_(dentry)
else
_compliteral_(dentry)
_compword_(@d_compword)
fin
else
puts("No match\n")
_quit_
fin
end
def _forcecomp_#0
word dentry
dentry = find(nextword(' '))
if dentry
_compliteral_(dentry)
_compword_(@d_compword)
else else
puts("No match\n") puts("No match\n")
_quit_ _quit_
@ -1745,14 +1780,15 @@ def _show_#0
pfa = pfa + 2 pfa = pfa + 2
w = *pfa w = *pfa
if !w if !w
puts(" EXIT\n")
pfa = pfa + 2 pfa = pfa + 2
w = *pfa w = *pfa
if !*w; puts(" EXIT\n"); fin
fin fin
if conio:keypressed() if conio:keypressed()
conio:getkey(); conio:getkey() conio:getkey(); conio:getkey()
fin fin
loop loop
puts(" EXIT\n")
fin fin
end end
def _showstack_#0 def _showstack_#0

View File

@ -189,7 +189,7 @@ def shell#1
catalog(cmdptr) catalog(cmdptr)
break break
is 'P' is 'P'
if ^cmdptr and ^(cmdptr + 1) <> '/' if ^cmdptr and ^(cmdptr + 1) <> '/' and ^(cmdptr + 1) <> '.'
strcat(@prefix, cmdptr) strcat(@prefix, cmdptr)
else else
strcpy(@prefix, cmdptr) strcpy(@prefix, cmdptr)

View File

@ -264,7 +264,7 @@ def shell#1
catalog(cmdptr) catalog(cmdptr)
break break
is 'P' is 'P'
if ^cmdptr and ^(cmdptr + 1) <> '/' if ^cmdptr and ^(cmdptr + 1) <> '/' and ^(cmdptr + 1) <> '.'
strcat(@prefix, cmdptr) strcat(@prefix, cmdptr)
else else
strcpy(@prefix, cmdptr) strcpy(@prefix, cmdptr)

View File

@ -1225,24 +1225,23 @@ def loadmod(mod)#1
end end
def execmod(modfile)#1 def execmod(modfile)#1
byte moddci[63] byte moddci[63]
word saveheap, savesym, saveflags word saveheap, savesym, saveflags, savemodid
perr = 1 perr = 1
if stodci(modfile, @moddci) if stodci(modfile, @moddci)
saveheap = heap saveheap = heap
savesym = lastsym savesym = lastsym
saveflags = systemflags saveflags = systemflags
savemodid = modid
if loadmod(@moddci) < modkeep if loadmod(@moddci) < modkeep
lastsym = savesym lastsym = savesym
heap = saveheap heap = saveheap
while modid while modid > savemodid
modid-- modid--
seg_release(modseg[modid]) seg_release(modseg[modid])
loop loop
xpokeb(symtbl.0, lastsym, 0) xpokeb(symtbl.0, lastsym, 0)
systemflags = saveflags systemflags = saveflags
else
modid = 0
fin fin
fin fin
return -perr return -perr

View File

@ -1248,24 +1248,23 @@ def loadmod(mod)#1
end end
def execmod(modfile)#1 def execmod(modfile)#1
byte moddci[63] byte moddci[63]
word saveheap, savesym, saveflags word saveheap, savesym, saveflags, savemodid
perr = 1 perr = 1
if stodci(modfile, @moddci) if stodci(modfile, @moddci)
saveheap = heap saveheap = heap
savesym = lastsym savesym = lastsym
saveflags = systemflags saveflags = systemflags
savemodid = modid
if loadmod(@moddci) < modkeep if loadmod(@moddci) < modkeep
lastsym = savesym lastsym = savesym
heap = saveheap heap = saveheap
while modid while modid > savemodid
modid-- modid--
seg_release(modseg[modid]) seg_release(modseg[modid])
loop loop
xpokeb(symtbl.0, lastsym, 0) xpokeb(symtbl.0, lastsym, 0)
systemflags = saveflags systemflags = saveflags
else
modid = 0
fin fin
fin fin
return -perr return -perr