Skip to content

Commit

Permalink
Add syspath to SRC" search and move system scripts there
Browse files Browse the repository at this point in the history
  • Loading branch information
highlander-robotics committed Jan 7, 2024
1 parent 3883264 commit bb4e0ee
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 20 deletions.
Binary file modified images/apple/PLFORTH.PO
Binary file not shown.
44 changes: 29 additions & 15 deletions src/mkrel
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ cp rel/HRFORTH#FE1000 prodos/sys/HRFORTH.REL
cp rel/HR2FORTH#FE1000 prodos/sys/HR2FORTH.REL
cp rel/PLFORTH#FE1000 prodos/sys/PLFORTH.REL

mkdir prodos/sys/scripts
cp scripts/plasma.4th prodos/sys/scripts/PLASMA.4TH.TXT
cp scripts/conio.4th prodos/sys/scripts/CONIO.4TH.TXT
cp scripts/fileio.4th prodos/sys/scripts/FILEIO.4TH.TXT
cp scripts/grlib.4th prodos/sys/scripts/GRLIB.4TH.TXT
cp scripts/hgrlib.4th prodos/sys/scripts/HGRLIB.4TH.TXT
cp scripts/int32.4th prodos/sys/scripts/INT32.4TH.TXT
cp scripts/fpu.4th prodos/sys/scripts/FPU.4TH.TXT

rm -rf prodos/syspro
mkdir prodos/syspro
cp ../sysfiles/PRODOS#FF0000 prodos/syspro/PRODOS.SYS
Expand Down Expand Up @@ -97,9 +106,22 @@ cp rel/apple/JITUNE#FE1000 prodos/syspro/sys/JITUNE.REL
cp rel/apple/ZIPCHIP#FE1000 prodos/syspro/sys/ZIPCHIP.REL
cp rel/LZ4#FE1000 prodos/syspro/sys/LZ4.REL
cp rel/INT32#FE1000 prodos/syspro/sys/INT32.REL
cp rel/HRFORTH#FE1000 prodos/syspro/HRFORTH.REL
cp rel/HR2FORTH#FE1000 prodos/syspro/HR2FORTH.REL
cp rel/PLFORTH#FE1000 prodos/syspro/sys/PLFORTH.REL

rm -rf prodos/sysforth
mkdir prodos/sysforth
mkdir prodos/sysforth/sys
cp rel/HRFORTH#FE1000 prodos/sysforth/sys/HRFORTH.REL
cp rel/HR2FORTH#FE1000 prodos/sysforth/sys/HR2FORTH.REL
cp rel/PLFORTH#FE1000 prodos/sysforth/sys/PLFORTH.REL

mkdir prodos/sysforth/sys/scripts
cp scripts/plasma.4th prodos/sysforth/sys/scripts/PLASMA.4TH.TXT
cp scripts/conio.4th prodos/sysforth/sys/scripts/CONIO.4TH.TXT
cp scripts/fileio.4th prodos/sysforth/sys/scripts/FILEIO.4TH.TXT
cp scripts/grlib.4th prodos/sysforth/sys/scripts/GRLIB.4TH.TXT
cp scripts/hgrlib.4th prodos/sysforth/sys/scripts/HGRLIB.4TH.TXT
cp scripts/int32.4th prodos/sysforth/sys/scripts/INT32.4TH.TXT
cp scripts/fpu.4th prodos/sysforth/sys/scripts/FPU.4TH.TXT

rm -rf prodos/sysinet
mkdir prodos/sysinet
Expand Down Expand Up @@ -209,18 +231,10 @@ cp samplesrc/fppow.pla prodos/bld/samples/FPPOW.PLA.TXT
cp utilsrc/apple/mon.pla prodos/bld/samples/MON.PLA.TXT
cp utilsrc/apple/zipchip.pla prodos/bld/samples/ZIPCHIP.PLA.TXT

rm -rf prodos/scripts
mkdir prodos/scripts
cp scripts/plasma.4th prodos/scripts/PLASMA.4TH.TXT
cp scripts/conio.4th prodos/scripts/CONIO.4TH.TXT
cp scripts/fileio.4th prodos/scripts/FILEIO.4TH.TXT
cp scripts/grlib.4th prodos/scripts/GRLIB.4TH.TXT
cp scripts/hgrlib.4th prodos/scripts/HGRLIB.4TH.TXT
cp scripts/int32.4th prodos/scripts/INT32.4TH.TXT
cp scripts/fpu.4th prodos/scripts/FPU.4TH.TXT
cp scripts/rod.4th prodos/scripts/ROD.4TH.TXT
cp scripts/bounce.4th prodos/scripts/BOUNCE.4TH.TXT
cp scripts/hrbounce.4th prodos/scripts/HRBOUNCE.4TH.TXT
mkdir prodos/bld/scripts
cp scripts/rod.4th prodos/bld/scripts/ROD.4TH.TXT
cp scripts/bounce.4th prodos/bld/scripts/BOUNCE.4TH.TXT
cp scripts/hrbounce.4th prodos/bld/scripts/HRBOUNCE.4TH.TXT

#mkdir prodos/bld/examples
#cp samplesrc/examples/ex.1.pla prodos/bld/examples/EX.1.PLA.TXT
Expand Down
8 changes: 8 additions & 0 deletions src/toolsrc/plforth.pla
Original file line number Diff line number Diff line change
Expand Up @@ -1768,11 +1768,19 @@ def _lookup_#1
return cmdsys:lookupsym(stodci(symname, @dci))
end
def _src_(a)#0
char[64] syssrc

if srclevel >= SRCREFS
puts("Too many nested SRC")
_quit_
fin
inref[srclevel] = fileio:open(a)
if !inref[srclevel] and ^a < 16
strcpy(@syssrc, cmdsys:syspath)
strcat(@syssrc, "scripts/")
strcat(@syssrc, a)
inref[srclevel] = fileio:open(@syssrc)
fin
if inref[srclevel]
fileio:newline(inref[srclevel], $7F, $0D)
infunc = @filein
Expand Down
2 changes: 1 addition & 1 deletion src/vmsrc/apple/a1cmd.pla
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def parsecmd(strptr)#1
return cmd
end
def execmod(modfile)#1
byte moddci[17]
byte moddci[63]
word saveheap, savesym, saveflags

perr = 1
Expand Down
2 changes: 1 addition & 1 deletion src/vmsrc/apple/cmd.pla
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ def execsys(sysfile)#0
fin
end
def execmod(modfile)#1
byte moddci[17]
byte moddci[63]
word saveheap, savesym, saveflags

perr = 1
Expand Down
2 changes: 1 addition & 1 deletion src/vmsrc/apple/cmdjit.pla
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ def execsys(sysfile)#0
fin
end
def execmod(modfile)#1
byte moddci[17]
byte moddci[63]
word saveheap, savexheap, savesym, saveflags

perr = 1
Expand Down
2 changes: 1 addition & 1 deletion src/vmsrc/apple/sossys.pla
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ def loadmod(mod)#1
return initcode
end
def execmod(modfile)#1
byte moddci[17]
byte moddci[63]
word saveheap, savesym, saveflags

perr = 1
Expand Down
2 changes: 1 addition & 1 deletion src/vmsrc/apple/sossysjit.pla
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ def loadmod(mod)#1
return initcode
end
def execmod(modfile)#1
byte moddci[17]
byte moddci[63]
word saveheap, savesym, saveflags

perr = 1
Expand Down

0 comments on commit bb4e0ee

Please sign in to comment.