Zed Text

Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10211 – 10251.

Gallery

Zed Text

Source Code

  10 DIM F(26)
  20 LET F(1)=2000
  30 LET F(3)=2200
  40 LET F(4)=2500
  50 LET F(6)=2600
  55 LET F(9)=3670
  60 LET F(10)=2800
  70 LET F(11)=3000
  80 RAND F(12)=3000
  90 LET F(13)=3100
 100 LET F(16)=3300
 110 LET F(18)=3500
 120 LET F(19)=3600
 130 LET F(20)=3800
 140 LET F(24)=3900
 150 LET F(26)=4000
 200 LET T$=""
 210 LET CI=0
 220 LET CPN=1
 230 LET XC=0
 235 GOTO 3670
1000 REM %M%A%C%R%O% %D%E%C%O%D%E
1010 LET D=0
1020 LET I=1
1025 FAST 
1030 INPUT M$
1040 LET L=LEN M$
1050 IF M$(L)<>"""" THEN LET M$=M$+""""
1060 LET L=LEN M$
1070 LET A=CODE M$(I)
1080 IF A>=38 AND A<=63 THEN GOTO 1110
1090 LET I=I+1
1100 GOTO 1070
1110 LET I0=I
1120 LET K$=M$(I)
1130 IF I0=D+1 THEN LET N=0
1140 IF I0<>D+1 THEN LET N=VAL M$(D+1 TO I0-1)
1150 LET I=I+1
1160 IF M$(I)<>"""" THEN GOTO 1150
1180 LET D=I
1190 LET W$=M$(I0+1 TO D-1)
1200 GOSUB F(CODE K$-37)
1210 IF I=L THEN GOTO 1000
1220 LET I=I+1
1230 GOTO 1070
2000 REM %A%P%P%E%N%D
2010 IF N=0 THEN LET N=1
2020 LET U$=""
2030 FOR Q=1 TO N
2040 LET U$=U$+W$
2050 NEXT Q
2060 IF CI=0 THEN GOTO 2110
2070 IF CI=LEN T$ THEN GOTO 2130
2080 IF CI>0 AND CI<LEN T$ THEN LET T$=T$( TO CI)+U$+T$(CI+1 TO )
2090 LET CI=CI+LEN U$
2100 RETURN 
2110 LET T$=U$+T$
2120 GOTO 2090
2130 LET T$=T$+U$
2140 GOTO 2090
2200 REM %C%U%R%S%O%R
2210 IF W$="0" THEN GOTO 2360
2215 IF W$="1" THEN GOTO 2380
2220 LET CI=CI+N
2230 IF CI>LEN T$ THEN LET CI=LEN T$
2240 IF CI<=0 THEN GOTO 2360
2250 LET PN=INT ((CI-1)/640)
2255 IF PN<>CPN-1 THEN RETURN 
2260 LET CP=CI-640*PN
2270 LET LN=INT ((CP-1)/32)
2280 LET CN=CP-32*LN-1
2290 LET J=CODE T$(CI)+128
2300 IF J>=256 THEN LET J=J-256
2310 FOR Y=1 TO 10
2320 PRINT AT LN,CN;T$(CI)
2330 PRINT AT LN,CN;CHR$ J
2340 NEXT Y
2350 RETURN 
2360 LET CI=640*(CPN-1)
2370 RETURN 
2380 LET CI=LEN T$
2390 RETURN 
2500 REM %D%E%L%E%T%E
2510 IF N=0 THEN LET N=1
2520 LET L0=LEN T$
2530 IF CI<=1 AND N>=L0 THEN LET T$=""
2540 IF CI<=1 AND N<L0 THEN LET T$=T$(N+1 TO )
2550 IF CI>1 AND CI+N-1>=L0 THEN LET T$=T$( TO CI-1)
2560 IF CI>1 AND CI+N-1<L0 THEN LET T$=T$( TO CI-1)+T$(CI+N TO )
2570 LET N=-1
2580 GOSUB 2200
2590 RETURN 
2800 REM %J%U%S%T%I%F%Y
2810 LET CI=1
2820 IF CI+31>LEN T$ THEN RETURN 
2830 LET V$=T$(CI+31)
2835 IF CI+32>LEN T$ THEN RETURN 
2840 IF T$(CI+32)=" " THEN LET T$=T$( TO CI+31)+T$(CI+33 TO )
2850 LET I2=32
2860 IF V$(I2)=" " THEN GOTO 2920
2870 LET I2=I2-1
2880 IF I2=0 THEN GOTO 2900
2890 GOTO 2860
2900 LET CI=CI+32
2910 GOTO 2820
2920 DIM H$(32)
2930 LET H$=V$( TO I2)
2940 LET T$=T$( TO CI-1)+H$+T$(CI+I2 TO )
2950 LET CI=CI+32
2960 GOTO 2820
3000 REM %K% %A%N%D% %L
3005 CLS 
3010 IF W$="" THEN LET N=1
3015 IF W$<>"" THEN LET N=VAL W$
3020 LIST N
3025 RETURN 
3100 REM %M%E%M%O%R%Y
3110 CLS 
3120 PRINT AT 5,0;"SPACE FOR TEXT IS ";
3130 PRINT PEEK 16386+256*PEEK 16387-PEEK 16412-256*PEEK 16413;
3140 PRINT " BYTES"
3150 RETURN 
3300 REM %P%R%I%N%T
3310 CLS 
3315 SLOW 
3320 IF N=0 THEN LET N=CPN
3330 LET CPN=N
3340 LET H=640*N
3350 IF LEN T$<H THEN LET H=LEN T$
3360 PRINT T$(640*N-639 TO H)
3370 PRINT AT 21,0;"PAGE ";CPN
3375 LET N=0
3380 GOSUB 2200
3390 RETURN 
3500 REM %R%E%S%E%T
3510 RUN 
3520 RETURN 
3600 REM %S%A%V%E
3610 CLS 
3620 PRINT "%S%A%V%E"
3630 PRINT 
3635 PRINT "INPUT PROGRAM NAME, DEFAULT NAME IS ""%T"""
3640 PRINT 
3645 PRINT "START TAPE PLAYER"
3650 INPUT V$
3655 IF V$="" THEN LET V$="T"
3660 SAVE V$
3665 GOTO 10
3670 CLS 
3680 PRINT "\##\##\##\## \ .\''\''\.     \:  \:    \.'\''\'. \'.  \.' \ :   "
3681 PRINT "  \,,\## \:.\..\..\.: \.'\''\'.\: \''\:'\''\''\ :\..\..\..\:  \'.\.' \ '\':\''\''\' "
3682 PRINT " \,,\##\~~ \:   \ .\ :   \:  \:  \ .\ :   \.  \.'\'.  \ :  \. "
3683 PRINT "\,,\##\~~  \ '\..\..\'  \'.\..\.'\:  \ '\..\'  \'.\..\.' \.'  \'.  \'.\.'"
3684 PRINT "\##\~~"
3685 PRINT "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
3686 PRINT 
3687 PRINT 
3690 PRINT "A  APPEND        C  CURSOR"
3691 PRINT 
3692 PRINT "D  DELETE        I  INFO (MENU)"
3693 PRINT 
3694 PRINT "J  JUSTIFY       M  MEMORY TEST"
3695 PRINT 
3696 PRINT "P  PRINT         R  RESET"
3697 PRINT 
3698 PRINT "S  SAVE          T  TEST"
3699 PRINT 
3700 PRINT "X  EXECUTE * N   Z  STOP"
3710 GOTO 1000
3800 REM %T%E%S%T
3810 LET T$="TO       SEE A WORLD IN A GRAIN OF SAND AND A HEAVEN IN A WILD FLOWER, HOLD INFINITY IN THE PALM OF YOUR HAND AND ETERNITY IN AN HOUR."
3820 RETURN 
3900 REM %M%U%L%T%I%P%L%E% %E%X%E%C%U%T%I%O%N% %X
3910 IF XC=N-1 OR N<=1 THEN GOTO 3960
3920 LET XC=XC+1
3930 LET D=0
3940 LET I=1
3950 GOTO 1040
3960 LET XC=0
3970 RETURN 
4000 REM %S%T%O%P
4010 STOP 
4020 CLEAR 
4030 SAVE "1024%4"
4040 RUN 

People

No people associated with this content.

Scroll to Top