Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_33.ADF » P/+SOLU1

P/+SOLU1

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_33.ADF
Filename: P/+SOLU1
Read OK:
File size: 099B bytes
Load address: 53206576
Exec address: 31756C6F
File contents
MEMORY SCRUB

Sometimes when you're developing a program it is useful to be able to wipe
an area of memory to be sure that old data is not affecting the way the
program is running. 

This short line will put a 0 into every memory location set by the FOR
NEXT loop. 

*KEY0 FOR A=&E00TO&4000:?A=0:NEXT|M

The number &E00 is page on the Master so for the Elk this might be &1D00.
On the Beeb &1900. The number &4000 is the beginning of the screen memory.
?A=0 is BBC BASIC's way of saying poke 0 into location A and since A
starts at &E00 and cycles up to &4000 every location will have 0 poked
into it. |M is simply RETURN and will cause the routine to run as soon as
function key 0 is pressed

Almost any addresses can be used and the screen could be wiped in this
way. Some addresses will cause the computer to lock up but this will not
do the computer any harm at all. And if you happen to wipe area &B00 to
&B38 the routine itself will be wiped and the computer will lockup. 

CHANGING DRIVES IN ADFS

Some people bourght up on DFS are put off ADFS by the number of key
presses needed to change drives and directories.

You have a disc in drive 0, $ directory, subdirectory A then in A there is
a further subdirectory B

Disc in drive 1 $ directory, subdirectory C and in C there is a further
subdirectory D.

You are working on a file FRED in directory B and you want to move it to
directory D.

Type *DIR :1.C.D <RET>

You always need a colon before a drive number and a period before a
directory name. Apart from that it is really easy.

A lot easier than the manual's instructions: *MOUNT1 <RET> 
                                             *DIR C  <RET>
                                             *DIR D  <RET>

This routine can also make changing discs easier.

If you have a single drive, you are working on a file in directory B as
before and you want to save it onto a different disc in directory D, put
the new disc into the drive and type *DIR :0.C.D <RET>

PRINTING TEXT FILES

This routine has been in EUG before but is worth repeating. It was sent in
around EUG16 by someone and I am sorry to say I have forgotten who.

10 *LOAD TEXT 2000
20 VDU14: PRINT"Press SHIFT to scrol"
30 FOR B%=&2000 TO &3F00
40 A%=?B%
50 CALL &FFE3
60 NEXT

Ideally the length of the text file should be added to &2000 and this
figure put in in place of &3F00. If you type *EX <RET> the length is the
third secquence of numbers.

Type P.~ &2000 + &length <RET>

