1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-03-12 16:42:08 +00:00

21 Commits
DP3 ... DP4

Author SHA1 Message Date
David Schmenk
8bdc1d6c56 DP4 release 2020-01-31 12:10:14 -08:00
David Schmenk
46000e7af1 Update images with latest editor 2020-01-31 12:06:49 -08:00
Dave Schmenk
447cde1692 Forth->PLASMA transpiler 2020-01-25 14:03:22 -08:00
David Schmenk
c74af19505 Improve indenting on mis-aligned lines 2020-01-21 08:39:26 -08:00
David Schmenk
5581bfb052 Update images 2020-01-20 12:09:09 -08:00
David Schmenk
1a208ef30a Make sure ternary op has lower precedence than AND and OR 2020-01-20 11:39:58 -08:00
Dave Schmenk
e0d688a45a SHR library 2020-01-19 13:11:09 -08:00
David Schmenk
642b4cbbb4 Forgot MATCHFILES for floppy image 2020-01-19 08:38:25 -08:00
David Schmenk
233e0299dc Update images 2020-01-17 13:24:23 -08:00
Dave Schmenk
ff023f65d2 Fix long standing bug in catalog code 2020-01-17 12:51:19 -08:00
Dave Schmenk
6045b260db Machine check for HGRLIB and slightly smaller catalog code 2020-01-17 12:22:18 -08:00
Dave Schmenk
b5f02ea7c5 Fiz ZIP chip utility to turn ANN3 off (fix hires colors) 2020-01-16 20:47:10 -08:00
David Schmenk
c9477238fa Clean up images 2020-01-15 13:33:46 -08:00
David Schmenk
59a35068bf Clean up the images 2020-01-15 13:24:05 -08:00
David Schmenk
348bc4eaf5 Update README.md 2020-01-11 12:27:41 -08:00
David Schmenk
05f5729adc Update Version 2.0.md 2020-01-10 22:34:47 -08:00
David Schmenk
06f12e5607 Update Version 2.0.md 2020-01-10 22:33:45 -08:00
David Schmenk
1aee6c4523 Update Version 2.0.md 2020-01-10 22:30:36 -08:00
David Schmenk
c8015091a5 Update SOS fix in images 2020-01-10 18:54:28 -08:00
Dave Schmenk
c83ed2c494 Fix another SOS-ism 2020-01-10 18:50:54 -08:00
David Schmenk
5c8fbfdcf4 Forgot to update editor version 2020-01-10 17:59:27 -08:00
30 changed files with 3678 additions and 297 deletions

View File

