Home » Personal collection » Acorn hard disk » misc » misc3 » eug_titles/PT4/EDITOR
eug_titles/PT4/EDITOR
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn hard disk » misc » misc3 |
Filename: | eug_titles/PT4/EDITOR |
Read OK: | ✔ |
File size: | 060A bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Personal collection » Acorn ADFS disks » Electron » EUG_submission.ADF » PT4/EDITOR
- Personal collection » Acorn hard disk » misc » misc3 » eug_titles/PT4/EDITOR
File contents
10 REM Multi-colour User Defined Char Editor by Dominic Ford 1998 20 : 30 REM (C) Dominic Ford 1998 for EUG 40 : 50 MODE2:HIMEM=&2C00:ch=0:xp=0:yp=0:DIMs%(15,15) 60 REM Clear char memory 70 FORm=&2C00TO&2FFFSTEP4:!m=0:NEXT 80 REM Start main loop - draw char 90 REPEAT PROCgetsp 100 REPEAT COLOUR -7*(s%(xp,yp)=0):COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)"X"; 110 REM Get key and process it 120 A$=GET$:IF A$="+" AND ch<>31 THEN ch=ch+1:UNTILTRUE:UNTILFALSE 130 IF A$="-" AND ch<>0 THEN ch=ch-1:UNTILTRUE:UNTILFALSE 140 REM Cursor movement 150 IF A$="Z" AND xp<>0 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:xp=xp-1:UNTIL FALSE 160 IF A$="X" AND xp<>7 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:xp=xp+1:UNTIL FALSE 170 IF A$=":" AND yp<>0 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:yp=yp-1:UNTIL FALSE 180 IF A$="/" AND yp<>7 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:yp=yp+1:UNTIL FALSE 190 REM Is a letter A-H being used to set colour? 200 IF ASC(A$)>64 AND ASC(A$)<73 THEN PROCsetc 210 REM Load or Save 220 IF A$="S" THEN COLOUR128:CLS:INPUT"Filename";f$:OSCLI"SAVE "+f$+" 2C00 3000":CLS:UNTIL TRUE:UNTIL FALSE 230 IF A$="L" THEN COLOUR128:CLS:INPUT"Filename";f$:OSCLI"LOAD "+f$+" 2C00":CLS:UNTIL TRUE:UNTIL FALSE 240 REM Using fast forward/reverse keys 250 IF ASC(A$)>47 AND ASC(A$)<58 THENch=3*(ASC(A$)-48):UNTILTRUE:UNTILFALSE 260 UNTIL FALSE 270 : 280 REM Draw character from memory 290 DEFPROCgetsp:FORy=0TO7:FORx=0TO7:ad=&2C00+&20*ch+8*(x DIV 2)+(y MOD 8) 300IF(x MOD 2)=1THENc=(?ad)AND21ELSEc=((?ad)AND42)/2 310c=(c AND 1)+(c AND 4)/2+(c AND 16)/4:s%(x,y)=c:COLOUR 128+c:PRINTTAB(x+1,y+1)" ";:NEXT, 320 COLOUR7:COLOUR128:PRINTTAB(0,30)"Character: ";~ch 330ENDPROC 340 : 350 REM Set pixel (x,y) to colour defined by key press A$ 360DEFPROCsetc:CS=ASC(A$)-65:CS=(CS AND 1)+2*(CS AND 2)+4*(CS AND 4):IF(xp MOD 2)=0 THEN CS=2*CS:ND=&D5 ELSE ND=&EA 370ad=&2C00+&20*ch+8*(xp DIV 2)+(yp MOD 8) 380 ?ad=((?ad) AND ND)+CS:s%(xp,yp)=ASC(A$)-65:ENDPROC
J � Multi-colour User Defined Char Editor by Dominic Ford 1998 : $ � (C) Dominic Ford 1998 for EUG ( : 2) �2:�=&2C00:ch=0:xp=0:yp=0:�s%(15,15) < � Clear char memory F �m=&2C00�&2FFF�4:!m=0:� P" � Start main loop - draw char Z � �getsp d9 � � -7*(s%(xp,yp)=0):�128+s%(xp,yp):�xp+1,yp+1)"X"; n � Get key and process it x+ A$=�:� A$="+" � ch<>31 � ch=ch+1:��:�� �% � A$="-" � ch<>0 � ch=ch-1:��:�� � � Cursor movement �C � A$="Z" � xp<>0 � �128+s%(xp,yp):�xp+1,yp+1)" ";:xp=xp-1:� � �C � A$="X" � xp<>7 � �128+s%(xp,yp):�xp+1,yp+1)" ";:xp=xp+1:� � �C � A$=":" � yp<>0 � �128+s%(xp,yp):�xp+1,yp+1)" ";:yp=yp-1:� � �C � A$="/" � yp<>7 � �128+s%(xp,yp):�xp+1,yp+1)" ";:yp=yp+1:� � �0 � Is a letter A-H being used to set colour? �" � �(A$)>64 � �(A$)<73 � �setc � � Load or Save �H � A$="S" � �128:�:�"Filename";f$:�"SAVE "+f$+" 2C00 3000":�:� �:� � �C � A$="L" � �128:�:�"Filename";f$:�"LOAD "+f$+" 2C00":�:� �:� � �& � Using fast forward/reverse keys �1 � �(A$)>47 � �(A$)<58 �ch=3*(�(A$)-48):��:�� � � : ! � Draw character from memory "< ��getsp:�y=0�7:�x=0�7:ad=&2C00+&20*ch+8*(x � 2)+(y � 8) ,(�(x � 2)=1�c=(?ad)�21�c=((?ad)�42)/2 6Fc=(c � 1)+(c � 4)/2+(c � 16)/4:s%(x,y)=c:� 128+c:�x+1,y+1)" ";:�, @% �7:�128:�0,30)"Character: ";~ch J� T : ^8 � Set pixel (x,y) to colour defined by key press A$ h^��setc:CS=�(A$)-65:CS=(CS � 1)+2*(CS � 2)+4*(CS � 4):�(xp � 2)=0 � CS=2*CS:ND=&D5 � ND=&EA r'ad=&2C00+&20*ch+8*(xp � 2)+(yp � 8) |- ?ad=((?ad) � ND)+CS:s%(xp,yp)=�(A$)-65:� �
00000000 0d 00 0a 4a 20 f4 20 4d 75 6c 74 69 2d 63 6f 6c |...J . Multi-col| 00000010 6f 75 72 20 55 73 65 72 20 44 65 66 69 6e 65 64 |our User Defined| 00000020 20 43 68 61 72 20 20 20 20 20 20 20 20 20 20 45 | Char E| 00000030 64 69 74 6f 72 20 62 79 20 44 6f 6d 69 6e 69 63 |ditor by Dominic| 00000040 20 46 6f 72 64 20 31 39 39 38 0d 00 14 06 20 3a | Ford 1998.... :| 00000050 0d 00 1e 24 20 f4 20 28 43 29 20 44 6f 6d 69 6e |...$ . (C) Domin| 00000060 69 63 20 46 6f 72 64 20 31 39 39 38 20 66 6f 72 |ic Ford 1998 for| 00000070 20 45 55 47 0d 00 28 06 20 3a 0d 00 32 29 20 eb | EUG..(. :..2) .| 00000080 32 3a d3 3d 26 32 43 30 30 3a 63 68 3d 30 3a 78 |2:.=&2C00:ch=0:x| 00000090 70 3d 30 3a 79 70 3d 30 3a de 73 25 28 31 35 2c |p=0:yp=0:.s%(15,| 000000a0 31 35 29 0d 00 3c 18 20 f4 20 43 6c 65 61 72 20 |15)..<. . Clear | 000000b0 63 68 61 72 20 6d 65 6d 6f 72 79 0d 00 46 1c 20 |char memory..F. | 000000c0 e3 6d 3d 26 32 43 30 30 b8 26 32 46 46 46 88 34 |.m=&2C00.&2FFF.4| 000000d0 3a 21 6d 3d 30 3a ed 0d 00 50 22 20 f4 20 53 74 |:!m=0:...P" . St| 000000e0 61 72 74 20 6d 61 69 6e 20 6c 6f 6f 70 20 2d 20 |art main loop - | 000000f0 64 72 61 77 20 63 68 61 72 0d 00 5a 0d 20 f5 20 |draw char..Z. . | 00000100 f2 67 65 74 73 70 0d 00 64 39 20 f5 20 fb 20 2d |.getsp..d9 . . -| 00000110 37 2a 28 73 25 28 78 70 2c 79 70 29 3d 30 29 3a |7*(s%(xp,yp)=0):| 00000120 fb 31 32 38 2b 73 25 28 78 70 2c 79 70 29 3a f1 |.128+s%(xp,yp):.| 00000130 8a 78 70 2b 31 2c 79 70 2b 31 29 22 58 22 3b 0d |.xp+1,yp+1)"X";.| 00000140 00 6e 1d 20 f4 20 47 65 74 20 6b 65 79 20 61 6e |.n. . Get key an| 00000150 64 20 70 72 6f 63 65 73 73 20 69 74 0d 00 78 2b |d process it..x+| 00000160 20 41 24 3d be 3a e7 20 41 24 3d 22 2b 22 20 80 | A$=.:. A$="+" .| 00000170 20 63 68 3c 3e 33 31 20 8c 20 63 68 3d 63 68 2b | ch<>31 . ch=ch+| 00000180 31 3a fd b9 3a fd a3 0d 00 82 25 20 e7 20 41 24 |1:..:.....% . A$| 00000190 3d 22 2d 22 20 80 20 63 68 3c 3e 30 20 8c 20 63 |="-" . ch<>0 . c| 000001a0 68 3d 63 68 2d 31 3a fd b9 3a fd a3 0d 00 8c 16 |h=ch-1:..:......| 000001b0 20 f4 20 43 75 72 73 6f 72 20 6d 6f 76 65 6d 65 | . Cursor moveme| 000001c0 6e 74 0d 00 96 43 20 e7 20 41 24 3d 22 5a 22 20 |nt...C . A$="Z" | 000001d0 80 20 78 70 3c 3e 30 20 8c 20 fb 31 32 38 2b 73 |. xp<>0 . .128+s| 000001e0 25 28 78 70 2c 79 70 29 3a f1 8a 78 70 2b 31 2c |%(xp,yp):..xp+1,| 000001f0 79 70 2b 31 29 22 20 22 3b 3a 78 70 3d 78 70 2d |yp+1)" ";:xp=xp-| 00000200 31 3a fd 20 a3 0d 00 a0 43 20 e7 20 41 24 3d 22 |1:. ....C . A$="| 00000210 58 22 20 80 20 78 70 3c 3e 37 20 8c 20 fb 31 32 |X" . xp<>7 . .12| 00000220 38 2b 73 25 28 78 70 2c 79 70 29 3a f1 8a 78 70 |8+s%(xp,yp):..xp| 00000230 2b 31 2c 79 70 2b 31 29 22 20 22 3b 3a 78 70 3d |+1,yp+1)" ";:xp=| 00000240 78 70 2b 31 3a fd 20 a3 0d 00 aa 43 20 e7 20 41 |xp+1:. ....C . A| 00000250 24 3d 22 3a 22 20 80 20 79 70 3c 3e 30 20 8c 20 |$=":" . yp<>0 . | 00000260 fb 31 32 38 2b 73 25 28 78 70 2c 79 70 29 3a f1 |.128+s%(xp,yp):.| 00000270 8a 78 70 2b 31 2c 79 70 2b 31 29 22 20 22 3b 3a |.xp+1,yp+1)" ";:| 00000280 79 70 3d 79 70 2d 31 3a fd 20 a3 0d 00 b4 43 20 |yp=yp-1:. ....C | 00000290 e7 20 41 24 3d 22 2f 22 20 80 20 79 70 3c 3e 37 |. A$="/" . yp<>7| 000002a0 20 8c 20 fb 31 32 38 2b 73 25 28 78 70 2c 79 70 | . .128+s%(xp,yp| 000002b0 29 3a f1 8a 78 70 2b 31 2c 79 70 2b 31 29 22 20 |):..xp+1,yp+1)" | 000002c0 22 3b 3a 79 70 3d 79 70 2b 31 3a fd 20 a3 0d 00 |";:yp=yp+1:. ...| 000002d0 be 30 20 f4 20 49 73 20 61 20 6c 65 74 74 65 72 |.0 . Is a letter| 000002e0 20 41 2d 48 20 62 65 69 6e 67 20 75 73 65 64 20 | A-H being used | 000002f0 74 6f 20 73 65 74 20 63 6f 6c 6f 75 72 3f 0d 00 |to set colour?..| 00000300 c8 22 20 e7 20 97 28 41 24 29 3e 36 34 20 80 20 |." . .(A$)>64 . | 00000310 97 28 41 24 29 3c 37 33 20 8c 20 f2 73 65 74 63 |.(A$)<73 . .setc| 00000320 0d 00 d2 13 20 f4 20 4c 6f 61 64 20 6f 72 20 53 |.... . Load or S| 00000330 61 76 65 0d 00 dc 48 20 e7 20 41 24 3d 22 53 22 |ave...H . A$="S"| 00000340 20 8c 20 fb 31 32 38 3a db 3a e8 22 46 69 6c 65 | . .128:.:."File| 00000350 6e 61 6d 65 22 3b 66 24 3a ff 22 53 41 56 45 20 |name";f$:."SAVE | 00000360 22 2b 66 24 2b 22 20 32 43 30 30 20 33 30 30 30 |"+f$+" 2C00 3000| 00000370 22 3a db 3a fd 20 b9 3a fd 20 a3 0d 00 e6 43 20 |":.:. .:. ....C | 00000380 e7 20 41 24 3d 22 4c 22 20 8c 20 fb 31 32 38 3a |. A$="L" . .128:| 00000390 db 3a e8 22 46 69 6c 65 6e 61 6d 65 22 3b 66 24 |.:."Filename";f$| 000003a0 3a ff 22 4c 4f 41 44 20 22 2b 66 24 2b 22 20 32 |:."LOAD "+f$+" 2| 000003b0 43 30 30 22 3a db 3a fd 20 b9 3a fd 20 a3 0d 00 |C00":.:. .:. ...| 000003c0 f0 26 20 f4 20 55 73 69 6e 67 20 66 61 73 74 20 |.& . Using fast | 000003d0 66 6f 72 77 61 72 64 2f 72 65 76 65 72 73 65 20 |forward/reverse | 000003e0 6b 65 79 73 0d 00 fa 31 20 e7 20 97 28 41 24 29 |keys...1 . .(A$)| 000003f0 3e 34 37 20 80 20 97 28 41 24 29 3c 35 38 20 8c |>47 . .(A$)<58 .| 00000400 63 68 3d 33 2a 28 97 28 41 24 29 2d 34 38 29 3a |ch=3*(.(A$)-48):| 00000410 fd b9 3a fd a3 0d 01 04 08 20 fd 20 a3 0d 01 0e |..:...... . ....| 00000420 06 20 3a 0d 01 18 21 20 f4 20 44 72 61 77 20 63 |. :...! . Draw c| 00000430 68 61 72 61 63 74 65 72 20 66 72 6f 6d 20 6d 65 |haracter from me| 00000440 6d 6f 72 79 0d 01 22 3c 20 dd f2 67 65 74 73 70 |mory.."< ..getsp| 00000450 3a e3 79 3d 30 b8 37 3a e3 78 3d 30 b8 37 3a 61 |:.y=0.7:.x=0.7:a| 00000460 64 3d 26 32 43 30 30 2b 26 32 30 2a 63 68 2b 38 |d=&2C00+&20*ch+8| 00000470 2a 28 78 20 81 20 32 29 2b 28 79 20 83 20 38 29 |*(x . 2)+(y . 8)| 00000480 0d 01 2c 28 e7 28 78 20 83 20 32 29 3d 31 8c 63 |..,(.(x . 2)=1.c| 00000490 3d 28 3f 61 64 29 80 32 31 8b 63 3d 28 28 3f 61 |=(?ad).21.c=((?a| 000004a0 64 29 80 34 32 29 2f 32 0d 01 36 46 63 3d 28 63 |d).42)/2..6Fc=(c| 000004b0 20 80 20 31 29 2b 28 63 20 80 20 34 29 2f 32 2b | . 1)+(c . 4)/2+| 000004c0 28 63 20 80 20 31 36 29 2f 34 3a 73 25 28 78 2c |(c . 16)/4:s%(x,| 000004d0 79 29 3d 63 3a fb 20 31 32 38 2b 63 3a f1 8a 78 |y)=c:. 128+c:..x| 000004e0 2b 31 2c 79 2b 31 29 22 20 22 3b 3a ed 2c 0d 01 |+1,y+1)" ";:.,..| 000004f0 40 25 20 fb 37 3a fb 31 32 38 3a f1 8a 30 2c 33 |@% .7:.128:..0,3| 00000500 30 29 22 43 68 61 72 61 63 74 65 72 3a 20 22 3b |0)"Character: ";| 00000510 7e 63 68 0d 01 4a 05 e1 0d 01 54 06 20 3a 0d 01 |~ch..J....T. :..| 00000520 5e 38 20 f4 20 53 65 74 20 70 69 78 65 6c 20 28 |^8 . Set pixel (| 00000530 78 2c 79 29 20 74 6f 20 63 6f 6c 6f 75 72 20 64 |x,y) to colour d| 00000540 65 66 69 6e 65 64 20 62 79 20 6b 65 79 20 70 72 |efined by key pr| 00000550 65 73 73 20 41 24 0d 01 68 5e dd f2 73 65 74 63 |ess A$..h^..setc| 00000560 3a 43 53 3d 97 28 41 24 29 2d 36 35 3a 43 53 3d |:CS=.(A$)-65:CS=| 00000570 28 43 53 20 80 20 31 29 2b 32 2a 28 43 53 20 80 |(CS . 1)+2*(CS .| 00000580 20 32 29 2b 34 2a 28 43 53 20 80 20 34 29 3a e7 | 2)+4*(CS . 4):.| 00000590 28 78 70 20 83 20 32 29 3d 30 20 8c 20 43 53 3d |(xp . 2)=0 . CS=| 000005a0 32 2a 43 53 3a 4e 44 3d 26 44 35 20 8b 20 4e 44 |2*CS:ND=&D5 . ND| 000005b0 3d 26 45 41 0d 01 72 27 61 64 3d 26 32 43 30 30 |=&EA..r'ad=&2C00| 000005c0 2b 26 32 30 2a 63 68 2b 38 2a 28 78 70 20 81 20 |+&20*ch+8*(xp . | 000005d0 32 29 2b 28 79 70 20 83 20 38 29 0d 01 7c 2d 20 |2)+(yp . 8)..|- | 000005e0 3f 61 64 3d 28 28 3f 61 64 29 20 80 20 4e 44 29 |?ad=((?ad) . ND)| 000005f0 2b 43 53 3a 73 25 28 78 70 2c 79 70 29 3d 97 28 |+CS:s%(xp,yp)=.(| 00000600 41 24 29 2d 36 35 3a e1 0d ff |A$)-65:...| 0000060a