Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_39.ADF » P/Editor

P/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 ADFS disks » Electron_User_Group » EUG_39.ADF
Filename: P/Editor
Read OK:
File size: 06CA bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

There are 2 duplicate copies of this file in the archive:

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 COLOUR128:COLOUR7:CLS:PRINT"**********":FORy=0TO7:PRINT"*        *":NEXT:PRINT"**********"''"KEYS"'"----"''"A-H  Set colour"'"+/-  Change sprite"'"L/S  Load/Save"'"ZX*? Move cursor"'"0-9  Quick sprite"'"     select":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:COLOUR7:CLS:INPUT"Filename";f$:OSCLI"SAVE "+f$+" 2C00 3000":CLS:UNTIL TRUE:UNTIL FALSE
  230 IF A$="L" THEN COLOUR128:COLOUR7: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� � �128:�7:�:�"**********":�y=0�7:�"*        *":�:�"**********"''"KEYS"'"----"''"A-H  Set colour"'"+/-  Change sprite"'"L/S  Load/Save"'"ZX*? Move cursor"'"0-9  Quick sprite"'"     select":�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
�K � A$="S" � �128:�7:�:�"Filename";f$:�"SAVE "+f$+" 2C00 3000":�:� �:� �
�F � A$="L" � �128:�7:�:�"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 c7 20 f5 20  |draw char..Z. . |
00000100  fb 31 32 38 3a fb 37 3a  db 3a f1 22 2a 2a 2a 2a  |.128:.7:.:."****|
00000110  2a 2a 2a 2a 2a 2a 22 3a  e3 79 3d 30 b8 37 3a f1  |******":.y=0.7:.|
00000120  22 2a 20 20 20 20 20 20  20 20 2a 22 3a ed 3a f1  |"*        *":.:.|
00000130  22 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 22 27 27 22 4b  |"**********"''"K|
00000140  45 59 53 22 27 22 2d 2d  2d 2d 22 27 27 22 41 2d  |EYS"'"----"''"A-|
00000150  48 20 20 53 65 74 20 63  6f 6c 6f 75 72 22 27 22  |H  Set colour"'"|
00000160  2b 2f 2d 20 20 43 68 61  6e 67 65 20 73 70 72 69  |+/-  Change spri|
00000170  74 65 22 27 22 4c 2f 53  20 20 4c 6f 61 64 2f 53  |te"'"L/S  Load/S|
00000180  61 76 65 22 27 22 5a 58  2a 3f 20 4d 6f 76 65 20  |ave"'"ZX*? Move |
00000190  63 75 72 73 6f 72 22 27  22 30 2d 39 20 20 51 75  |cursor"'"0-9  Qu|
000001a0  69 63 6b 20 73 70 72 69  74 65 22 27 22 20 20 20  |ick sprite"'"   |
000001b0  20 20 73 65 6c 65 63 74  22 3a f2 67 65 74 73 70  |  select":.getsp|
000001c0  0d 00 64 39 20 f5 20 fb  20 2d 37 2a 28 73 25 28  |..d9 . . -7*(s%(|
000001d0  78 70 2c 79 70 29 3d 30  29 3a fb 31 32 38 2b 73  |xp,yp)=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 58 22  3b 0d 00 6e 1d 20 f4 20  |yp+1)"X";..n. . |
00000200  47 65 74 20 6b 65 79 20  61 6e 64 20 70 72 6f 63  |Get key and proc|
00000210  65 73 73 20 69 74 0d 00  78 2b 20 41 24 3d be 3a  |ess it..x+ A$=.:|
00000220  e7 20 41 24 3d 22 2b 22  20 80 20 63 68 3c 3e 33  |. A$="+" . ch<>3|
00000230  31 20 8c 20 63 68 3d 63  68 2b 31 3a fd b9 3a fd  |1 . ch=ch+1:..:.|
00000240  a3 0d 00 82 25 20 e7 20  41 24 3d 22 2d 22 20 80  |....% . A$="-" .|
00000250  20 63 68 3c 3e 30 20 8c  20 63 68 3d 63 68 2d 31  | ch<>0 . ch=ch-1|
00000260  3a fd b9 3a fd a3 0d 00  8c 16 20 f4 20 43 75 72  |:..:...... . Cur|
00000270  73 6f 72 20 6d 6f 76 65  6d 65 6e 74 0d 00 96 43  |sor movement...C|
00000280  20 e7 20 41 24 3d 22 5a  22 20 80 20 78 70 3c 3e  | . A$="Z" . xp<>|
00000290  30 20 8c 20 fb 31 32 38  2b 73 25 28 78 70 2c 79  |0 . .128+s%(xp,y|
000002a0  70 29 3a f1 8a 78 70 2b  31 2c 79 70 2b 31 29 22  |p):..xp+1,yp+1)"|
000002b0  20 22 3b 3a 78 70 3d 78  70 2d 31 3a fd 20 a3 0d  | ";:xp=xp-1:. ..|
000002c0  00 a0 43 20 e7 20 41 24  3d 22 58 22 20 80 20 78  |..C . A$="X" . x|
000002d0  70 3c 3e 37 20 8c 20 fb  31 32 38 2b 73 25 28 78  |p<>7 . .128+s%(x|
000002e0  70 2c 79 70 29 3a f1 8a  78 70 2b 31 2c 79 70 2b  |p,yp):..xp+1,yp+|
000002f0  31 29 22 20 22 3b 3a 78  70 3d 78 70 2b 31 3a fd  |1)" ";:xp=xp+1:.|
00000300  20 a3 0d 00 aa 43 20 e7  20 41 24 3d 22 3a 22 20  | ....C . A$=":" |
00000310  80 20 79 70 3c 3e 30 20  8c 20 fb 31 32 38 2b 73  |. yp<>0 . .128+s|
00000320  25 28 78 70 2c 79 70 29  3a f1 8a 78 70 2b 31 2c  |%(xp,yp):..xp+1,|
00000330  79 70 2b 31 29 22 20 22  3b 3a 79 70 3d 79 70 2d  |yp+1)" ";:yp=yp-|
00000340  31 3a fd 20 a3 0d 00 b4  43 20 e7 20 41 24 3d 22  |1:. ....C . A$="|
00000350  2f 22 20 80 20 79 70 3c  3e 37 20 8c 20 fb 31 32  |/" . yp<>7 . .12|
00000360  38 2b 73 25 28 78 70 2c  79 70 29 3a f1 8a 78 70  |8+s%(xp,yp):..xp|
00000370  2b 31 2c 79 70 2b 31 29  22 20 22 3b 3a 79 70 3d  |+1,yp+1)" ";:yp=|
00000380  79 70 2b 31 3a fd 20 a3  0d 00 be 30 20 f4 20 49  |yp+1:. ....0 . I|
00000390  73 20 61 20 6c 65 74 74  65 72 20 41 2d 48 20 62  |s a letter A-H b|
000003a0  65 69 6e 67 20 75 73 65  64 20 74 6f 20 73 65 74  |eing used to set|
000003b0  20 63 6f 6c 6f 75 72 3f  0d 00 c8 22 20 e7 20 97  | colour?..." . .|
000003c0  28 41 24 29 3e 36 34 20  80 20 97 28 41 24 29 3c  |(A$)>64 . .(A$)<|
000003d0  37 33 20 8c 20 f2 73 65  74 63 0d 00 d2 13 20 f4  |73 . .setc.... .|
000003e0  20 4c 6f 61 64 20 6f 72  20 53 61 76 65 0d 00 dc  | Load or Save...|
000003f0  4b 20 e7 20 41 24 3d 22  53 22 20 8c 20 fb 31 32  |K . A$="S" . .12|
00000400  38 3a fb 37 3a db 3a e8  22 46 69 6c 65 6e 61 6d  |8:.7:.:."Filenam|
00000410  65 22 3b 66 24 3a ff 22  53 41 56 45 20 22 2b 66  |e";f$:."SAVE "+f|
00000420  24 2b 22 20 32 43 30 30  20 33 30 30 30 22 3a db  |$+" 2C00 3000":.|
00000430  3a fd 20 b9 3a fd 20 a3  0d 00 e6 46 20 e7 20 41  |:. .:. ....F . A|
00000440  24 3d 22 4c 22 20 8c 20  fb 31 32 38 3a fb 37 3a  |$="L" . .128:.7:|
00000450  db 3a e8 22 46 69 6c 65  6e 61 6d 65 22 3b 66 24  |.:."Filename";f$|
00000460  3a ff 22 4c 4f 41 44 20  22 2b 66 24 2b 22 20 32  |:."LOAD "+f$+" 2|
00000470  43 30 30 22 3a db 3a fd  20 b9 3a fd 20 a3 0d 00  |C00":.:. .:. ...|
00000480  f0 26 20 f4 20 55 73 69  6e 67 20 66 61 73 74 20  |.& . Using fast |
00000490  66 6f 72 77 61 72 64 2f  72 65 76 65 72 73 65 20  |forward/reverse |
000004a0  6b 65 79 73 0d 00 fa 31  20 e7 20 97 28 41 24 29  |keys...1 . .(A$)|
000004b0  3e 34 37 20 80 20 97 28  41 24 29 3c 35 38 20 8c  |>47 . .(A$)<58 .|
000004c0  63 68 3d 33 2a 28 97 28  41 24 29 2d 34 38 29 3a  |ch=3*(.(A$)-48):|
000004d0  fd b9 3a fd a3 0d 01 04  08 20 fd 20 a3 0d 01 0e  |..:...... . ....|
000004e0  06 20 3a 0d 01 18 21 20  f4 20 44 72 61 77 20 63  |. :...! . Draw c|
000004f0  68 61 72 61 63 74 65 72  20 66 72 6f 6d 20 6d 65  |haracter from me|
00000500  6d 6f 72 79 0d 01 22 3c  20 dd f2 67 65 74 73 70  |mory.."< ..getsp|
00000510  3a e3 79 3d 30 b8 37 3a  e3 78 3d 30 b8 37 3a 61  |:.y=0.7:.x=0.7:a|
00000520  64 3d 26 32 43 30 30 2b  26 32 30 2a 63 68 2b 38  |d=&2C00+&20*ch+8|
00000530  2a 28 78 20 81 20 32 29  2b 28 79 20 83 20 38 29  |*(x . 2)+(y . 8)|
00000540  0d 01 2c 28 e7 28 78 20  83 20 32 29 3d 31 8c 63  |..,(.(x . 2)=1.c|
00000550  3d 28 3f 61 64 29 80 32  31 8b 63 3d 28 28 3f 61  |=(?ad).21.c=((?a|
00000560  64 29 80 34 32 29 2f 32  0d 01 36 46 63 3d 28 63  |d).42)/2..6Fc=(c|
00000570  20 80 20 31 29 2b 28 63  20 80 20 34 29 2f 32 2b  | . 1)+(c . 4)/2+|
00000580  28 63 20 80 20 31 36 29  2f 34 3a 73 25 28 78 2c  |(c . 16)/4:s%(x,|
00000590  79 29 3d 63 3a fb 20 31  32 38 2b 63 3a f1 8a 78  |y)=c:. 128+c:..x|
000005a0  2b 31 2c 79 2b 31 29 22  20 22 3b 3a ed 2c 0d 01  |+1,y+1)" ";:.,..|
000005b0  40 25 20 fb 37 3a fb 31  32 38 3a f1 8a 30 2c 33  |@% .7:.128:..0,3|
000005c0  30 29 22 43 68 61 72 61  63 74 65 72 3a 20 22 3b  |0)"Character: ";|
000005d0  7e 63 68 0d 01 4a 05 e1  0d 01 54 06 20 3a 0d 01  |~ch..J....T. :..|
000005e0  5e 38 20 f4 20 53 65 74  20 70 69 78 65 6c 20 28  |^8 . Set pixel (|
000005f0  78 2c 79 29 20 74 6f 20  63 6f 6c 6f 75 72 20 64  |x,y) to colour d|
00000600  65 66 69 6e 65 64 20 62  79 20 6b 65 79 20 70 72  |efined by key pr|
00000610  65 73 73 20 41 24 0d 01  68 5e dd f2 73 65 74 63  |ess A$..h^..setc|
00000620  3a 43 53 3d 97 28 41 24  29 2d 36 35 3a 43 53 3d  |:CS=.(A$)-65:CS=|
00000630  28 43 53 20 80 20 31 29  2b 32 2a 28 43 53 20 80  |(CS . 1)+2*(CS .|
00000640  20 32 29 2b 34 2a 28 43  53 20 80 20 34 29 3a e7  | 2)+4*(CS . 4):.|
00000650  28 78 70 20 83 20 32 29  3d 30 20 8c 20 43 53 3d  |(xp . 2)=0 . CS=|
00000660  32 2a 43 53 3a 4e 44 3d  26 44 35 20 8b 20 4e 44  |2*CS:ND=&D5 . ND|
00000670  3d 26 45 41 0d 01 72 27  61 64 3d 26 32 43 30 30  |=&EA..r'ad=&2C00|
00000680  2b 26 32 30 2a 63 68 2b  38 2a 28 78 70 20 81 20  |+&20*ch+8*(xp . |
00000690  32 29 2b 28 79 70 20 83  20 38 29 0d 01 7c 2d 20  |2)+(yp . 8)..|- |
000006a0  3f 61 64 3d 28 28 3f 61  64 29 20 80 20 4e 44 29  |?ad=((?ad) . ND)|
000006b0  2b 43 53 3a 73 25 28 78  70 2c 79 70 29 3d 97 28  |+CS:s%(xp,yp)=.(|
000006c0  41 24 29 2d 36 35 3a e1  0d ff                    |A$)-65:...|
000006ca
P/Editor.m0
P/Editor.m1
P/Editor.m2
P/Editor.m4
P/Editor.m5