@@ -1,4 +1,4 @@
# 11/10/2020 PLASMA 2.0 Developer Preview 3 Available!
# 1/31/2020 PLASMA 2.0 Developer Preview 4 Available!
[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/releases)
[Change List](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.0.md#changes-in-plasma-for-20-dp-3)

View File

@@ -1,20 +1,20 @@
# PLASMA Version 2.0 Developer Preview 3
# PLASMA Version 2.0 Developer Preview 4
Welcome to PLASMA: the Grand Unifying Platform for the Apple 1, ][, and ///.
Download the four disk images (three if you don't plan to boot an Apple ///):
Download the five disk images:
[PLASMA 2.0 DP 800K Full System](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2.2mg?raw=true)
[PLASMA 2.0 DP4 800K Full System](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2.2mg?raw=true)
[PLASMA 2.0 DP System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-SYS.PO?raw=true)
[PLASMA 2.0 DP4 System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-SYS.PO?raw=true)
[PLASMA 2.0 DP Build Tools](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-BLD.PO?raw=true)
[PLASMA 2.0 DP4 Build Tools](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-BLD.PO?raw=true)
[PLASMA 2.0 DP Demos](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-DEM.PO?raw=true)
[PLASMA 2.0 DP4 Demos](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-DEM.PO?raw=true)
[PLASMA 2.0 TCP/IP modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-INET.PO?raw=true)
[PLASMA 2.0 DP4 TCP/IP network modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-INET.PO?raw=true)
[PLASMA 2.0 DP Apple /// SOS Boot and SANE floating point modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-FPSOS.PO?raw=true)
[PLASMA 2.0 DP4 Apple /// SOS Boot and SANE floating point modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-FPSOS.PO?raw=true)
PLASMA can be run from floppies, System in Drive 1, and Build or Demos in Drive 2. Mass storage is the recommended installation that looks like (replacing HARDISK with your volume name of choice):
@@ -82,6 +82,7 @@ The file manipulation utilities to copy, delete, rename, create directories, and
+REN <FILENAME> <NEWNAME>
+NEWDIR <NEWDIRECTORY>
+TYPE <FILENAME> [NEWTYPE [NEWAUX]]
+CAT [-R] <FILEPATH]
```
The ```-R``` option will operate on the directories recursively. Wildcard filenames can be specified with ```'*'``` matching zero or more characters, and ```'?'``` matching any character.
@@ -115,6 +116,14 @@ There is a [YouTube playlist](https://www.youtube.com/playlist?list=PLlPKgUMQbJ7
- The documentation is sparse and incomplete. Yep, could use your help...
# Changes in PLASMA for 2.0 DP 4
1. Improved editor auto-indenting
2. Compiler fix for terneray operator precedence
3. Machine check for HGR library
# Changes in PLASMA for 2.0 DP 3
1. File manipulation utilities fixed for Apple /// SOS vs ProDOS differences

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -16,6 +16,13 @@ const hgr1 = $2000
const hgr2 = $4000
const page1 = 0
const page2 = 1
//
// Apple III hardware constants.
//
const ENV_REG = $FFDF
//
// Screen addresses
//
word hgrbuff[] = hgr1, hgr2
//word hgrscan[] = $0000,$0400,$0800,$0C00,$1000,$1400,$1800,$1C00
//word = $0080,$0480,$0880,$0C80,$1080,$1480,$1880,$1C80
@@ -1192,6 +1199,13 @@ export def hgrDrawBuf(page)#1
return drawpage
end
//
// Machine compatibility check
//
if MACHID & MACHID_MODEL == MACHID_III or MACHID & MACHID_MODEL == MACHID_I
puts("Apple II compatible only.\n")
return -1
fin
//
// Assembly fixups
//
hgrCopyDst:1 = @clipsrc

View File

@@ -43,7 +43,7 @@ end
export def matchList(pathstr, exp)#2
byte refnum
char[64] curpath
var firstblk, entrylen, entriesblk, i, entry, filecnt, entrylist, entryptr, entrycnt
var firstblk, entrylen, entriesblk, i, entry, entrylist, entryptr, entrycnt
if not dirbuf
dirbuf = heapallocalign(512, 8, 0)
@@ -58,48 +58,43 @@ export def matchList(pathstr, exp)#2
fin
entrylist = 0
entrycnt = 0
filecnt = 0
firstblk = 1
refnum = fileio:open(pathstr)
repeat
if fileio:read(refnum, dirbuf, 512) == 512
while fileio:read(refnum, dirbuf, 512) == 512
//
// Skip block pointers
//
entry = dirbuf + 4
if firstblk
//
// Skip block pointers
// Pull out revelant details from the first block
//
entry = dirbuf + 4
if firstblk
//
// Pull out revelant details from the first block
//
entrylen = dirbuf->$23
entriesblk = dirbuf->$24
filecnt = dirbuf=>$25
entry = entry + entrylen
fin
for i = firstblk to entriesblk
//
// Copy directory entry details
//
^entry = ^entry & $0F
if ^entry
//
// Match wildcard filename
//
if matchName(entry, exp)
entryptr = heapalloc(t_fileentry)
memcpy(entryptr, entry, t_fileentry)
entrycnt++
if not entrylist
entrylist = entryptr
fin
fin
filecnt--
fin
entry = entry + entrylen
next
firstblk = 0
entrylen = dirbuf->$23
entriesblk = dirbuf->$24 - 1
entry = entry + entrylen
fin
until filecnt == 0
for i = firstblk to entriesblk
//
// Copy directory entry details
//
^entry = ^entry & $0F
if ^entry
//
// Match wildcard filename
//
if matchName(entry, exp)
entryptr = heapalloc(t_fileentry)
memcpy(entryptr, entry, t_fileentry)
entrycnt++
if not entrylist
entrylist = entryptr
fin
fin
fin
entry = entry + entrylen
next
firstblk = 0
loop
fileio:close(refnum)
return entrylist, entrycnt
end

181
src/libsrc/apple/shrlib.pla Normal file
View File

@@ -0,0 +1,181 @@
include "inc/cmdsys.plh"
//
// Apple II hardware constants.
//
const store80dis = $C000
const store80en = $C001
const vidctl = $C029
const showgraphics = $C050
const showtext = $C051
const showfull = $C052
const showmix = $C053
const showpage1 = $C054
const showpage2 = $C055
const showlores = $C056
const showhires = $C057
const show40 = $C00C
const show80 = $C00D
const mapmain = $C000
const mapaux = $C001
const an3on = $C05E
const an3off = $C05F
const ena80 = $C07E
const dis80 = $C07F
const pixbuf = $2000
const scbbuf = $9D00
const palbuf = $9E00
const scb640 = $80 // 640 PIXEL SUPER-HIRES
const scb320 = $00 // 320 PIXEL SUPER-HIRES
word palette = $0000, $0007, $0070, $0077, $0700, $0707, $0770, $0
word = $0CCC, $000F, $00F0, $00FF, $0F00, $0F0F, $0FF0, $0FFF
asm shrInc(buff)
!SOURCE "vmsrc/plvmzp.inc"
GBASL = $26
GBASH = $27
GBASE = GBASL
GCLR = $30
STORE80DIS = $C000
STORE80EN = $C001
MAINWRT = $C004
AUXWRT = $C005
VIDCTL = $C029
SHADOW = $C035
end
//
// This gets copied to $0100!!!
//
asm auxRead
STA $C003 ; READ AUX MEM
LDA (GBASE),Y
STA $C002 ; READ MAIN MEM
RTS
end
//
// Peek byte from SHR memory
//
asm shrPeek(addr)
LDA ESTKL,X
STA GBASL
LDA ESTKH,X
STA GBASH
LDY #$00
STY ESTKH,X
PHP
SEI
LDA SHADOW
AND #$F7
STA SHADOW
JSR $0100
STA ESTKL,X
LDA SHADOW
ORA #$08
STA SHADOW
PLP
RTS
end
//
// Poke byte into SHR memory
//
asm shrPoke(addr, data)#0
LDA ESTKL+1,X
STA GBASL
LDA ESTKH+1,X
STA GBASH
LDY #$00
PHP
SEI
LDA SHADOW
AND #$F7
STA SHADOW
LDA ESTKL+0,X
STA AUXWRT
STA (GBASE),Y
STA MAINWRT
LDA SHADOW
ORA #$08
STA SHADOW
PLP
INX
INX
RTS
end
//
// Fill byte into SHR memory
//
asm shrFill(addr, data, len)#0
LDA ESTKL+2,X
STA GBASL
LDA ESTKH+2,X
STA GBASH
LDY #$00
PHP
SEI
LDA SHADOW
AND #$F7
STA SHADOW
LDA ESTKL+1,X
STA AUXWRT
- STA (GBASE),Y
INY
BNE +
INC GBASH
+ DEC ESTKL+0,X
BNE -
DEC ESTKH+0,X
BNE -
STA MAINWRT
LDA SHADOW
ORA #$08
STA SHADOW
PLP
INX
INX
RTS
end
export def shrPalette(pal, rgbptr)#0
word palptr
byte i
palptr = palbuf + pal * 32
for i = 0 to 31
shrPoke(palptr + i, ^(rgbptr + i))
next
end
export def shrMode(mode)#0
byte row, scb
if mode
//
// Set super hires graphics
//
if mode == 640
scb = scb640
else
scb = scb320
fin
for row = 0 to 199
shrPoke(scbbuf + row, scb)
shrRowPalette(row, palette)
next
^store80dis = 0 // Turn off 80 column mode
^vidctl = ^vidctl | $80 // Turn on SHR mode
return
fin
//
// Set text mode
//
^vidctl = ^vidctl & $7F
^showtext
^showpage1
^ena80 = 0
^show40 = 0
^mapmain = 0
^an3off
call($FC58, 0, 0, 0, 0) // home()
end
// Put read AUX mem routine in scary location
memcpy($0100, @auxRead, 9)
done

View File

@@ -15,7 +15,7 @@ CMDJIT = rel/apple/CMD128\#061000
PLVMZP_C64 = vmsrc/c64/plvmzp.inc
PLVMC64 = rel/c64/PLASMA
ED = rel/ED\#FE1000
ZIP = rel/apple/ZIP\#FE1000
ZIPCHIP = rel/apple/ZIPCHIP\#FE1000
JIT = rel/apple/JIT\#FE1000
JIT16 = rel/apple/JIT16\#FE1000
JITUNE = rel/apple/JITUNE\#FE1000
@@ -109,7 +109,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) $(ZIP) $(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)
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(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)
-rm vmsrc/plvmzp.inc
@@ -507,9 +507,9 @@ $(SOS): utilsrc/apple/sos.pla $(PLVM03) $(PLASM)
./$(PLASM) -AMOW < utilsrc/apple/sos.pla > utilsrc/apple/sos.a
acme --setpc 4094 -o $(SOS) utilsrc/apple/sos.a
$(ZIP): utilsrc/apple/zip.pla $(PLASM)
./$(PLASM) -AMOW < utilsrc/apple/zip.pla > utilsrc/apple/zip.a
acme --setpc 4094 -o $(ZIP) utilsrc/apple/zip.a
$(ZIPCHIP): utilsrc/apple/zipchip.pla $(PLASM)
./$(PLASM) -AMOW < utilsrc/apple/zipchip.pla > utilsrc/apple/zipchip.a
acme --setpc 4094 -o $(ZIPCHIP) utilsrc/apple/zipchip.a
$(JIT): libsrc/apple/jit.pla libsrc/jitcore.pla $(PLVMJIT) $(PLASM)
./$(PLASM) -AMOW < libsrc/apple/jit.pla > libsrc/apple/jit.a

View File

@@ -40,7 +40,7 @@ cp rel/apple/SNDSEQ#FE1000 prodos/sys/SNDSEQ.REL
cp rel/apple/JIT#FE1000 prodos/sys/JIT.REL
cp rel/apple/JIT16#FE1000 prodos/sys/JIT16.REL
cp rel/apple/JITUNE#FE1000 prodos/sys/JITUNE.REL
cp rel/apple/ZIP#FE1000 prodos/sys/ZIP.REL
cp rel/apple/ZIPCHIP#FE1000 prodos/sys/ZIPCHIP.REL
cp rel/LZ4#FE1000 prodos/sys/LZ4.REL
cp rel/TFTPD#FE1000 prodos/sys/TFTPD.REL
cp rel/INT32#FE1000 prodos/sys/INT32.REL
@@ -73,20 +73,11 @@ cp ../sysfiles/ELEMS.CODE#060000 prodos/fpsos/sys/ELEMS.CODE.BIN
rm -rf prodos/demos
mkdir prodos/demos
cp rel/INT32TEST#FE1000 prodos/demos/INT32TEST.REL
cp rel/apple/TILETEST#FE1000 prodos/demos/TILETEST.REL
cp rel/apple/HGRTEST#FE1000 prodos/demos/HGRTEST.REL
cp rel/apple/GRTEST#FE1000 prodos/demos/GRTEST.REL
cp rel/apple/DGRTEST#FE1000 prodos/demos/DGRTEST.REL
cp rel/apple/HGRTEST#FE1000 prodos/demos/HGRTEST.REL
cp rel/apple/ROD#FE1000 prodos/demos/ROD.REL
cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL
cp rel/LZ4CAT#FE1000 prodos/demos/LZ4CAT.REL
cp rel/PRIMEGAP#FE1000 prodos/demos/PRIMEGAP.REL
mkdir prodos/demos/spiders
cp rel/apple/SFM#FE1000 prodos/demos/spiders/SFM.REL
cp rel/apple/SFMSPRT#FE1000 prodos/demos/spiders/SFMSPRT.REL
mkdir prodos/demos/rogue
cp rel/ROGUE#FE1000 prodos/demos/rogue/ROGUE.REL
cp rel/ROGUECOMBAT#FE1000 prodos/demos/rogue/ROGUECOMBAT.REL
@@ -94,27 +85,37 @@ cp rel/ROGUEMAP#FE1000 prodos/demos/rogue/ROGUEMAP.REL
cp samplesrc/LEVEL0#040000 prodos/demos/rogue/LEVEL0.TXT
cp samplesrc/LEVEL1#040000 prodos/demos/rogue/LEVEL1.TXT
mkdir prodos/demos/sdutils
cp rel/apple/SPIPORT#FE1000 prodos/demos/sdutils/SPIPORT.REL
cp rel/apple/SDFAT#FE1000 prodos/demos/sdutils/SDFAT.REL
cp rel/apple/FATCAT#FE1000 prodos/demos/sdutils/FATCAT.REL
cp rel/apple/FATGET#FE1000 prodos/demos/sdutils/FATGET.REL
cp rel/apple/FATPUT#FE1000 prodos/demos/sdutils/FATPUT.REL
cp rel/apple/FATREADDSK#FE1000 prodos/demos/sdutils/FATREADDSK.REL
cp rel/apple/FATWRITEDSK#FE1000 prodos/demos/sdutils/FATWRITEDSK.REL
mkdir prodos/demos/apple3
cp rel/apple/GFXDEMO#FE1000 prodos/demos/apple3/GFXDEMO.REL
cp samplesrc/APPLE3.PIX#060000 prodos/demos/apple3/APPLE3.PIX.BIN
mkdir prodos/demos/music
cp rel/apple/PLAYSEQ#FE1000 prodos/demos/music/PLAYSEQ.REL
cp mockingboard/ultima3.seq prodos/demos/music/ULTIMA3.SEQ.BIN
cp mockingboard/startrek.seq prodos/demos/music/STARTREK.SEQ.BIN
mkdir prodos/demos/net
cp rel/HTTPD#FE1000 prodos/demos/net/HTTPD.REL
cp samplesrc/index.html prodos/demos/net/INDEX.HTML.TXT
mkdir prodos/demos/music
cp rel/apple/PLAYSEQ#FE1000 prodos/demos/music/PLAYSEQ.REL
cp mockingboard/ultima3.seq prodos/demos/music/ULTIMA3.SEQ.BIN
cp mockingboard/startrek.seq prodos/demos/music/STARTREK.SEQ.BIN
mkdir prodos/demos/apple2
cp rel/apple/TILETEST#FE1000 prodos/demos/apple2/TILETEST.REL
cp rel/apple/HGRTEST#FE1000 prodos/demos/apple2/HGRTEST.REL
cp rel/apple/GRTEST#FE1000 prodos/demos/apple2/GRTEST.REL
cp rel/apple/DGRTEST#FE1000 prodos/demos/apple2/DGRTEST.REL
mkdir prodos/demos/apple2/spiders
cp rel/apple/SFM#FE1000 prodos/demos/apple2/spiders/SFM.REL
cp rel/apple/SFMSPRT#FE1000 prodos/demos/apple2/spiders/SFMSPRT.REL
mkdir prodos/demos/apple2/sdutils
cp rel/apple/SPIPORT#FE1000 prodos/demos/apple2/sdutils/SPIPORT.REL
cp rel/apple/SDFAT#FE1000 prodos/demos/apple2/sdutils/SDFAT.REL
cp rel/apple/FATCAT#FE1000 prodos/demos/apple2/sdutils/FATCAT.REL
cp rel/apple/FATGET#FE1000 prodos/demos/apple2/sdutils/FATGET.REL
cp rel/apple/FATPUT#FE1000 prodos/demos/apple2/sdutils/FATPUT.REL
cp rel/apple/FATREADDSK#FE1000 prodos/demos/apple2/sdutils/FATREADDSK.REL
cp rel/apple/FATWRITEDSK#FE1000 prodos/demos/apple2/sdutils/FATWRITEDSK.REL
mkdir prodos/demos/apple3
cp rel/apple/GFXDEMO#FE1000 prodos/demos/apple3/GFXDEMO.REL
cp samplesrc/APPLE3.PIX#060000 prodos/demos/apple3/APPLE3.PIX.BIN
rm -rf prodos/bld
mkdir prodos/bld
@@ -142,6 +143,8 @@ cp samplesrc/gfxdemo.pla prodos/bld/samples/GFXDEMO.PLA.TXT
cp samplesrc/lz4cat.pla prodos/bld/samples/Z4CAT.PLA.TXT
cp samplesrc/sfm.pla prodos/bld/samples/SFM.PLA.TXT
cp samplesrc/sfmsprt.pla prodos/bld/samples/SFMSPRT.PLA.TXT
cp utilsrc/apple/mon.pla prodos/bld/samples/MON.PLA.TXT
cp utilsrc/apple/zipchip.pla prodos/bld/samples/ZIPCHIP.PLA.TXT
#mkdir prodos/bld/examples
#cp samplesrc/examples/ex.1.pla prodos/bld/examples/EX.1.PLA.TXT

View File

@@ -15,7 +15,6 @@ byte = $83, $31, $11, $13, $38
byte = $88, $33, $11, $33, $88
byte = $88, $83, $33, $38, $88
var sprtBall
def testline#0
var i

View File

@@ -5,20 +5,13 @@ echo "DEMOS/RPNCALC"; atftp $1 --put -l rel/RPNCALC#FE1000
echo "DEMOS/LZ4CAT"; atftp $1 --put -l rel/LZ4CAT#FE1000 -r $2/DEMOS/LZ4CAT#FE1000
echo "DEMOS/SIEVE"; atftp $1 --put -l rel/SIEVE#FE1000 -r $2/DEMOS/SIEVE#FE1000
echo "DEMOS/ROD"; atftp $1 --put -l rel/apple/ROD#FE1000 -r $2/DEMOS/ROD#FE1000
echo "DEMOS/TILETEST"; atftp $1 --put -l rel/apple/TILETEST#FE1000 -r $2/DEMOS/TILETEST#FE1000
echo "DEMOS/HGRTEST"; atftp $1 --put -l rel/apple/HGRTEST#FE1000 -r $2/DEMOS/HGRTEST#FE1000
echo "DEMOS/GRTEST"; atftp $1 --put -l rel/apple/GRTEST#FE1000 -r $2/DEMOS/GRTEST#FE1000
echo "DEMOS/INT32TEST"; atftp $1 --put -l rel/INT32TEST#FE1000 -r $2/DEMOS/INT32TEST#FE1000
echo "DEMOS/DGRTEST"; atftp $1 --put -l rel/apple/DGRTEST#FE1000 -r $2/DEMOS/DGRTEST#FE1000
# Spiders from Mars
echo "DEMOS/SPIDERS/SFM"; atftp $1 --put -l rel/apple/SFM#FE1000 -r $2/DEMOS/SPIDERS/SFM#FE1000
echo "DEMOS/SPIDERS/SFMSPRT"; atftp $1 --put -l rel/apple/SFMSPRT#FE1000 -r $2/DEMOS/SPIDERS/SFMSPRT#FE1000
# Music demo
echo "DEMOS/MUSIC/PLAYSEQ"; atftp $1 --put -l rel/apple/PLAYSEQ#FE1000 -r $2/DEMOS/MUSIC/PLAYSEQ#FE1000
atftp $1 --put -l mockingboard/ultima3.seq -r $2/DEMOS/MUSIC/ULTIMA3.SEQ#060000
atftp $1 --put -l mockingboard/startrek.seq -r $2/DEMOS/MUSIC/STARTREK.SEQ#060000
# Rogue demo
echo "DEMOS/ROGUE/ROGUE"; atftp $1 --put -l rel/ROGUE#FE1000 -r $2/DEMOS/ROGUE/ROGUE#FE1000
echo "DEMOS/ROGUE/ROGUEMAP"; atftp $1 --put -l rel/ROGUEMAP#FE1000 -r $2/DEMOS/ROGUE/ROGUEMAP#FE1000
@@ -26,15 +19,26 @@ echo "DEMOS/ROGUE/ROGUECOMBAT"; atftp $1 --put -l rel/ROGUECOMBAT#FE1000
atftp $1 --put -l samplesrc/LEVEL0#040000 -r $2/DEMOS/ROGUE/LEVEL0#040000
atftp $1 --put -l samplesrc/LEVEL1#040000 -r $2/DEMOS/ROGUE/LEVEL1#040000
# Arduino+SD card demos
echo "DEMOS/SDUTILS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/DEMOS/SDUTILS/SPIPORT#FE1000
echo "DEMOS/SDUTILS/SDFAT"; atftp $1 --put -l rel/apple/SDFAT#FE1000 -r $2/DEMOS/SDUTILS/SDFAT#FE1000
echo "DEMOS/SDUTILS/FATCAT"; atftp $1 --put -l rel/apple/FATCAT#FE1000 -r $2/DEMOS/SDUTILS/FATCAT#FE1000
echo "DEMOS/SDUTILS/FATGET"; atftp $1 --put -l rel/apple/FATGET#FE1000 -r $2/DEMOS/SDUTILS/FATGET#FE1000
echo "DEMOS/SDUTILS/FATPUT"; atftp $1 --put -l rel/apple/FATPUT#FE1000 -r $2/DEMOS/SDUTILS/FATPUT#FE1000
echo "DEMOS/SDUTILS/FATREADDSK"; atftp $1 --put -l rel/apple/FATREADDSK#FE1000 -r $2/DEMOS/SDUTILS/FATREADDSK#FE1000
echo "DEMOS/SDUTILS/FATWRITEDSK"; atftp $1 --put -l rel/apple/FATWRITEDSK#FE1000 -r $2/DEMOS/SDUTILS/FATWRITEDSK#FE1000
# Net demos
echo "DEMOS/NET/HTTPD"; atftp $1 --put -l rel/HTTPD#FE1000 -r $2/DEMOS/NET/HTTPD#FE1000
atftp $1 --put -l samplesrc/index.html -r $2/DEMOS/NET/INDEX.HTML#040000
# Apple 2 demos
echo "DEMOS/APPLE2/TILETEST"; atftp $1 --put -l rel/apple/TILETEST#FE1000 -r $2/DEMOS/APPLE2/TILETEST#FE1000
echo "DEMOS/APPLE2/HGRTEST"; atftp $1 --put -l rel/apple/HGRTEST#FE1000 -r $2/DEMOS/APPLE2/HGRTEST#FE1000
echo "DEMOS/APPLE2/GRTEST"; atftp $1 --put -l rel/apple/GRTEST#FE1000 -r $2/DEMOS/APPLE2/GRTEST#FE1000
echo "DEMOS/APPLE2/DGRTEST"; atftp $1 --put -l rel/apple/DGRTEST#FE1000 -r $2/DEMOS/APPLE2/DGRTEST#FE1000
# Spiders from Mars
echo "DEMOS/APPLE2/SPIDERS/SFM"; atftp $1 --put -l rel/apple/SFM#FE1000 -r $2/DEMOS/APPLE2/SPIDERS/SFM#FE1000
echo "DEMOS/APPLE2/SPIDERS/SFMSPRT"; atftp $1 --put -l rel/apple/SFMSPRT#FE1000 -r $2/DEMOS/APPLE2/SPIDERS/SFMSPRT#FE1000
# Arduino+SD card demos
echo "DEMOS/APPLE2/SDUTILS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/SPIPORT#FE1000
echo "DEMOS/APPLE2/SDUTILS/SDFAT"; atftp $1 --put -l rel/apple/SDFAT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/SDFAT#FE1000
echo "DEMOS/APPLE2/SDUTILS/FATCAT"; atftp $1 --put -l rel/apple/FATCAT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATCAT#FE1000
echo "DEMOS/APPLE2/SDUTILS/FATGET"; atftp $1 --put -l rel/apple/FATGET#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATGET#FE1000
echo "DEMOS/APPLE2/SDUTILS/FATPUT"; atftp $1 --put -l rel/apple/FATPUT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATPUT#FE1000
echo "DEMOS/APPLE2/SDUTILS/FATREADDSK"; atftp $1 --put -l rel/apple/FATREADDSK#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATREADDSK#FE1000
echo "DEMOS/APPLE2/SDUTILS/FATWRITEDSK"; atftp $1 --put -l rel/apple/FATWRITEDSK#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATWRITEDSK#FE1000

View File

@@ -11,4 +11,4 @@ echo "SYS/NEWDIR"; atftp $1 --put -l rel/apple/NEWDIR#FE1000 -r $2/SYS/NEWDIR#
echo "SYS/TYPE"; atftp $1 --put -l rel/apple/TYPE#FE1000 -r $2/SYS/TYPE#FE1000
echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r $2/SYS/MON#FE1000
echo "SYS/SOS"; atftp $1 --put -l rel/apple/SOS#FE1000 -r $2/SYS/SOS#FE1000
echo "SYS/ZIP"; atftp $1 --put -l rel/apple/ZIP#FE1000 -r $2/SYS/ZIP#FE1000
echo "SYS/ZIPCHIP"; atftp $1 --put -l rel/apple/ZIPCHIP#FE1000 -r $2/SYS/ZIPCHIP#FE1000

View File

@@ -1192,7 +1192,7 @@ def pastesel#0
fin
end
def indentsel#0
byte indentstr[MAXLNLEN+1], l
byte indentstr[MAXLNLEN+1], j, l
word firstsel, lastsel, i
freesel
@@ -1204,6 +1204,18 @@ def indentsel#0
indentstr[0] = l + 2
indentstr[1] = keyspace
indentstr[2] = keyspace
//
// Align indent
//
for j = 3 to indentstr[0]
if indentstr[j] <> keyspace
if j & 1 == 0
indentstr[0]--
memcpy(@indentstr + 1, @indentstr + 2, indentstr[0])
fin
break
fin
next
delstr(txtlinbuf=>[i])
txtlinbuf=>[i] = newstr(@indentstr)
flags = flags | changed
@@ -1527,7 +1539,7 @@ def prfiles(optpath)
byte firstblk
byte entrylen, entriesblk
byte i, type, len
word databuff, entry, filecnt
word databuff, entry
if ^optpath
strstripcpy(@path, optpath)
@@ -1542,37 +1554,31 @@ def prfiles(optpath)
return perr
fin
firstblk = 1
repeat
if fileio:read(refnum, databuff, 512) == 512
entry = databuff + 4
if firstblk
entrylen = databuff->$23
entriesblk = databuff->$24
filecnt = databuff=>$25
entry = entry + entrylen
fin
for i = firstblk to entriesblk
type = ^entry
if type <> 0
len = type & $0F
^entry = len
puts(entry)
if type & $F0 == $D0 // Is it a directory?
putc('/')
len++
fin
for len = 20 - len downto 1
putc(' ')
next
filecnt--
fin
entry = entry + entrylen
next
firstblk = 0
else
filecnt = 0
while fileio:read(refnum, databuff, 512) == 512
entry = databuff + 4
if firstblk
entrylen = databuff->$23
entriesblk = databuff->$24
entry = entry + entrylen
fin
until filecnt == 0
for i = firstblk to entriesblk
type = ^entry
if type <> 0
len = type & $0F
^entry = len
puts(entry)
if type & $F0 == $D0 // Is it a directory?
putc('/')
len++
fin
for len = 20 - len downto 1
putc(' ')
next
fin
entry = entry + entrylen
next
firstblk = 0
loop
fileio:close(refnum)
heaprelease(databuff)
putln
@@ -1609,7 +1615,7 @@ def cmdmode#0
word cmdptr, line
clrscrn
puts("PLASMA Editor, Version 2.0 DP2\n")
puts("PLASMA Editor, Version 2.0 DP4\n")
while not exit
puts(@filename)
cmdptr = gets($BA)

3173
src/toolsrc/forthtran.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -685,7 +685,7 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth)
}
return (cat_seq(codeseq, valseq));
}
t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
t_opseq *parse_subexpr(t_opseq *codeseq, int *stackdepth)
{
int prevmatch;
int matchop = 0;
@@ -744,7 +744,7 @@ t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
parse_error("AND must evaluate to single value");
tag_and = tag_new(BRANCH_TYPE);
codeseq = gen_brand(codeseq, tag_and);
codeseq = parse_expr(codeseq, &stackdepth1);
codeseq = parse_subexpr(codeseq, &stackdepth1);
if (stackdepth1 != *stackdepth)
parse_error("Inconsistent AND value counts");
codeseq = gen_codetag(codeseq, tag_and);
@@ -761,12 +761,24 @@ t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
parse_error("OR must evaluate to single value");
tag_or = tag_new(BRANCH_TYPE);
codeseq = gen_bror(codeseq, tag_or);
codeseq = parse_expr(codeseq, &stackdepth1);
codeseq = parse_subexpr(codeseq, &stackdepth1);
if (stackdepth1 != *stackdepth)
parse_error("Inconsistent AND value counts");
codeseq = gen_codetag(codeseq, tag_or);
}
else if (scantoken == TERNARY_TOKEN)
return (codeseq);
}
t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
{
int prevmatch;
int matchop = 0;
int optos = opsptr;
int i, valdepth;
int prevtype, type = 0;
t_opseq *valseq;
codeseq = parse_subexpr(codeseq, stackdepth);
if (scantoken == TERNARY_TOKEN)
{
int tag_else, tag_endtri;
int stackdepth1;
@@ -790,8 +802,7 @@ t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
codeseq = gen_codetag(codeseq, tag_endtri);
}
return (codeseq);
}
t_opseq *parse_set(t_opseq *codeseq)
}t_opseq *parse_set(t_opseq *codeseq)
{
char *setptr = tokenstr;
int lparms = 0, rparms = 0;

View File

@@ -493,7 +493,7 @@ def parse_value(codeseq, r_val)#2
fin
return cat_seq(codeseq, valseq), stackdepth
end
def parse_expr(codeseq)#2
def parse_subexpr(codeseq)#2
byte stackdepth, matchdepth, stkdepth1, prevmatch, matchop, i
word optos
word tag_else, tag_endop
@@ -530,17 +530,25 @@ def parse_expr(codeseq)#2
if stackdepth <> 1; exit_err(ERR_OVER|ERR_SYNTAX); fin
tag_endop = new_tag(RELATIVE_FIXUP)
codeseq = gen_oprel(codeseq, BRAND_CODE, tag_endop)
codeseq, stkdepth1 = parse_expr(codeseq)
codeseq, stkdepth1 = parse_subexpr(codeseq)
if stkdepth1 <> stackdepth; exit_err(ERR_INVAL|ERR_CODE); fin
codeseq = gen_ctag(codeseq, tag_endop)
elsif token == LOGIC_OR_TKN
if stackdepth <> 1; exit_err(ERR_OVER|ERR_SYNTAX); fin
tag_endop = new_tag(RELATIVE_FIXUP)
codeseq = gen_oprel(codeseq, BROR_CODE, tag_endop)
codeseq, stkdepth1 = parse_expr(codeseq)
codeseq, stkdepth1 = parse_subexpr(codeseq)
if stkdepth1 <> stackdepth; exit_err(ERR_INVAL|ERR_CODE); fin
codeseq = gen_ctag(codeseq, tag_endop)
elsif token == TERNARY_TKN
fin
return codeseq, stackdepth
end
def parse_expr(codeseq)#2
byte stackdepth, stkdepth1
word tag_else, tag_endop
codeseq, stackdepth = parse_subexpr(codeseq)
if token == TERNARY_TKN
if stackdepth <> 1; exit_err(ERR_OVER|ERR_SYNTAX); fin
tag_else = new_tag(RELATIVE_FIXUP)
tag_endop = new_tag(RELATIVE_FIXUP)

View File

@@ -507,7 +507,7 @@ include "toolsrc/parse.pla"
//
// Look at command line arguments and compile module
//
puts("PLASMA Compiler, Version 2.0 DP3\n")
puts("PLASMA Compiler, Version 2.0 DP4\n")
arg = argNext(argFirst)
if ^arg and ^(arg + 1) == '-'
opt = arg + 2

View File

@@ -89,7 +89,7 @@ def chkdstpath(dstfile)
//
// Check if copying into a directory
//
if dstfileinfo.file_type == $0F
if dstfileinfo.storage_type & $0D == $0D
if dstfile->[^dstfile] <> '/'
//
// Add path seperator
@@ -114,7 +114,7 @@ def copyfiles(srcfile, dstfile)#0
//
strcpy(@srcpath, srcfile)
wildname = 0
if fileio:getfileinfo(@srcpath, @srcfileinfo) <> FILE_ERR_OK or srcfileinfo.file_type <> $0F
if fileio:getfileinfo(@srcpath, @srcfileinfo) <> FILE_ERR_OK or (srcfileinfo.storage_type & $0D <> $0D)
filefrompath(@wildname, @srcpath)
srcpath = srcpath - wildname
fin

View File

@@ -19,6 +19,7 @@ end
def lock#0
^$C05A = $A5 // Lock regs
end
arg = argNext(argFirst)
if ^arg
when toupper(arg->[1])
@@ -43,6 +44,7 @@ clock = ^$C05D
state = ^$C05E
cache = ^$C05F
lock
^$C05F // AN3 off
puts("Status: $"); puth(status); putln
puts("Slots: $"); puth(slots); putln
puts("Clock: $"); puth(clock); putln

View File

@@ -369,7 +369,7 @@ def volumes#0
next
end
puts("TFTP Server Version 2.0 DP3\n")
puts("TFTP Server Version 2.0 DP4\n")
if !iNet:initIP()
return -1
fin

View File

@@ -52,7 +52,7 @@ byte perr, refauto
// String pool.
//
byte autorun[] = "AUTORUN"
byte verstr[] = "\nPLASMA DP3"
byte verstr[] = "\nPLASMA DP4"
byte freestr[] = "MEM FREE:$"
byte errorstr[] = "ERR:$"
byte prompt[] = "PLASMA"

View File

@@ -1172,7 +1172,7 @@ def catalog(path)#0
byte firstblk
byte entrylen, entriesblk
byte i, type, len
word entry, filecnt
word entry
if !^path
path = @prefix
@@ -1182,43 +1182,37 @@ def catalog(path)#0
return
fin
firstblk = 1
repeat
if read(refnum, heap, 512) == 512
entry = heap + 4
if firstblk
entrylen = heap->$23
entriesblk = heap->$24
filecnt = heap=>$25
entry = entry + entrylen
fin
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
prstr(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
cout(type)
for len = ^entry to 18
cout(' ')
next
filecnt--
fin
entry = entry + entrylen
next
firstblk = 0
else
filecnt = 0
while read(refnum, heap, 512) == 512
entry = heap + 4
if firstblk
entrylen = heap->$23
entriesblk = heap->$24 - 1
entry = entry + entrylen
fin
until !filecnt
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
prstr(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
cout(type)
for len = ^entry to 18
cout(' ')
next
fin
entry = entry + entrylen
next
firstblk = 0
loop
close(refnum)
crout()
end
@@ -1383,7 +1377,7 @@ heap = @lastdef
//
// Print PLASMA version
//
prstr("PLASMA 2.0 DP3 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
prstr("PLASMA 2.0 DP4 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
//
// Init symbol table.
//

View File

@@ -1237,7 +1237,7 @@ def catalog(path)#0
byte firstblk
byte entrylen, entriesblk
byte i, type, len
word entry, filecnt
word entry
if !^path
path = @prefix
@@ -1247,43 +1247,37 @@ def catalog(path)#0
return
fin
firstblk = 1
repeat
if read(refnum, heap, 512) == 512
entry = heap + 4
if firstblk
entrylen = heap->$23
entriesblk = heap->$24
filecnt = heap=>$25
entry = entry + entrylen
fin
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
prstr(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
cout(type)
for len = ^entry to 18
cout(' ')
next
filecnt--
fin
entry = entry + entrylen
next
firstblk = 0
else
filecnt = 0
while read(refnum, heap, 512) == 512
entry = heap + 4
if firstblk
entrylen = heap->$23
entriesblk = heap->$24 - 1
entry = entry + entrylen
fin
until !filecnt
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
prstr(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
cout(type)
for len = ^entry to 18
cout(' ')
next
fin
entry = entry + entrylen
next
firstblk = 0
loop
close(refnum)
crout()
end
@@ -1460,7 +1454,7 @@ heap = @lastdef
//
// Print PLASMA version
//
prstr("PLASMA 2.0 DP3 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
prstr("PLASMA 2.0 DP4 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
//
// Init symbol table.
//

View File

@@ -80,7 +80,7 @@ def catalog(path)#0
byte firstblk
byte entrylen, entriesblk
byte i, type, len
word entry, filecnt, catptr
word entry, catptr
if !^path
getpfx(path)
@@ -91,43 +91,37 @@ def catalog(path)#0
fin
catptr = heapmark
firstblk = 1
repeat
if cmdsys:sysread(refnum, catptr, 512) == 512
entry = catptr + 4
if firstblk
entrylen = catptr->$23
entriesblk = catptr->$24
filecnt = catptr=>$25
entry = entry + entrylen
fin
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
puts(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
putc(type)
for len = ^entry to 18
putc(' ')
next
filecnt--
fin
entry = entry + entrylen
next
firstblk = 0
else
filecnt = 0
while cmdsys:sysread(refnum, catptr, 512) == 512
entry = catptr + 4
if firstblk
entrylen = catptr->$23
entriesblk = catptr->$24 - 1
entry = entry + entrylen
fin
until filecnt == 0
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
puts(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
putc(type)
for len = ^entry to 18
putc(' ')
next
fin
entry = entry + entrylen
next
firstblk = 0
loop
cmdsys:sysclose(refnum)
putln()
end

View File

@@ -155,7 +155,7 @@ def catalog(path)#0
byte firstblk
byte entrylen, entriesblk
byte i, type, len
word entry, filecnt, catptr
word entry, catptr
if !^path
getpfx(path)
@@ -166,43 +166,37 @@ def catalog(path)#0
fin
catptr = heapmark
firstblk = 1
repeat
if cmdsys:sysread(refnum, catptr, 512) == 512
entry = catptr + 4
if firstblk
entrylen = catptr->$23
entriesblk = catptr->$24
filecnt = catptr=>$25
entry = entry + entrylen
fin
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
puts(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
putc(type)
for len = ^entry to 18
putc(' ')
next
filecnt--
fin
entry = entry + entrylen
next
firstblk = 0
else
filecnt = 0
while cmdsys:sysread(refnum, catptr, 512) == 512
entry = catptr + 4
if firstblk
entrylen = catptr->$23
entriesblk = catptr->$24 - 1
entry = entry + entrylen
fin
until filecnt == 0
for i = firstblk to entriesblk
if ^entry
^entry = ^entry & $0F
puts(entry)
type = ' '
when entry->$10
is $0F // Is it a directory?
type = '/'
break
is $FF // SYSTEM file
type = '-'
break
is $FE // REL file
type = '+'
wend
putc(type)
for len = ^entry to 18
putc(' ')
next
fin
entry = entry + entrylen
next
firstblk = 0
loop
cmdsys:sysclose(refnum)
putln()
end

View File

@@ -1263,7 +1263,7 @@ cmdlnptr = @cmdln
// Print PLASMA version
//
init_cons
prstr("PLASMA 2.0 DP3\n")//; putb(version.1); putc('.'); putb(version.0); putln
prstr("PLASMA 2.0 DP4\n")//; putb(version.1); putc('.'); putb(version.0); putln
prstr("MEM:$"); prword(availheap); crout
//
// Exec command line parser

View File

@@ -1286,7 +1286,7 @@ cmdlnptr = @cmdln
// Print PLASMA version
//
init_cons
prstr("PLASMA 2.0 DP3 JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln
prstr("PLASMA 2.0 DP4 JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln
prstr("MEM:$"); prword(availheap); crout
//
// Exec command line parser