Home » Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk01b_adfs_welcome_disk_interleaved.adf » Ship3/DESIGN/CharEdit

Ship3/DESIGN/CharEdit

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 » Greaseweazled » dfs_box04_disk01b_adfs_welcome_disk_interleaved.adf
Filename: Ship3/DESIGN/CharEdit
Read OK:
File size: 0415 bytes
Load address: FFFF0E00
Exec address: FFFF8023
Duplicates

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

File contents
   10 *LO. DATA 2000
   20 MODE2:HIMEM=&2000:ch=0:xp=0:yp=0:DIMs%(15,15)
   30 REPEAT PROCgetsp
   40 REPEAT COLOUR -7*(s%(xp,yp)=0):COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)"X";
   50 A$=GET$:IF A$="+" AND ch<>31 THEN ch=ch+1:UNTILTRUE:UNTILFALSE
   60 IF A$="-" AND ch<>0 THEN ch=ch-1:UNTILTRUE:UNTILFALSE
   70 IF A$="Z" AND xp<>0 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:xp=xp-1:UNTIL FALSE
   80 IF A$="X" AND xp<>15 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:xp=xp+1:UNTIL FALSE
   90 IF A$=":" AND yp<>0 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:yp=yp-1:UNTIL FALSE
  100 IF A$="/" AND yp<>15 THEN COLOUR128+s%(xp,yp):PRINTTAB(xp+1,yp+1)" ";:yp=yp+1:UNTIL FALSE
  110 IF ASC(A$)>64 AND ASC(A$)<73 THEN PROCsetc
  120 IF A$="S" THEN OSCLI"SAVE temp 2000 3000":UNTILTRUE:UNTILTRUE:END
  130 IF ASC(A$)>47 AND ASC(A$)<58 THENch=3*(ASC(A$)-48):UNTILTRUE:UNTILFALSE
  140 UNTIL FALSE
  150DEFPROCgetsp:FORy=0TO15:FORx=0TO15:ad=&2000+&80*ch+8*(x DIV 2)+(y MOD 8):IF y>7 THEN ad=ad+64
  160IF(x MOD 2)=1THENc=(?ad)AND21ELSEc=((?ad)AND42)/2
  170c=(c AND 1)+(c AND 4)/2+(c AND 16)/4:s%(x,y)=c:COLOUR 128+c:PRINTTAB(x+1,y+1)" ";:NEXT,
  180 COLOUR7:COLOUR128:PRINTTAB(0,30)"Character: ";~ch
  190ENDPROC
  200DEFPROCsetc: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
  210ad=&2000+&80*ch+8*(xp DIV 2)+(yp MOD 8):IF yp>7 THEN ad=ad+64
  220 ?ad=((?ad) AND ND)+CS:s%(xp,yp)=ASC(A$)-65:ENDPROC

 *LO. DATA 2000
) �2:�=&2000:ch=0:xp=0:yp=0:�s%(15,15)

 � �getsp
