10 REM "MEMORY-EDIT" Ch.W.Brederode,
LISSE 1988, The Netherlands
15 REM This is Public Domain.
20 MODE6:HIMEM=&2800:DIM C%(15)
30 ONERROR GOTO 700
40 PRINT'" MEMORY-EDIT"'" ===========
"''
50 PRINT" You can draw 32 pictures fo
r MEMORY."'
70 PRINT" Choose colours with 0123456
789ABCDEF"
80 PRINT" Use the cursor-keys for edi
ting and"
90 PRINT" press the spacebar."'
100 PRINT" You can move the = below th
e pictures"
110 PRINT" with the < or > (use SHIFT)
to where"
120 PRINT" you want it to be saved and
AFTER that"
130 PRINT" press CTRL/S. CTRL/L = read
back for"
140 PRINT" changes. STOP WITH ESCAPE."
'
150 PRINT" When ready with editing sav
e it by"
160 PRINT" *SAVE MEMKRT 2800 +800"'
170 PRINT" Press any key...";
180 Q=GET
190 MODE2:HIMEM=&2800:Z%=HIMEM:*FX4,1
191 *LO.MEMKRT
192 PRINTTAB(11,3);
193 FOR N=1 TO 7:COLOUR N:PRINTCHR$(48
+N); :NEXT
194 PRINTTAB(11,5)"BLACK=0"
200 C%=7:PRINTTAB(11,1)"colour "
210 PL=0:I%=2:J%=21:PRINTTAB(I%,J%)"="
220 REM --- kleurentabel ---
230 FOR N=0 TO 15:READ A%:C%(N)=A%:NEX
T
240 DATA 0,1,4,5,16,17,20,21,64,65,68,
69,80,81,84,85
250 REM --- tekenblokje ---
260 VDU23,240,255,255,255,255,255,255,
255,255
270 REM --- tekenveld ---
280 MOVE50,1000:DRAW586,1000:DRAW586,4
68:DRAW50,468:DRAW50,1000
290 P%=&3000+19*640+2*32:M%=&2800
300 REM --- display 32 figuren ---
310 PROCdisplay
320 X%=1:Y%=1
330 REM --- cursor ---
335 REPEAT PRINTTAB(17,1);C%;" "
340 PRINTTAB(X%,Y%);:Q=GET
350 IF Q=19 PROCcodeer:PROCwis:UNTIL F
ALSE
355 IF Q=12 PROClees::UNTIL FALSE
360 IF Q>47 AND Q<58 C%=Q-48:UNTILFALS
E
370 IF Q>64 AND Q<71 C%=Q-55:UNTILFALS
E
380 IF Q=60 OR Q=62 PROCkies:UNTILFALS
E
390 IF Q=136 X%=X%-1-(X%=1) :UNTILFALS
E
400 IF Q=137 X%=X%+1+(X%=8) :UNTILFALS
E
410 IF Q=138 Y%=Y%+1+(Y%=16):UNTILFALS
E
420 IF Q=139 Y%=Y%-1-(Y%=1) :UNTILFALS
E
430 COLOURC%:PRINTCHR$(240):COLOUR7
440 UNTILFALSE
450DEFPROCcodeer
460 U%=96:V%=976
470 FOR E%=0 TO 1:FOR F%=0 TO 3:FOR G%
=0 TO 7
480 W%=0:FOR H%=0 TO 1
490 S%=U%+128*F%+64*H%:T%=976-256*E%-3
2*G%
500 Q%=POINT(S%,T%):W%=W%+C%(Q%)*(2+(H
%=1))
510 NEXT:?Z%=W%:Z%=Z%+1:NEXT:NEXT:NEXT
520 PROCdisplay
529 Z%=&2800+PL*64:Q=62:PROCkies
530 ENDPROC
531DEFPROClees
532 LOCAL L%,E%,F%,G%,U%,V%,R%
533 X%=1:Y%=1:L%=Z%
534 FOR E%=0 TO 1:FOR F%=0 TO 3:FOR G%
=0 TO 7
535 U%=X%+2*F%:V%=Y%+8*E%+G%:PRINTTAB(
U%,V%);
536 R%=?L%AND170:C%=(R%AND128)/16+(R%A
ND32)/8+(R%AND8)/4+(R%AND2)/2
537 COLOURC%:VDU240
538 R%=?L%AND85 :C%=(R%AND64)/8+(R%AND
16)/4+(R%AND4)/2+(R%AND1)
539 COLOURC%:VDU240
540 L%=L%+1:NEXT:NEXT:NEXT:C%=7:COLOUR
C%
549 ENDPROC
550DEFPROCdisplay
560 FOR NR=1 TO 32:T%=NR-1:U%=T%MOD8:V
%=T%DIV8:L%=M%+T%*64
570 Q%=P%+64*U%+1920*V%:FOR N%=0TO31:Q
%?N%=L%?N%:NEXT
580 L%=L%+32:Q%=Q%+640:FOR N%=0TO31:Q%
?N%=L%?N%:NEXT:NEXT
590 ENDPROC
600DEFPROCwis
610 FOR M=1 TO 16:PRINTTAB(1,M)"
":NEXT
620 ENDPROC
630DEFPROCkies
640 PRINTTAB(I%,J%)" "
650 IF Q=62 AND PL<31 PL=PL+1:Z%=Z%+64
660 IF Q=60 AND PL>0 PL=PL-1:Z%=Z%-64
670 I%=2+(PL MOD8)*2:J%=21+(PL DIV8)*3
680 PRINTTAB(I%,J%)"="
690 ENDPROC
700 *FX4