Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_42.ADF » P/ASCEDIT

P/ASCEDIT

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_42.ADF
Filename: P/ASCEDIT
Read OK:
File size: 068C bytes
Load address: FFFFFB48
Exec address: FFFFCF30
Duplicates

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

File contents
   10REM File editor - max 16k
   20MODE7:PRINT"ASCII file editor":PRINT:INPUT"Enter file name: "F$:PRINT
   30REM F=file#,F$=filename,A%=temporary,M%=actual mem.loc.,E%=editing byte (first on screen is 0 last is 24*8),X% & Y%=print loop,LOF=length of file to open
   40ONERROR CLOSE#0:PRINT"Bad name or file not found":TIME=0:REPEAT:UNTILTIME>100:RUN
   50F=OPENIN F$:LOF=EXT#F:CLOSE#F 
   60IFLOF>(16*1024) THENPRINT"File too large to fit in memory":TIME=0:REPEAT:UNTILTIME>100:RUN 
   70OSCLI("LOAD "+F$+" 3C00")
   80ONERROR IFERR=17 THENOSCLI("SAVE $.OUTPUT 3C00 +"+STR$~(LOF)):VDU31,0,24:END
   90*FX4,1
  100PRINT"Final will be saved as $.OUTPUT":PRINT:PRINT"Use cursors to edit ESCAPE to save":TIME=0:REPEAT:UNTILTIME>100:CLS
  110REM*************** 
  120M%=&3C00 
  130PROCscroll
  140A=GET
  150IFA<>138 AND A<>139 THENPROCedit 
  160IFA=139 THENM%=M%-(8*24)
  170IFA=138 THENM%=M%+(8*24)
  180IFM%=&3C00-(24*8) OR M%>&7BFF THENGOTO120
  190GOTO130
  200REM*************** 
  210DEFPROCscroll
  220VDU31,0,0
  230FORY%=0 TO 23
  240IF(M%+(Y%*8)-&3C00)<&10 THENPRINT;"0";
  250IF(M%+(Y%*8)-&3C00)<&100 THENPRINT;"0";
  260IF(M%+(Y%*8)-&3C00)<&1000 THENPRINT;"0";
  270PRINT;~(M%+(Y%*8)-&3C00);" ";
  280FORX%=0 TO 7
  290IF?(M%+(Y%*8)+X%)<16 THENPRINT;"0";
  300PRINT;~?(M%+(Y%*8)+X%);" ";:NEXT
  310FORX%=0 TO 7
  320IF?(M%+(Y%*8)+X%)>31 AND ?(M%+(Y%*8)+X%)<127 THENPRINT;CHR$(?(M%+(Y%*8)+X%)); ELSEPRINT;".";
  330NEXT:PRINT:NEXT:VDU31,5,0
  340ENDPROC
  350REM*************** 
  360DEFPROCedit 
  370E%=0 
  380REM Alter current edit loc
  390IFA=138 OR A=139 THENGOTO510
  400IFA=136 THENE%=E%-1 
  410IFA=137 THENE%=E%+1 
  420IFE%<0 THENE%=E%+1:A=GET:GOTO380
  430 IFE%>((24*8)-1) THENE%=E%-1:VDU31,(5+(E% MOD8)*3),(E% DIV8):A=GET:GOTO380
  440VDU31,(5+(E% MOD8)*3),(E% DIV8)
  450IF(A>47 AND A<58) OR (A>64 AND A<71) THENPRINT;CHR$(A); ELSEA=GET:GOTO380
  460B=GET 
  470IF(B>47 AND B<58) OR (B>64 AND B<71) THENPRINT;CHR$(B); ELSEGOTO460
  480 ?(M%+E%)=EVAL("&"+CHR$(A)+CHR$(B)):A=137
  490IF?(M%+E%)>31 AND ?(M%+E%)<127 THENPRINTTAB(29+(E% MOD8),(E% DIV8));CHR$(?(M%+E%)); ELSEPRINTTAB(29+(E% MOD8),(E% DIV8));".";
  500GOTO380:REM As A=137 it moves on to the next cell
  510ENDPROC 