(9 � � -7*(s%(xp,yp)=0):�128+s%(xp,yp):�xp+1,yp+1)"X";
2+ A$=�:� A$="+" � ch<>31 � ch=ch+1:��:��
<% � A$="-" � ch<>0 � ch=ch-1:��:��
FC � A$="Z" � xp<>0 � �128+s%(xp,yp):�xp+1,yp+1)" ";:xp=xp-1:� �
PD � A$="X" � xp<>15 � �128+s%(xp,yp):�xp+1,yp+1)" ";:xp=xp+1:� �
ZC � A$=":" � yp<>0 � �128+s%(xp,yp):�xp+1,yp+1)" ";:yp=yp-1:� �
dD � A$="/" � yp<>15 � �128+s%(xp,yp):�xp+1,yp+1)" ";:yp=yp+1:� �
n" � �(A$)>64 � �(A$)<73 � �setc
x. � A$="S" � �"SAVE temp 2000 3000":��:��:�
�1 � �(A$)>47 � �(A$)<58 �ch=3*(�(A$)-48):��:��
� � �
�N��getsp:�y=0�15:�x=0�15:ad=&2000+&80*ch+8*(x � 2)+(y � 8):� y>7 � ad=ad+64
�(�(x � 2)=1�c=(?ad)�21�c=((?ad)�42)/2
�Fc=(c � 1)+(c � 4)/2+(c � 16)/4:s%(x,y)=c:� 128+c:�x+1,y+1)" ";:�,
�% �7:�128:�0,30)"Character: ";~ch
��
�^��setc:CS=�(A$)-65:CS=(CS � 1)+2*(CS � 2)+4*(CS � 4):�(xp � 2)=0 � CS=2*CS:ND=&D5 � ND=&EA
�9ad=&2000+&80*ch+8*(xp � 2)+(yp � 8):� yp>7 � ad=ad+64
�- ?ad=((?ad) � ND)+CS:s%(xp,yp)=�(A$)-65:�
�
00000000  0d 00 0a 13 20 2a 4c 4f  2e 20 44 41 54 41 20 32  |.... *LO. DATA 2|
00000010  30 30 30 0d 00 14 29 20  eb 32 3a d3 3d 26 32 30  |000...) .2:.=&20|
00000020  30 30 3a 63 68 3d 30 3a  78 70 3d 30 3a 79 70 3d  |00:ch=0:xp=0:yp=|
00000030  30 3a de 73 25 28 31 35  2c 31 35 29 0d 00 1e 0d  |0:.s%(15,15)....|
00000040  20 f5 20 f2 67 65 74 73  70 0d 00 28 39 20 f5 20  | . .getsp..(9 . |
00000050  fb 20 2d 37 2a 28 73 25  28 78 70 2c 79 70 29 3d  |. -7*(s%(xp,yp)=|
00000060  30 29 3a fb 31 32 38 2b  73 25 28 78 70 2c 79 70  |0):.128+s%(xp,yp|
00000070  29 3a f1 8a 78 70 2b 31  2c 79 70 2b 31 29 22 58  |):..xp+1,yp+1)"X|
00000080  22 3b 0d 00 32 2b 20 41  24 3d be 3a e7 20 41 24  |";..2+ A$=.:. A$|
00000090  3d 22 2b 22 20 80 20 63  68 3c 3e 33 31 20 8c 20  |="+" . ch<>31 . |
000000a0  63 68 3d 63 68 2b 31 3a  fd b9 3a fd a3 0d 00 3c  |ch=ch+1:..:....<|
000000b0  25 20 e7 20 41 24 3d 22  2d 22 20 80 20 63 68 3c  |% . A$="-" . ch<|
000000c0  3e 30 20 8c 20 63 68 3d  63 68 2d 31 3a fd b9 3a  |>0 . ch=ch-1:..:|
000000d0  fd a3 0d 00 46 43 20 e7  20 41 24 3d 22 5a 22 20  |....FC . A$="Z" |
000000e0  80 20 78 70 3c 3e 30 20  8c 20 fb 31 32 38 2b 73  |. xp<>0 . .128+s|
000000f0  25 28 78 70 2c 79 70 29  3a f1 8a 78 70 2b 31 2c  |%(xp,yp):..xp+1,|
00000100  79 70 2b 31 29 22 20 22  3b 3a 78 70 3d 78 70 2d  |yp+1)" ";:xp=xp-|
00000110  31 3a fd 20 a3 0d 00 50  44 20 e7 20 41 24 3d 22  |1:. ...PD . A$="|
00000120  58 22 20 80 20 78 70 3c  3e 31 35 20 8c 20 fb 31  |X" . xp<>15 . .1|
00000130  32 38 2b 73 25 28 78 70  2c 79 70 29 3a f1 8a 78  |28+s%(xp,yp):..x|
00000140  70 2b 31 2c 79 70 2b 31  29 22 20 22 3b 3a 78 70  |p+1,yp+1)" ";:xp|
00000150  3d 78 70 2b 31 3a fd 20  a3 0d 00 5a 43 20 e7 20  |=xp+1:. ...ZC . |
00000160  41 24 3d 22 3a 22 20 80  20 79 70 3c 3e 30 20 8c  |A$=":" . yp<>0 .|
00000170  20 fb 31 32 38 2b 73 25  28 78 70 2c 79 70 29 3a  | .128+s%(xp,yp):|
00000180  f1 8a 78 70 2b 31 2c 79  70 2b 31 29 22 20 22 3b  |..xp+1,yp+1)" ";|
00000190  3a 79 70 3d 79 70 2d 31  3a fd 20 a3 0d 00 64 44  |:yp=yp-1:. ...dD|
000001a0  20 e7 20 41 24 3d 22 2f  22 20 80 20 79 70 3c 3e  | . A$="/" . yp<>|
000001b0  31 35 20 8c 20 fb 31 32  38 2b 73 25 28 78 70 2c  |15 . .128+s%(xp,|
000001c0  79 70 29 3a f1 8a 78 70  2b 31 2c 79 70 2b 31 29  |yp):..xp+1,yp+1)|
000001d0  22 20 22 3b 3a 79 70 3d  79 70 2b 31 3a fd 20 a3  |" ";:yp=yp+1:. .|
000001e0  0d 00 6e 22 20 e7 20 97  28 41 24 29 3e 36 34 20  |..n" . .(A$)>64 |
000001f0  80 20 97 28 41 24 29 3c  37 33 20 8c 20 f2 73 65  |. .(A$)<73 . .se|
00000200  74 63 0d 00 78 2e 20 e7  20 41 24 3d 22 53 22 20  |tc..x. . A$="S" |
00000210  8c 20 ff 22 53 41 56 45  20 74 65 6d 70 20 32 30  |. ."SAVE temp 20|
00000220  30 30 20 33 30 30 30 22  3a fd b9 3a fd b9 3a e0  |00 3000":..:..:.|
00000230  0d 00 82 31 20 e7 20 97  28 41 24 29 3e 34 37 20  |...1 . .(A$)>47 |
00000240  80 20 97 28 41 24 29 3c  35 38 20 8c 63 68 3d 33  |. .(A$)<58 .ch=3|
00000250  2a 28 97 28 41 24 29 2d  34 38 29 3a fd b9 3a fd  |*(.(A$)-48):..:.|
00000260  a3 0d 00 8c 08 20 fd 20  a3 0d 00 96 4e dd f2 67  |..... . ....N..g|
00000270  65 74 73 70 3a e3 79 3d  30 b8 31 35 3a e3 78 3d  |etsp:.y=0.15:.x=|
00000280  30 b8 31 35 3a 61 64 3d  26 32 30 30 30 2b 26 38  |0.15:ad=&2000+&8|
00000290  30 2a 63 68 2b 38 2a 28  78 20 81 20 32 29 2b 28  |0*ch+8*(x . 2)+(|
000002a0  79 20 83 20 38 29 3a e7  20 79 3e 37 20 8c 20 61  |y . 8):. y>7 . a|
000002b0  64 3d 61 64 2b 36 34 0d  00 a0 28 e7 28 78 20 83  |d=ad+64...(.(x .|
000002c0  20 32 29 3d 31 8c 63 3d  28 3f 61 64 29 80 32 31  | 2)=1.c=(?ad).21|
000002d0  8b 63 3d 28 28 3f 61 64  29 80 34 32 29 2f 32 0d  |.c=((?ad).42)/2.|
000002e0  00 aa 46 63 3d 28 63 20  80 20 31 29 2b 28 63 20  |..Fc=(c . 1)+(c |
000002f0  80 20 34 29 2f 32 2b 28  63 20 80 20 31 36 29 2f  |. 4)/2+(c . 16)/|
00000300  34 3a 73 25 28 78 2c 79  29 3d 63 3a fb 20 31 32  |4:s%(x,y)=c:. 12|
00000310  38 2b 63 3a f1 8a 78 2b  31 2c 79 2b 31 29 22 20  |8+c:..x+1,y+1)" |
00000320  22 3b 3a ed 2c 0d 00 b4  25 20 fb 37 3a fb 31 32  |";:.,...% .7:.12|
00000330  38 3a f1 8a 30 2c 33 30  29 22 43 68 61 72 61 63  |8:..0,30)"Charac|
00000340  74 65 72 3a 20 22 3b 7e  63 68 0d 00 be 05 e1 0d  |ter: ";~ch......|
00000350  00 c8 5e dd f2 73 65 74  63 3a 43 53 3d 97 28 41  |..^..setc:CS=.(A|
00000360  24 29 2d 36 35 3a 43 53  3d 28 43 53 20 80 20 31  |$)-65:CS=(CS . 1|
00000370  29 2b 32 2a 28 43 53 20  80 20 32 29 2b 34 2a 28  |)+2*(CS . 2)+4*(|
00000380  43 53 20 80 20 34 29 3a  e7 28 78 70 20 83 20 32  |CS . 4):.(xp . 2|
00000390  29 3d 30 20 8c 20 43 53  3d 32 2a 43 53 3a 4e 44  |)=0 . CS=2*CS:ND|
000003a0  3d 26 44 35 20 8b 20 4e  44 3d 26 45 41 0d 00 d2  |=&D5 . ND=&EA...|
000003b0  39 61 64 3d 26 32 30 30  30 2b 26 38 30 2a 63 68  |9ad=&2000+&80*ch|
000003c0  2b 38 2a 28 78 70 20 81  20 32 29 2b 28 79 70 20  |+8*(xp . 2)+(yp |
000003d0  83 20 38 29 3a e7 20 79  70 3e 37 20 8c 20 61 64  |. 8):. yp>7 . ad|
000003e0  3d 61 64 2b 36 34 0d 00  dc 2d 20 3f 61 64 3d 28  |=ad+64...- ?ad=(|
000003f0  28 3f 61 64 29 20 80 20  4e 44 29 2b 43 53 3a 73  |(?ad) . ND)+CS:s|
00000400  25 28 78 70 2c 79 70 29  3d 97 28 41 24 29 2d 36  |%(xp,yp)=.(A$)-6|
00000410  35 3a e1 0d ff                                    |5:...|
00000415
Ship3/DESIGN/CharEdit.m0
Ship3/DESIGN/CharEdit.m1
Ship3/DESIGN/CharEdit.m2
Ship3/DESIGN/CharEdit.m4
Ship3/DESIGN/CharEdit.m5