mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-02-03 07:34:11 +00:00
Merge branch 'master' of https://github.com/dschmenk/PLASMA
This commit is contained in:
commit
b5098afbce
@ -1 +0,0 @@
|
||||
theme: jekyll-theme-hacker
|
BIN
images/apple/PLASMA.2mg
Normal file
BIN
images/apple/PLASMA.2mg
Normal file
Binary file not shown.
@ -19,6 +19,7 @@ JITUNE = rel/apple/JITUNE\#FE1000
|
||||
SOS = rel/apple/SOS\#FE1000
|
||||
ROD = rel/ROD\#FE1000
|
||||
SIEVE = rel/SIEVE\#FE1000
|
||||
PRIMEGAP = rel/PRIMEGAP\#FE1000
|
||||
ARGS = rel/ARGS\#FE1000
|
||||
SPIPORT = rel/apple/SPIPORT\#FE1000
|
||||
SDFAT = rel/apple/SDFAT\#FE1000
|
||||
@ -85,7 +86,7 @@ TXTTYPE = .TXT
|
||||
#SYSTYPE = \#FF2000
|
||||
#TXTTYPE = \#040000
|
||||
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
|
||||
-rm vmsrc/plvmzp.inc
|
||||
|
||||
c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64)
|
||||
@ -243,6 +244,10 @@ $(SIEVE): samplesrc/sieve.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMW < samplesrc/sieve.pla > samplesrc/sieve.a
|
||||
acme --setpc 4094 -o $(SIEVE) samplesrc/sieve.a
|
||||
|
||||
$(PRIMEGAP): samplesrc/primegap.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMW < samplesrc/primegap.pla > samplesrc/primegap.a
|
||||
acme --setpc 4094 -o $(PRIMEGAP) samplesrc/primegap.a
|
||||
|
||||
$(SANE): libsrc/sane.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/sane.pla > libsrc/sane.a
|
||||
acme --setpc 4094 -o $(SANE) libsrc/sane.a
|
||||
|
@ -56,6 +56,7 @@ cp rel/apple/DGRTEST#FE1000 prodos/demos/DGRTEST.REL
|
||||
cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL
|
||||
cp rel/LZ4CAT#FE1000 prodos/demos/LZ4CAT.REL
|
||||
cp rel/ROD#FE1000 prodos/demos/ROD.REL
|
||||
cp rel/PRIMEGAP#FE1000 prodos/demos/PRIMEGAP.REL
|
||||
|
||||
mkdir prodos/demos/rogue
|
||||
cp rel/ROGUE#FE1000 prodos/demos/rogue/ROGUE.REL
|
||||
|
41
src/samplesrc/primegap.pla
Normal file
41
src/samplesrc/primegap.pla
Normal file
@ -0,0 +1,41 @@
|
||||
include "inc/cmdsys.plh"
|
||||
|
||||
var a, b, i,loprim,hiprim
|
||||
|
||||
def getnum
|
||||
var str, num
|
||||
num = 0
|
||||
str = gets(':'|$80) + 1
|
||||
while ^str >= '0' and ^str <= '9'
|
||||
num = num * 10 + (^str - '0')
|
||||
str++
|
||||
loop
|
||||
return num
|
||||
end
|
||||
|
||||
def prim(x)
|
||||
var i
|
||||
i = 3
|
||||
while i*i < x and x % i; i = i + 2; loop
|
||||
return x < i*i
|
||||
end
|
||||
|
||||
puts("Geben Sie den oberen Grenzwert ein")
|
||||
a = getnum
|
||||
puts("Geben Sie die minimale Differenz ein")
|
||||
b = getnum
|
||||
loprim, hiprim, i = 1, 1, 3
|
||||
while i <= a and hiprim-loprim < b
|
||||
if prim(i)
|
||||
loprim = hiprim
|
||||
hiprim = i
|
||||
fin
|
||||
i = i + 2
|
||||
loop
|
||||
if hiprim-loprim < b
|
||||
puts("keine Loesung gefunden !")
|
||||
else
|
||||
puti(hiprim); putc(' '); puti(loprim); putc(' '); puti(hiprim-loprim)
|
||||
fin
|
||||
putln
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user