� File editor - max 16k
6�7:�"ASCII file editor":�:�"Enter file name: "F$:�
�� F=file#,F$=filename,A%=temporary,M%=actual mem.loc.,E%=editing byte (first on screen is 0 last is 24*8),X% & Y%=print loop,LOF=length of file to open
(7� �#0:�"Bad name or file not found":�=0:�:��>100:�
2F=� F$:LOF=�#F:�#F 
<F�LOF>(16*1024) ��"File too large to fit in memory":�=0:�:��>100:� 
F�("LOAD "+F$+" 3C00")
P:� �=17 ��("SAVE $.OUTPUT 3C00 +"+�~(LOF)):�31,0,24:�
Z
*FX4,1
d]�"Final will be saved as $.OUTPUT":�:�"Use cursors to edit ESCAPE to save":�=0:�:��>100:�
n�*************** 
x
M%=&3C00 
��scroll
�A=�
��A<>138 � A<>139 ��edit 
��A=139 �M%=M%-(8*24)
��A=138 �M%=M%+(8*24)
�&�M%=&3C00-(24*8) � M%>&7BFF ��Dx@
�	�tB@
��*************** 
���scroll
��31,0,0
��Y%=0 � 23
�"�(M%+(Y%*8)-&3C00)<&10 ��;"0";
�#�(M%+(Y%*8)-&3C00)<&100 ��;"0";
$�(M%+(Y%*8)-&3C00)<&1000 ��;"0";
�;~(M%+(Y%*8)-&3C00);" ";