00000000  4d 45 4d 4f 52 59 20 53  43 52 55 42 0d 0d 53 6f  |MEMORY SCRUB..So|
00000010  6d 65 74 69 6d 65 73 20  77 68 65 6e 20 79 6f 75  |metimes when you|
00000020  27 72 65 20 64 65 76 65  6c 6f 70 69 6e 67 20 61  |'re developing a|
00000030  20 70 72 6f 67 72 61 6d  20 69 74 20 69 73 20 75  | program it is u|
00000040  73 65 66 75 6c 20 74 6f  20 62 65 20 61 62 6c 65  |seful to be able|
00000050  20 74 6f 20 77 69 70 65  0d 61 6e 20 61 72 65 61  | to wipe.an area|
00000060  20 6f 66 20 6d 65 6d 6f  72 79 20 74 6f 20 62 65  | of memory to be|
00000070  20 73 75 72 65 20 74 68  61 74 20 6f 6c 64 20 64  | sure that old d|
00000080  61 74 61 20 69 73 20 6e  6f 74 20 61 66 66 65 63  |ata is not affec|
00000090  74 69 6e 67 20 74 68 65  20 77 61 79 20 74 68 65  |ting the way the|
000000a0  0d 70 72 6f 67 72 61 6d  20 69 73 20 72 75 6e 6e  |.program is runn|
000000b0  69 6e 67 2e 20 0d 0d 54  68 69 73 20 73 68 6f 72  |ing. ..This shor|
000000c0  74 20 6c 69 6e 65 20 77  69 6c 6c 20 70 75 74 20  |t line will put |
000000d0  61 20 30 20 69 6e 74 6f  20 65 76 65 72 79 20 6d  |a 0 into every m|
000000e0  65 6d 6f 72 79 20 6c 6f  63 61 74 69 6f 6e 20 73  |emory location s|
000000f0  65 74 20 62 79 20 74 68  65 20 46 4f 52 0d 4e 45  |et by the FOR.NE|
00000100  58 54 20 6c 6f 6f 70 2e  20 0d 0d 2a 4b 45 59 30  |XT loop. ..*KEY0|
00000110  20 46 4f 52 20 41 3d 26  45 30 30 54 4f 26 34 30  | FOR A=&E00TO&40|
00000120  30 30 3a 3f 41 3d 30 3a  4e 45 58 54 7c 4d 0d 0d  |00:?A=0:NEXT|M..|
00000130  54 68 65 20 6e 75 6d 62  65 72 20 26 45 30 30 20  |The number &E00 |
00000140  69 73 20 70 61 67 65 20  6f 6e 20 74 68 65 20 4d  |is page on the M|
00000150  61 73 74 65 72 20 73 6f  20 66 6f 72 20 74 68 65  |aster so for the|
00000160  20 45 6c 6b 20 74 68 69  73 20 6d 69 67 68 74 20  | Elk this might |
00000170  62 65 20 26 31 44 30 30  2e 0d 4f 6e 20 74 68 65  |be &1D00..On the|
00000180  20 42 65 65 62 20 26 31  39 30 30 2e 20 54 68 65  | Beeb &1900. The|
00000190  20 6e 75 6d 62 65 72 20  26 34 30 30 30 20 69 73  | number &4000 is|
000001a0  20 74 68 65 20 62 65 67  69 6e 6e 69 6e 67 20 6f  | the beginning o|
000001b0  66 20 74 68 65 20 73 63  72 65 65 6e 20 6d 65 6d  |f the screen mem|
000001c0  6f 72 79 2e 0d 3f 41 3d  30 20 69 73 20 42 42 43  |ory..?A=0 is BBC|
000001d0  20 42 41 53 49 43 27 73  20 77 61 79 20 6f 66 20  | BASIC's way of |
000001e0  73 61 79 69 6e 67 20 70  6f 6b 65 20 30 20 69 6e  |saying poke 0 in|
000001f0  74 6f 20 6c 6f 63 61 74  69 6f 6e 20 41 20 61 6e  |to location A an|
00000200  64 20 73 69 6e 63 65 20  41 0d 73 74 61 72 74 73  |d since A.starts|
00000210  20 61 74 20 26 45 30 30  20 61 6e 64 20 63 79 63  | at &E00 and cyc|
00000220  6c 65 73 20 75 70 20 74  6f 20 26 34 30 30 30 20  |les up to &4000 |
00000230  65 76 65 72 79 20 6c 6f  63 61 74 69 6f 6e 20 77  |every location w|
00000240  69 6c 6c 20 68 61 76 65  20 30 20 70 6f 6b 65 64  |ill have 0 poked|
00000250  0d 69 6e 74 6f 20 69 74  2e 20 7c 4d 20 69 73 20  |.into it. |M is |
00000260  73 69 6d 70 6c 79 20 52  45 54 55 52 4e 20 61 6e  |simply RETURN an|
00000270  64 20 77 69 6c 6c 20 63  61 75 73 65 20 74 68 65  |d will cause the|
00000280  20 72 6f 75 74 69 6e 65  20 74 6f 20 72 75 6e 20  | routine to run |
00000290  61 73 20 73 6f 6f 6e 20  61 73 0d 66 75 6e 63 74  |as soon as.funct|
000002a0  69 6f 6e 20 6b 65 79 20  30 20 69 73 20 70 72 65  |ion key 0 is pre|
000002b0  73 73 65 64 0d 0d 41 6c  6d 6f 73 74 20 61 6e 79  |ssed..Almost any|
000002c0  20 61 64 64 72 65 73 73  65 73 20 63 61 6e 20 62  | addresses can b|
000002d0  65 20 75 73 65 64 20 61  6e 64 20 74 68 65 20 73  |e used and the s|
000002e0  63 72 65 65 6e 20 63 6f  75 6c 64 20 62 65 20 77  |creen could be w|
000002f0  69 70 65 64 20 69 6e 20  74 68 69 73 0d 77 61 79  |iped in this.way|
00000300  2e 20 53 6f 6d 65 20 61  64 64 72 65 73 73 65 73  |. Some addresses|
00000310  20 77 69 6c 6c 20 63 61  75 73 65 20 74 68 65 20  | will cause the |
00000320  63 6f 6d 70 75 74 65 72  20 74 6f 20 6c 6f 63 6b  |computer to lock|
00000330  20 75 70 20 62 75 74 20  74 68 69 73 20 77 69 6c  | up but this wil|
00000340  6c 20 6e 6f 74 0d 64 6f  20 74 68 65 20 63 6f 6d  |l not.do the com|
00000350  70 75 74 65 72 20 61 6e  79 20 68 61 72 6d 20 61  |puter any harm a|
00000360  74 20 61 6c 6c 2e 20 41  6e 64 20 69 66 20 79 6f  |t all. And if yo|
00000370  75 20 68 61 70 70 65 6e  20 74 6f 20 77 69 70 65  |u happen to wipe|
00000380  20 61 72 65 61 20 26 42  30 30 20 74 6f 0d 26 42  | area &B00 to.&B|
00000390  33 38 20 74 68 65 20 72  6f 75 74 69 6e 65 20 69  |38 the routine i|
000003a0  74 73 65 6c 66 20 77 69  6c 6c 20 62 65 20 77 69  |tself will be wi|
000003b0  70 65 64 20 61 6e 64 20  74 68 65 20 63 6f 6d 70  |ped and the comp|
000003c0  75 74 65 72 20 77 69 6c  6c 20 6c 6f 63 6b 75 70  |uter will lockup|
000003d0  2e 20 0d 0d 43 48 41 4e  47 49 4e 47 20 44 52 49  |. ..CHANGING DRI|
000003e0  56 45 53 20 49 4e 20 41  44 46 53 0d 0d 53 6f 6d  |VES IN ADFS..Som|
000003f0  65 20 70 65 6f 70 6c 65  20 62 6f 75 72 67 68 74  |e people bourght|
00000400  20 75 70 20 6f 6e 20 44  46 53 20 61 72 65 20 70  | up on DFS are p|
00000410  75 74 20 6f 66 66 20 41  44 46 53 20 62 79 20 74  |ut off ADFS by t|
00000420  68 65 20 6e 75 6d 62 65  72 20 6f 66 20 6b 65 79  |he number of key|
00000430  0d 70 72 65 73 73 65 73  20 6e 65 65 64 65 64 20  |.presses needed |
00000440  74 6f 20 63 68 61 6e 67  65 20 64 72 69 76 65 73  |to change drives|
00000450  20 61 6e 64 20 64 69 72  65 63 74 6f 72 69 65 73  | and directories|
00000460  2e 0d 0d 59 6f 75 20 68  61 76 65 20 61 20 64 69  |...You have a di|
00000470  73 63 20 69 6e 20 64 72  69 76 65 20 30 2c 20 24  |sc in drive 0, $|
00000480  20 64 69 72 65 63 74 6f  72 79 2c 20 73 75 62 64  | directory, subd|
00000490  69 72 65 63 74 6f 72 79  20 41 20 74 68 65 6e 20  |irectory A then |
000004a0  69 6e 20 41 20 74 68 65  72 65 20 69 73 0d 61 20  |in A there is.a |
000004b0  66 75 72 74 68 65 72 20  73 75 62 64 69 72 65 63  |further subdirec|
000004c0  74 6f 72 79 20 42 0d 0d  44 69 73 63 20 69 6e 20  |tory B..Disc in |
000004d0  64 72 69 76 65 20 31 20  24 20 64 69 72 65 63 74  |drive 1 $ direct|
000004e0  6f 72 79 2c 20 73 75 62  64 69 72 65 63 74 6f 72  |ory, subdirector|
000004f0  79 20 43 20 61 6e 64 20  69 6e 20 43 20 74 68 65  |y C and in C the|
00000500  72 65 20 69 73 20 61 20  66 75 72 74 68 65 72 0d  |re is a further.|
00000510  73 75 62 64 69 72 65 63  74 6f 72 79 20 44 2e 0d  |subdirectory D..|
00000520  0d 59 6f 75 20 61 72 65  20 77 6f 72 6b 69 6e 67  |.You are working|
00000530  20 6f 6e 20 61 20 66 69  6c 65 20 46 52 45 44 20  | on a file FRED |
00000540  69 6e 20 64 69 72 65 63  74 6f 72 79 20 42 20 61  |in directory B a|
00000550  6e 64 20 79 6f 75 20 77  61 6e 74 20 74 6f 20 6d  |nd you want to m|
00000560  6f 76 65 20 69 74 20 74  6f 0d 64 69 72 65 63 74  |ove it to.direct|
00000570  6f 72 79 20 44 2e 0d 0d  54 79 70 65 20 2a 44 49  |ory D...Type *DI|
00000580  52 20 3a 31 2e 43 2e 44  20 3c 52 45 54 3e 0d 0d  |R :1.C.D <RET>..|
00000590  59 6f 75 20 61 6c 77 61  79 73 20 6e 65 65 64 20  |You always need |
000005a0  61 20 63 6f 6c 6f 6e 20  62 65 66 6f 72 65 20 61  |a colon before a|
000005b0  20 64 72 69 76 65 20 6e  75 6d 62 65 72 20 61 6e  | drive number an|
000005c0  64 20 61 20 70 65 72 69  6f 64 20 62 65 66 6f 72  |d a period befor|
000005d0  65 20 61 0d 64 69 72 65  63 74 6f 72 79 20 6e 61  |e a.directory na|
000005e0  6d 65 2e 20 41 70 61 72  74 20 66 72 6f 6d 20 74  |me. Apart from t|
000005f0  68 61 74 20 69 74 20 69  73 20 72 65 61 6c 6c 79  |hat it is really|
00000600  20 65 61 73 79 2e 0d 0d  41 20 6c 6f 74 20 65 61  | easy...A lot ea|
00000610  73 69 65 72 20 74 68 61  6e 20 74 68 65 20 6d 61  |sier than the ma|
00000620  6e 75 61 6c 27 73 20 69  6e 73 74 72 75 63 74 69  |nual's instructi|
00000630  6f 6e 73 3a 20 2a 4d 4f  55 4e 54 31 20 3c 52 45  |ons: *MOUNT1 <RE|
00000640  54 3e 20 0d 20 20 20 20  20 20 20 20 20 20 20 20  |T> .            |
00000650  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000670  20 2a 44 49 52 20 43 20  20 3c 52 45 54 3e 0d 20  | *DIR C  <RET>. |
00000680  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000006a0  20 20 20 20 20 20 20 20  20 20 20 20 2a 44 49 52  |            *DIR|
000006b0  20 44 20 20 3c 52 45 54  3e 0d 0d 54 68 69 73 20  | D  <RET>..This |
000006c0  72 6f 75 74 69 6e 65 20  63 61 6e 20 61 6c 73 6f  |routine can also|
000006d0  20 6d 61 6b 65 20 63 68  61 6e 67 69 6e 67 20 64  | make changing d|
000006e0  69 73 63 73 20 65 61 73  69 65 72 2e 0d 0d 49 66  |iscs easier...If|
000006f0  20 79 6f 75 20 68 61 76  65 20 61 20 73 69 6e 67  | you have a sing|
00000700  6c 65 20 64 72 69 76 65  2c 20 79 6f 75 20 61 72  |le drive, you ar|
00000710  65 20 77 6f 72 6b 69 6e  67 20 6f 6e 20 61 20 66  |e working on a f|
00000720  69 6c 65 20 69 6e 20 64  69 72 65 63 74 6f 72 79  |ile in directory|
00000730  20 42 20 61 73 0d 62 65  66 6f 72 65 20 61 6e 64  | B as.before and|
00000740  20 79 6f 75 20 77 61 6e  74 20 74 6f 20 73 61 76  | you want to sav|
00000750  65 20 69 74 20 6f 6e 74  6f 20 61 20 64 69 66 66  |e it onto a diff|
00000760  65 72 65 6e 74 20 64 69  73 63 20 69 6e 20 64 69  |erent disc in di|
00000770  72 65 63 74 6f 72 79 20  44 2c 20 70 75 74 0d 74  |rectory D, put.t|
00000780  68 65 20 6e 65 77 20 64  69 73 63 20 69 6e 74 6f  |he new disc into|
00000790  20 74 68 65 20 64 72 69  76 65 20 61 6e 64 20 74  | the drive and t|
000007a0  79 70 65 20 2a 44 49 52  20 3a 30 2e 43 2e 44 20  |ype *DIR :0.C.D |
000007b0  3c 52 45 54 3e 0d 0d 50  52 49 4e 54 49 4e 47 20  |<RET>..PRINTING |
000007c0  54 45 58 54 20 46 49 4c  45 53 0d 0d 54 68 69 73  |TEXT FILES..This|
000007d0  20 72 6f 75 74 69 6e 65  20 68 61 73 20 62 65 65  | routine has bee|
000007e0  6e 20 69 6e 20 45 55 47  20 62 65 66 6f 72 65 20  |n in EUG before |
000007f0  62 75 74 20 69 73 20 77  6f 72 74 68 20 72 65 70  |but is worth rep|
00000800  65 61 74 69 6e 67 2e 20  49 74 20 77 61 73 20 73  |eating. It was s|
00000810  65 6e 74 20 69 6e 0d 61  72 6f 75 6e 64 20 45 55  |ent in.around EU|
00000820  47 31 36 20 62 79 20 73  6f 6d 65 6f 6e 65 20 61  |G16 by someone a|
00000830  6e 64 20 49 20 61 6d 20  73 6f 72 72 79 20 74 6f  |nd I am sorry to|
00000840  20 73 61 79 20 49 20 68  61 76 65 20 66 6f 72 67  | say I have forg|
00000850  6f 74 74 65 6e 20 77 68  6f 2e 0d 0d 31 30 20 2a  |otten who...10 *|
00000860  4c 4f 41 44 20 54 45 58  54 20 32 30 30 30 0d 32  |LOAD TEXT 2000.2|
00000870  30 20 56 44 55 31 34 3a  20 50 52 49 4e 54 22 50  |0 VDU14: PRINT"P|
00000880  72 65 73 73 20 53 48 49  46 54 20 74 6f 20 73 63  |ress SHIFT to sc|
00000890  72 6f 6c 22 0d 33 30 20  46 4f 52 20 42 25 3d 26  |rol".30 FOR B%=&|
000008a0  32 30 30 30 20 54 4f 20  26 33 46 30 30 0d 34 30  |2000 TO &3F00.40|
000008b0  20 41 25 3d 3f 42 25 0d  35 30 20 43 41 4c 4c 20  | A%=?B%.50 CALL |
000008c0  26 46 46 45 33 0d 36 30  20 4e 45 58 54 0d 0d 49  |&FFE3.60 NEXT..I|
000008d0  64 65 61 6c 6c 79 20 74  68 65 20 6c 65 6e 67 74  |deally the lengt|
000008e0  68 20 6f 66 20 74 68 65  20 74 65 78 74 20 66 69  |h of the text fi|
000008f0  6c 65 20 73 68 6f 75 6c  64 20 62 65 20 61 64 64  |le should be add|
00000900  65 64 20 74 6f 20 26 32  30 30 30 20 61 6e 64 20  |ed to &2000 and |
00000910  74 68 69 73 0d 66 69 67  75 72 65 20 70 75 74 20  |this.figure put |
00000920  69 6e 20 69 6e 20 70 6c  61 63 65 20 6f 66 20 26  |in in place of &|
00000930  33 46 30 30 2e 20 49 66  20 79 6f 75 20 74 79 70  |3F00. If you typ|
00000940  65 20 2a 45 58 20 3c 52  45 54 3e 20 74 68 65 20  |e *EX <RET> the |
00000950  6c 65 6e 67 74 68 20 69  73 20 74 68 65 0d 74 68  |length is the.th|
00000960  69 72 64 20 73 65 63 71  75 65 6e 63 65 20 6f 66  |ird secquence of|
00000970  20 6e 75 6d 62 65 72 73  2e 0d 0d 54 79 70 65 20  | numbers...Type |
00000980  50 2e 7e 20 26 32 30 30  30 20 2b 20 26 6c 65 6e  |P.~ &2000 + &len|
00000990  67 74 68 20 3c 52 45 54  3e 0d 0d                 |gth <RET>..|
0000099b
P/+SOLU1.m0
P/+SOLU1.m1
P/+SOLU1.m2
P/+SOLU1.m4
P/+SOLU1.m5