10REM"
20REM"
30REM" CTR-D(0,2) CHANGE DRIVE
40REM" Frank Cox
50REM" Mailbox 252516647
60REM"
70*fx200 1
80MODE7
90HIMEM=&7800
100DIM cli 25,char$(30)
110ON ERROR GOTO1330
120PROCinit
130PROCintro
140PROChelp
150
160
170REPEAT
180PROCpos
190PROCget`char
200PROCcheck`edge
210IF G=7 AND GMODE=TRUE THEN GMODE=FA
LSE:VDU23;10,114,0;0;0;23;11,19,0;0;0;:E
LSE IF G=7:GMODE=TRUE:VDU23;10,104,0;0;0
;23;11,11,0;0;0;
220IF G=128 PROCload
230IF G=144 PROCsave
240IF G=23 G=0:PROCdeleteline
250IF G=26 G=0:PROCinsertline
260IF G=1 G=0:PROCdeletechar
270IF G=19 G=0:PROCinsertchar
275 IF G=4 THEN PROCdrive
280IF G=6 PROCfile
290IF HELP=1 PROChelp
300IF G=12 PROCcls
310IF GMODE THEN PROCgmode
320IF G>7 AND G<12 OR G=13 OR G>127 VD
U G
330IF VPOS=23 THEN VDU8
340UNTIL 0
350
360
370DEF PROCget`char
380*fx21 0
390G=GET
400IF INKEY(-42) G=10
410IF INKEY(-58) G=11
420IF INKEY(-26) G=8
430IF INKEY(-122) G=9
440IF G=139 G=0:HELP=1
450IF G=35 G=223
460IF G=95 G=224
470IF G=96 G=163
480IF G<128 AND G>31 THEN G=G+128
490ENDPROC
500
510
520DEF PROCinit
530*fx4 1
540*KEY0|!|K
550*KEY1|!|L
560*KEY2|!|M
570*KEY3|!|X
580*KEY4|!|Y
590*KEY5|!|Z
600*KEY6|!|½
610*KEY7|!|]
620*KEY8|!|^
630*KEY9|!|`
640FOR J%=0 TO 30:READ char$(J%):NEXT
650DATA alpha red,alpha green,alpha ye
llow,alpha blue,alpha magenta,alpha cyan
,alpha white,flash,steady
660DATA "","",normal height,double hei
ght,"","","",graphic red,graphic green,g
raphic yellow,graphic blue,graphic magen
ta,graphic cyan,graphic white
670DATA conceal display,contiguous gra
phics,seperated graphics,"",black backgr
ound,new background,hold graphics,releas
e graphics
680HELP=0:GMODE=0
690ENDPROC
700
710
720DEF PROCcheck`edge
730IF G=11 AND VPOS=0 THEN G=0
740IF G=10 AND VPOS=22 THEN G=0
750IF G=8 AND VPOS=0 AND POS=0 THEN G=
0
760IF G=9 AND VPOS=22 AND POS=39 THEN
G=0
770ENDPROC
780
790
800DEF PROCload
810*fx200 0 0
820VDU28,0,24,39,23
830PRINT" or ESCAPE
to cancel";:VDU13,11
840INPUT"LOAD Filename ? "N$
850$cli="LOAD "+N$+" 7C00"
860X%=cli MOD 256
870Y%=cli DIV 256
880CALL&FFF7
890CLS
900VDU26
910G=0
920*fx200 1 0
930ENDPROC
940
950
960DEF PROCsave
970*fx200 0 0
980VDU28,0,24,39,23
990PRINT" or ESCAPE
to cancel";:VDU13,11
1000INPUT"SAVE Filename ? "N$
1010$cli="SAVE "+N$+" 7C00 +398"
1020X%=cli MOD 256
1030Y%=cli DIV 256
1040CALL&FFF7
1050CLS
1060VDU26
1070G=0
1080*fx200 1 0
1090ENDPROC
1100
1110
1120DEF PROCpos
1130X=POS:Y=VPOS
1140A%=135:Q%=USR&FFF4
1150W%=(Q% AND &FF00)/256
1160VDU28,0,24,39,23
1170CLS
1180IF NOT GMODE PRINT"Cursor position"
;CHR$134;X;"/";Y;
1190IF GMODE PRINT"Cursor";CHR$134;X;"/
";Y;TAB(13);" G MODE ";
1200PRINTTAB(25);" f0 = help"
1210PRINT"Char.is";CHR$134;W%;" (&";÷W%
;")";CHR$135;TAB(18);"=";CHR$131;
1220code$=CHR$ W%
1230IF W%=160 OR W%=32 code$="space"
1240IF W%=255 code$=CHR$255+" <delete k
ey>"
1250IF W%>128 AND W%<160 code$=char$(W%
-129)
1260PRINTcode$;
1270VDU26
1280PRINTTAB(X,Y);
1290ENDPROC
1300
1310
1320REM Error routine
1330*fx200 0
1340VDU28,0,24,39,23:CLS
1350REPORT
1360IF ERR<>17 PRINT'" Press ESC
APE to continue";:REPEATUNTIL0
1370*fx200 1
1380VDU26:GOTO170
1390
1400
1410DEF PROChelp
1420X=POS:Y=VPOS
1430FOR I%=&7C00 TO &7F98 STEP4
1440!(I%-&400)=!I%
1450NEXT
1460PROCscript
1470FOR I%=&7C00 TO &7F98 STEP4
1480!I%=!(I%-&400)
1490NEXT
1500HELP=0
1510VDU26
1520PRINTTAB(X,Y);
1530ENDPROC
1540
1550
1560
1570DEF PROCgmode
1580IF G=241 OR G=209 VDU W% OR 160 EOR
1:VDU8
1590IF G=247 OR G=215 VDU W% OR 160 EOR
2:VDU8
1600IF G=225 OR G=193 VDU W% OR 160 EOR
4:VDU8
1610IF G=243 OR G=211 VDU W% OR 160 EOR
8:VDU8
1620IF G=250 OR G=218 VDU W% OR 160 EOR
16:VDU8
1630IF G=248 OR G=216 VDU W% OR 160 EOR
64:VDU8
1640IF G>7 AND G<12 OR G=13 OR G>127 AN
D G<160 VDU G
1650G=0:ENDPROC
1660DEF PROCscript
1670CLS
1680PRINT"
ppppppppp"
1690PRINTCHR$141;" TELETEXT SCRE
EN EDITOR "
1700PRINTCHR$141;" TELETEXT SCRE
EN EDITOR "
1710PRINT"
£££££££££"
1720PRINT" f0 calls this help pag
e"
1730PRINT" shift f0 LOAD a screen from
tape/disk"
1740PRINT" ctrl f0 SAVE a screen to ta
pe or disk"
1750PRINT"
,,,,,,,,,,"
1760PRINT"f1 normal height f8 hold g
raphics"
1770PRINT"f2 double height f9 releas
e graphics"
1780PRINT"f3 conceal"
1790PRINT"f4 contiguous graphics"
1800PRINT"f5 seperated graphics
,,,,,,,,,,"
1810PRINT"f6 black background shift
f8 flash"
1820PRINT"f7 new background shift
f9 steady"
1830PRINT"
,,,,,,,,,,"
1840PRINT" shift f1 f2 f3 f4 f5 f6 f7
alpha"
1850PRINT"
¶ "
1860PRINT" control f1 f2 f3 f4 f5 f6 f7
graphics"
1870PRINT"
,,,,,,,,,,"
1880PRINT" arrow keys move cursor arou
nd screen"
1890PRINT"
,,,,,,,,,,"
1900PRINT" DELETE key gives ¶ alpha &
graphics"
1910PRINT'" Press SPACE to conti
nue";
1920*fx21 0
1930REPEAT UNTIL GET=32
1940CLS
1950PRINT" TELETEXT S
CREEN EDITOR ";
1960PRINT" TELETEXT S
CREEN EDITOR ";
1970PRINT" ctrl W delete line"'" Line
cursor is on is deleted. Rest of"'" page
moves up."
1980PRINT"
,,,,,,,,,,"
1990PRINT" ctrl Z insert line"'" Lines
from cursor position to bottom"'" of sc
reen move down creating a blank"'" line.
Bottom line is lost."
2000PRINT"
,,,,,,,,,,"
2010PRINT" ctrl A delete character"'"
Character at cursor is deleted. Rest"'"
of line moves left to close gap."
2020PRINT"
,,,,,,,,,,"
2030PRINT" ctrl S insert character"'"
Line is moved to the right from cursor"'
" position to end of line creating a"'"
space. Last character on line is lost."
2040PRINT"
,,,,,,,,,,"
2050PRINT" ctrl L clear screen"
2060PRINT"
,,,,,,,,,,"
2070PRINT" ctrl F catalogue drive "
2080PRINT"
,,,,,,,,,,"
2090PRINT" press SPACE to contin
ue
2100REPEAT UNTIL GET=32
2110CLS
2120PRINT"
ppppppppp"
2130PRINTCHR$141;" TELETEXT SCRE
EN EDITOR "
2140PRINTCHR$141;" TELETEXT SCRE
EN EDITOR "
2150PRINT"
£££££££££"
2160PRINT" ctrl G enters or exits G
MODE "
2170PRINT'" Note the layout of the Q
W"
2180PRINT" A S
"
2190PRINT" Z X
keys."
2200PRINT'" When in G MODE these six k
eys are used";
2210PRINT" to set or clear the correspo
nding pixel";
2220PRINT" of the character at the curr
ent cursor"
2230PRINT" position.(Provided of course
that there";
2240PRINT" is a graphic code earlier on
the line).";
2250PRINT" This saves having to keep l
ooking up"
2260PRINT" which character gives the de
sired pixel";
2270PRINT" pattern."
2280PRINT" Although when in G MODE mos
t of the"," keyboard is disabled, the cu
rsor keys,"," function keys and control
codes still"," work as previously descri
bed."
2290PRINT''" Press SPACE to cont
inue";
2300*fx21 0
2310REPEAT UNTIL GET=32
2320ENDPROC
2330
2340
2350DEF PROCintro
2360PRINTCHR$141;" TELETEXT SCRE
EN EDITOR "
2370PRINTCHR$141;" TELETEXT SCRE
EN EDITOR "
2380PRINT" This program is designed to
simplify"," the creation of teletext gr
aphics "," screens. Completed screens ca
n be saved";" to tape or disk and later
reloaded or"," used in your own programs
."
2390PRINT" Frames saved by the Microne
t software"," can be loaded and examined
or modified."
2400PRINT" The program assumes a basic
knowledge"," of what effect the various
teletext"," control codes have on the d
isplay."
2410PRINT'" The bottom line of the scr
een shows "," the character at the curre
nt cursor"," position. This is particula
rly useful "
2420PRINT" for finding the position of
non "," printing control codes amongst d
ense"," graphics."
2430PRINT'" It is suggested that a fun
ction key "," strip is made up from the
information"," on the next page."
2440PRINT" Press SPACE to conti
nue";
2450REPEATUNTIL GET=32
2460CLS
2470ENDPROC
2480
2490
2500DEF PROCinsertline
2510cpos=VPOS*40+&7C00
2520FOR I%=&7F48 TO cpos STEP-40
2530FOR J%=I% TO I%+39 STEP4
2540!(J%+40)=!J%
2550NEXT:NEXT
2560FOR I%=cpos TO cpos+39:?I%=160:NEXT
2570ENDPROC
2580
2590
2600DEF PROCdeleteline
2610cpos=VPOS*40+&7C00
2620FOR I%=cpos TO &7F48 STEP40
2630FOR J%=I% TO I%+39 STEP4
2640!J%=!(J%+40)
2650NEXT:NEXT
2660FORI%=&7F70 TO &7F97:?I%=160:NEXT
2670ENDPROC
2680
2690
2700DEF PROCinsertchar
2710cpos=VPOS*40+&7C00
2720ppos=cpos+POS
2730FOR I%=cpos+39 TO ppos STEP-1
2740?I%=?(I%-1)
2750NEXT
2760?ppos=160
2770ENDPROC
2780
2790
2800DEF PROCdeletechar
2810cpos=VPOS*40+&7C00
2820ppos=cpos+POS
2830FOR I%=ppos TO cpos+38
2840?I%=?(I%+1)
2850NEXT
2860?(cpos+39)=160
2870ENDPROC
2880
2890
2900DEF PROCcls
2910X=POS:Y=VPOS
2920VDU28,0,24,39,23
2930CLS
2940PRINT'" CLEAR SCREEN are you sur
e? (Y/N) ";
2950G$=GET$
2960IF G$="Y" OR G$="y" THEN VDU26:CLS:
ELSE VDU26:PRINTTAB(X,Y);
2970ENDPROC
2980
2990
3000DEF PROCfile
3030CLS
3040*.
3060G=GET
3070CLS
3120ENDPROC
3130:
3140DEF PROCdrive
3150REPEAT:G$=GET$:UNTILINSTR("02",G$)
3160OSCLI("DRIVE "+G$)
3170ENDPROC