�X%=0 � 7
"�?(M%+(Y%*8)+X%)<16 ��;"0";
,�;~?(M%+(Y%*8)+X%);" ";:�
6
�X%=0 � 7
@L�?(M%+(Y%*8)+X%)>31 � ?(M%+(Y%*8)+X%)<127 ��;�(?(M%+(Y%*8)+X%)); ��;".";
J�:�:�:�31,5,0
T�
^�*************** 
h��edit 
r	E%=0 
|� Alter current edit loc
��A=138 � A=139 ��d~A
��A=136 �E%=E%-1 
��A=137 �E%=E%+1 
��E%<0 �E%=E%+1:A=�:�D|A
�@ �E%>((24*8)-1) �E%=E%-1:�31,(5+(E% �8)*3),(E% �8):A=�:�D|A
��31,(5+(E% �8)*3),(E% �8)
�6�(A>47 � A<58) � (A>64 � A<71) ��;�(A); �A=�:�D|A
�B=� 
�2�(B>47 � B<58) � (B>64 � B<71) ��;�(B); ��dLA
�$ ?(M%+E%)=�("&"+�(A)+�(B)):A=137
�_�?(M%+E%)>31 � ?(M%+E%)<127 ��29+(E% �8),(E% �8));�(?(M%+E%)); ��29+(E% �8),(E% �8));".";
�1�D|A:� As A=137 it moves on to the next cell
�� 
�
00000000  0d 00 0a 1b f4 20 46 69  6c 65 20 65 64 69 74 6f  |..... File edito|
00000010  72 20 2d 20 6d 61 78 20  31 36 6b 0d 00 14 36 eb  |r - max 16k...6.|
00000020  37 3a f1 22 41 53 43 49  49 20 66 69 6c 65 20 65  |7:."ASCII file e|
00000030  64 69 74 6f 72 22 3a f1  3a e8 22 45 6e 74 65 72  |ditor":.:."Enter|
00000040  20 66 69 6c 65 20 6e 61  6d 65 3a 20 22 46 24 3a  | file name: "F$:|
00000050  f1 0d 00 1e 9b f4 20 46  3d 66 69 6c 65 23 2c 46  |...... F=file#,F|
00000060  24 3d 66 69 6c 65 6e 61  6d 65 2c 41 25 3d 74 65  |$=filename,A%=te|
00000070  6d 70 6f 72 61 72 79 2c  4d 25 3d 61 63 74 75 61  |mporary,M%=actua|
00000080  6c 20 6d 65 6d 2e 6c 6f  63 2e 2c 45 25 3d 65 64  |l mem.loc.,E%=ed|
00000090  69 74 69 6e 67 20 62 79  74 65 20 28 66 69 72 73  |iting byte (firs|
000000a0  74 20 6f 6e 20 73 63 72  65 65 6e 20 69 73 20 30  |t on screen is 0|
000000b0  20 6c 61 73 74 20 69 73  20 32 34 2a 38 29 2c 58  | last is 24*8),X|
000000c0  25 20 26 20 59 25 3d 70  72 69 6e 74 20 6c 6f 6f  |% & Y%=print loo|
000000d0  70 2c 4c 4f 46 3d 6c 65  6e 67 74 68 20 6f 66 20  |p,LOF=length of |
000000e0  66 69 6c 65 20 74 6f 20  6f 70 65 6e 0d 00 28 37  |file to open..(7|
000000f0  ee 85 20 d9 23 30 3a f1  22 42 61 64 20 6e 61 6d  |.. .#0:."Bad nam|
00000100  65 20 6f 72 20 66 69 6c  65 20 6e 6f 74 20 66 6f  |e or file not fo|
00000110  75 6e 64 22 3a d1 3d 30  3a f5 3a fd 91 3e 31 30  |und":.=0:.:..>10|
00000120  30 3a f9 0d 00 32 17 46  3d 8e 20 46 24 3a 4c 4f  |0:...2.F=. F$:LO|
00000130  46 3d a2 23 46 3a d9 23  46 20 0d 00 3c 46 e7 4c  |F=.#F:.#F ..<F.L|
00000140  4f 46 3e 28 31 36 2a 31  30 32 34 29 20 8c f1 22  |OF>(16*1024) .."|
00000150  46 69 6c 65 20 74 6f 6f  20 6c 61 72 67 65 20 74  |File too large t|
00000160  6f 20 66 69 74 20 69 6e  20 6d 65 6d 6f 72 79 22  |o fit in memory"|
00000170  3a d1 3d 30 3a f5 3a fd  91 3e 31 30 30 3a f9 20  |:.=0:.:..>100:. |
00000180  0d 00 46 19 ff 28 22 4c  4f 41 44 20 22 2b 46 24  |..F..("LOAD "+F$|
00000190  2b 22 20 33 43 30 30 22  29 0d 00 50 3a ee 85 20  |+" 3C00")..P:.. |
000001a0  e7 9f 3d 31 37 20 8c ff  28 22 53 41 56 45 20 24  |..=17 ..("SAVE $|
000001b0  2e 4f 55 54 50 55 54 20  33 43 30 30 20 2b 22 2b  |.OUTPUT 3C00 +"+|
000001c0  c3 7e 28 4c 4f 46 29 29  3a ef 33 31 2c 30 2c 32  |.~(LOF)):.31,0,2|
000001d0  34 3a e0 0d 00 5a 0a 2a  46 58 34 2c 31 0d 00 64  |4:...Z.*FX4,1..d|
000001e0  5d f1 22 46 69 6e 61 6c  20 77 69 6c 6c 20 62 65  |]."Final will be|
000001f0  20 73 61 76 65 64 20 61  73 20 24 2e 4f 55 54 50  | saved as $.OUTP|
00000200  55 54 22 3a f1 3a f1 22  55 73 65 20 63 75 72 73  |UT":.:."Use curs|
00000210  6f 72 73 20 74 6f 20 65  64 69 74 20 45 53 43 41  |ors to edit ESCA|
00000220  50 45 20 74 6f 20 73 61  76 65 22 3a d1 3d 30 3a  |PE to save":.=0:|
00000230  f5 3a fd 91 3e 31 30 30  3a db 0d 00 6e 15 f4 2a  |.:..>100:...n..*|
00000240  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 20 0d  |************** .|
00000250  00 78 0d 4d 25 3d 26 33  43 30 30 20 0d 00 82 0b  |.x.M%=&3C00 ....|
00000260  f2 73 63 72 6f 6c 6c 0d  00 8c 07 41 3d a5 0d 00  |.scroll....A=...|
00000270  96 1c e7 41 3c 3e 31 33  38 20 80 20 41 3c 3e 31  |...A<>138 . A<>1|
00000280  33 39 20 8c f2 65 64 69  74 20 0d 00 a0 18 e7 41  |39 ..edit .....A|
00000290  3d 31 33 39 20 8c 4d 25  3d 4d 25 2d 28 38 2a 32  |=139 .M%=M%-(8*2|
000002a0  34 29 0d 00 aa 18 e7 41  3d 31 33 38 20 8c 4d 25  |4).....A=138 .M%|
000002b0  3d 4d 25 2b 28 38 2a 32  34 29 0d 00 b4 26 e7 4d  |=M%+(8*24)...&.M|
000002c0  25 3d 26 33 43 30 30 2d  28 32 34 2a 38 29 20 84  |%=&3C00-(24*8) .|
000002d0  20 4d 25 3e 26 37 42 46  46 20 8c e5 8d 44 78 40  | M%>&7BFF ...Dx@|
000002e0  0d 00 be 09 e5 8d 74 42  40 0d 00 c8 15 f4 2a 2a  |......tB@.....**|
000002f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 20 0d 00  |************* ..|
00000300  d2 0c dd f2 73 63 72 6f  6c 6c 0d 00 dc 0b ef 33  |....scroll.....3|
00000310  31 2c 30 2c 30 0d 00 e6  0e e3 59 25 3d 30 20 b8  |1,0,0.....Y%=0 .|
00000320  20 32 33 0d 00 f0 22 e7  28 4d 25 2b 28 59 25 2a  | 23...".(M%+(Y%*|
00000330  38 29 2d 26 33 43 30 30  29 3c 26 31 30 20 8c f1  |8)-&3C00)<&10 ..|
00000340  3b 22 30 22 3b 0d 00 fa  23 e7 28 4d 25 2b 28 59  |;"0";...#.(M%+(Y|
00000350  25 2a 38 29 2d 26 33 43  30 30 29 3c 26 31 30 30  |%*8)-&3C00)<&100|
00000360  20 8c f1 3b 22 30 22 3b  0d 01 04 24 e7 28 4d 25  | ..;"0";...$.(M%|
00000370  2b 28 59 25 2a 38 29 2d  26 33 43 30 30 29 3c 26  |+(Y%*8)-&3C00)<&|
00000380  31 30 30 30 20 8c f1 3b  22 30 22 3b 0d 01 0e 1d  |1000 ..;"0";....|
00000390  f1 3b 7e 28 4d 25 2b 28  59 25 2a 38 29 2d 26 33  |.;~(M%+(Y%*8)-&3|
000003a0  43 30 30 29 3b 22 20 22  3b 0d 01 18 0d e3 58 25  |C00);" ";.....X%|
000003b0  3d 30 20 b8 20 37 0d 01  22 1f e7 3f 28 4d 25 2b  |=0 . 7.."..?(M%+|
000003c0  28 59 25 2a 38 29 2b 58  25 29 3c 31 36 20 8c f1  |(Y%*8)+X%)<16 ..|
000003d0  3b 22 30 22 3b 0d 01 2c  1d f1 3b 7e 3f 28 4d 25  |;"0";..,..;~?(M%|
000003e0  2b 28 59 25 2a 38 29 2b  58 25 29 3b 22 20 22 3b  |+(Y%*8)+X%);" ";|
000003f0  3a ed 0d 01 36 0d e3 58  25 3d 30 20 b8 20 37 0d  |:...6..X%=0 . 7.|
00000400  01 40 4c e7 3f 28 4d 25  2b 28 59 25 2a 38 29 2b  |.@L.?(M%+(Y%*8)+|
00000410  58 25 29 3e 33 31 20 80  20 3f 28 4d 25 2b 28 59  |X%)>31 . ?(M%+(Y|
00000420  25 2a 38 29 2b 58 25 29  3c 31 32 37 20 8c f1 3b  |%*8)+X%)<127 ..;|
00000430  bd 28 3f 28 4d 25 2b 28  59 25 2a 38 29 2b 58 25  |.(?(M%+(Y%*8)+X%|
00000440  29 29 3b 20 8b f1 3b 22  2e 22 3b 0d 01 4a 11 ed  |)); ..;".";..J..|
00000450  3a f1 3a ed 3a ef 33 31  2c 35 2c 30 0d 01 54 05  |:.:.:.31,5,0..T.|
00000460  e1 0d 01 5e 15 f4 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |...^..**********|
00000470  2a 2a 2a 2a 2a 20 0d 01  68 0b dd f2 65 64 69 74  |***** ..h...edit|
00000480  20 0d 01 72 09 45 25 3d  30 20 0d 01 7c 1c f4 20  | ..r.E%=0 ..|.. |
00000490  41 6c 74 65 72 20 63 75  72 72 65 6e 74 20 65 64  |Alter current ed|
000004a0  69 74 20 6c 6f 63 0d 01  86 19 e7 41 3d 31 33 38  |it loc.....A=138|
000004b0  20 84 20 41 3d 31 33 39  20 8c e5 8d 64 7e 41 0d  | . A=139 ...d~A.|
000004c0  01 90 14 e7 41 3d 31 33  36 20 8c 45 25 3d 45 25  |....A=136 .E%=E%|
000004d0  2d 31 20 0d 01 9a 14 e7  41 3d 31 33 37 20 8c 45  |-1 .....A=137 .E|
000004e0  25 3d 45 25 2b 31 20 0d  01 a4 1c e7 45 25 3c 30  |%=E%+1 .....E%<0|
000004f0  20 8c 45 25 3d 45 25 2b  31 3a 41 3d a5 3a e5 8d  | .E%=E%+1:A=.:..|
00000500  44 7c 41 0d 01 ae 40 20  e7 45 25 3e 28 28 32 34  |D|A...@ .E%>((24|
00000510  2a 38 29 2d 31 29 20 8c  45 25 3d 45 25 2d 31 3a  |*8)-1) .E%=E%-1:|
00000520  ef 33 31 2c 28 35 2b 28  45 25 20 83 38 29 2a 33  |.31,(5+(E% .8)*3|
00000530  29 2c 28 45 25 20 81 38  29 3a 41 3d a5 3a e5 8d  |),(E% .8):A=.:..|
00000540  44 7c 41 0d 01 b8 1d ef  33 31 2c 28 35 2b 28 45  |D|A.....31,(5+(E|
00000550  25 20 83 38 29 2a 33 29  2c 28 45 25 20 81 38 29  |% .8)*3),(E% .8)|
00000560  0d 01 c2 36 e7 28 41 3e  34 37 20 80 20 41 3c 35  |...6.(A>47 . A<5|
00000570  38 29 20 84 20 28 41 3e  36 34 20 80 20 41 3c 37  |8) . (A>64 . A<7|
00000580  31 29 20 8c f1 3b bd 28  41 29 3b 20 8b 41 3d a5  |1) ..;.(A); .A=.|
00000590  3a e5 8d 44 7c 41 0d 01  cc 08 42 3d a5 20 0d 01  |:..D|A....B=. ..|
000005a0  d6 32 e7 28 42 3e 34 37  20 80 20 42 3c 35 38 29  |.2.(B>47 . B<58)|
000005b0  20 84 20 28 42 3e 36 34  20 80 20 42 3c 37 31 29  | . (B>64 . B<71)|
000005c0  20 8c f1 3b bd 28 42 29  3b 20 8b e5 8d 64 4c 41  | ..;.(B); ...dLA|
000005d0  0d 01 e0 24 20 3f 28 4d  25 2b 45 25 29 3d a0 28  |...$ ?(M%+E%)=.(|
000005e0  22 26 22 2b bd 28 41 29  2b bd 28 42 29 29 3a 41  |"&"+.(A)+.(B)):A|
000005f0  3d 31 33 37 0d 01 ea 5f  e7 3f 28 4d 25 2b 45 25  |=137..._.?(M%+E%|
00000600  29 3e 33 31 20 80 20 3f  28 4d 25 2b 45 25 29 3c  |)>31 . ?(M%+E%)<|
00000610  31 32 37 20 8c f1 8a 32  39 2b 28 45 25 20 83 38  |127 ...29+(E% .8|
00000620  29 2c 28 45 25 20 81 38  29 29 3b bd 28 3f 28 4d  |),(E% .8));.(?(M|
00000630  25 2b 45 25 29 29 3b 20  8b f1 8a 32 39 2b 28 45  |%+E%)); ...29+(E|
00000640  25 20 83 38 29 2c 28 45  25 20 81 38 29 29 3b 22  |% .8),(E% .8));"|
00000650  2e 22 3b 0d 01 f4 31 e5  8d 44 7c 41 3a f4 20 41  |.";...1..D|A:. A|
00000660  73 20 41 3d 31 33 37 20  69 74 20 6d 6f 76 65 73  |s A=137 it moves|
00000670  20 6f 6e 20 74 6f 20 74  68 65 20 6e 65 78 74 20  | on to the next |
00000680  63 65 6c 6c 0d 01 fe 06  e1 20 0d ff              |cell..... ..|
0000068c
P/ASCEDIT.m0
P/ASCEDIT.m1
P/ASCEDIT.m2
P/ASCEDIT.m4
P/ASCEDIT.m5