Home » CEEFAX disks » telesoftware8.adl » 30-07-88/T\SWR04

30-07-88/T\SWR04

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 » CEEFAX disks » telesoftware8.adl
Filename: 30-07-88/T\SWR04
Read OK:
File size: 2278 bytes
Load address: 0000
Exec address: FFFFFFFF
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
Mastering Sideways ROM & RAM - Module 04 - Using *ENABLE
--------------------------------------------------------

  In this module I will show you how to use the *ENABLE checker
provided in the Acorn 0.90 DFS. This technique can be adapted for use
in your own sideways ram programs with either DFS 0.90 or DFS 1.20.

  The DFS provides a disc-specific operating system control functions
support (Osfsc) which you can use from your own machine code programs.
Osfsc is vectored by the filing system control vector (FSCV) at &21E
to &FF2A, which switches to the DFS rom and uses the extended FSCV
vector at &DCC to access the DFS.

  Osfsc does not have a direct entry address only an indirect entry at
&21E. The accumulator on entry to Osfsc contains a code defining the
action to be performed. Osfsc called with A=8 (X and Y undefined) is
used by the DFS to implement a protection mechanism on dangerous
commands by insisting that the previous command was *ENABLE.

  Acorn DFS 0.90 has a DFS Enable flag at &10C8. It can have one of
three values shown in figure 4.1




&10C8    Meaning
----------------------------------------------------------
&FF      No record of *ENABLE, flag disabled.
&00      Flag on its way from &01 to &FF, flag transitory.
&01      *ENABLE was the last command, flag enabled.

Figure 4.1 The Enable flag at &10C8 (DFS 0.90)
----------------------------------------------




  Osfsc sets the negative flag if *ENABLE was not the last command. It
also resets the enable flag as shown in figure 4.2




Before call   After call   N flag
--------------------------------
   &FF           &FF         1
   &00           &FF         1
   &01           &00         0

Figure 4.2 The Enable and Negative flags after *ENABLE
------------------------------------------------------




  It can be seen from figure 4.2 that calling Osfsc with A=8 switches
the enable flag from an enabled state (&01) to a transitory state
(&00) and then to a disabled state (&FF). It can also test for *ENABLE
as the previous command (negative flag clear). You will see later in
the module that the transitory state can be used to test for *ENABLE
from sideways ram service utilities but calling Osfsc and testing the
negative flag is the "legal" way to test for *ENABLE from user memory.

  Not all DFS roms fully implement Osfsc with A=8. Acorn DFS 1.20 does
not and DFS roms from manufacturers other than Acorn may not implement
it in the way demonstrated. You can use the program ENABTST to test
your DFS rom. ENABTST must run in the I/O processor.

  Load ENABTST into memory and run the program. It should respond with
"Not enabled at line 230". Type *ENABLE, press Return and run the
program again. If your DFS implements an enable checker the program
will respond with "Enabled at line 230", if the DFS does not implement
an enable checker the program will again respond with "Not enabled at
line 230". If the program responded with the enabled message run it a
third time. If the enable checker works properly the program will go
back to the not enabled message. This test program will show that the
enable checker, if it has been properly implemented in the DFS, will
only indicate an enabled state if *ENABLE was the previous command.




   10 REM: ENABTST
   20 DIM mcode &100
   30 fscv=&21E
   40 FOR pass=0 TO 2 STEP 2
   50 P%=mcode
   60 [       OPT pass
   70 .test
   80         LDA #8
   90         JSR osfsc
  100         BPL enabled
  110         BRK
  120         BRK
  130         OPT FNequs("Not enabled")
  140 .enabled
  150         BRK
  160         BRK
  170         OPT FNequs("Enabled")
  180         BRK
  190 .osfsc
  200         JMP (fscv)
  210 ]
  220 NEXT
  230 CALL test
  240 END
  250 DEFFNequs(string$)
  260 $P%=string$
  270 P%=P%+LEN(string$)
  280 =pass




  The program ENABTST demonstrates the legal use of Osfsc. It should
be called by jumping to a subroutine where the only instruction is an
indirect jump using FSCV, ie. JMP(&21E). Osfsc cannot be used in this
way in a sideways ram program because using a * command to call your
utility will reset the enable flag into its transitory state before
Osfsc has the chance to test it. As you have seen in figure 4.2 Osfsc
cannot distinguish between the transitory state and the disabled state
using the negative flag. In order to use *ENABLE in your own SWR
software you have to cheat by peeking the enable flag directly and
then use the transitory state, when it is on its way from &01 to &FF,
to indicate an enabled state. The flag at &10C8 (&10C7 in DFS 1.20)
will equal zero in the transitory state and this is used to indicate
to SWR software that *ENABLE was the previous command.

 This technique is demonstrated in the program ENABLE which can be
used with either Acorn DFS 0.90 or 1.20 by choosing the appropriate
address for the enable flag in line 90. Remember that this makes the
program DFS specific. If you intend to use this technique you must
specify which DFS is to be used with your programs.

  The program ENABLE uses a "dangerous" routine to reset the computer
and is protected using the *ENABLE command. To show yourself how the
reset works first find the reset address for your computer's operating
system. To find it from BASIC type PRINT ~ !-4 and press Return. With
MOS 1.20 you will get the following result:

>PRINT ~ !-4
  DC1CD9CD
>

  This prints the hexadecimal values of the 4 bytes at the top of the
memory map. The reset address is in bytes &FFFC (low byte) and &FFFD
(high byte), in this example the low byte is &CD and the high byte is
&D9. The reset address is &D9CD. To reset the BBC B with MOS 1.20
type:

>*FX 151,78,127
>CALL &D9CD

  This will reset the computer and clear the user memory. The value of
protecting such a dangerous routine from careless use should be
obvious.

  ENABLE uses a similar header and interpreter to the SWR software
used to illustrate Module 3. The title string, and therefore the
command string, is "RESET". To use the program load the object code it
generates into sideways ram and press Break. Then type *ENABLE and
Return followed by *RESET and Return.

  The enable checker is in lines 600 and 610. If the number stored in
the enable flag is &00 control is passes to the reset routine starting
at line 670. If the enable flag stores any number other than zero the
registers are pulled off the stack and control is passed back to the
MOS with A=0 (lines 620-650). The registers are not pulled off the
stack by the reset routine (lines 680-720) because reseting the
computer in this way also resets the stack pointer.


   10 REM: ENABLE
   20 MODE7
   30 HIMEM=&3C00
   40 DIM save 50
   50 diff=&8000-HIMEM
   60 comvec=&F2
   70 REM: DFS 1.20 enabflag=&10C7
   80 REM: DFS 0.90 enabflag=&10C8
   90 enabflag=&10C8
  100 gsread=&FFC5
  110 osbyte=&FFF4
  120 oscli=&FFF7
  130 reset=&FFFC
  140 FOR pass = 0 TO 2 STEP 2
  150 P%=HIMEM
  160 [       OPT pass
  170         BRK
  180         BRK
  190         BRK
  200         JMP service+diff
  210         OPT FNequb(&82)
  220         OPT FNequb((copyright+diff) MOD 256)
  230         BRK
  240 .title
  250         OPT FNequs("RESET")
  260 .copyright
  270         BRK
  280         OPT FNequs("(C) Gordon Horsington 1987")
  290         BRK
  300 .service
  310         CMP #4
  320         BEQ unrecognised
  330         RTS
  340 .unrecognised
  350         PHA
  360         TXA
  370         PHA
  380         TYA
  390         PHA
  400         LDX #&FF
  410 .comloop
  420         INX
  430         LDA title+diff,X
  440         BEQ found
  450         LDA (comvec),Y
  460         INY
  470         CMP #ASC(".")
  480         BEQ found
  490         AND #&DF
  500         CMP title+diff,X
  510         BEQ comloop
  520 .finish
  530         PLA
  540         TAY
  550         PLA
  560         TAX
  570         PLA
  580         RTS
  590 .found
  600         LDA enabflag
  610         BEQ enabled   \ Flag going from &01 to &FF
  620         PLA
  630         PLA
  640         PLA
  650         LDA #0
  660         RTS
  670 .enabled
  680         LDA #&97
  690         LDX #&4E
  700         LDY #&7F
  710         JSR osbyte    \ *FX151,78,127
  720         JMP (reset)
  730 .lastbyte
  740 ]
  750 NEXT
  760 INPUT'"Save filename = "filename$
  770 IF filename$="" END
  780 $save="SAVE "+filename$+" "+STR$~(HIMEM)+" "+STR$~(las
      tbyte)+" FFFF8000 FFFF8000"
  790 X%=save MOD 256
  800 Y%=save DIV 256
  810 *OPT1,2
  820 CALL oscli
  830 *OPT1,0
  840 END
  850 DEFFNequb(byte)
  860 ?P%=byte
  870 P%=P%+1
  880 =pass
  890 DEFFNequw(word)
  900 ?P%=word MOD 256
  910 P%?1=word DIV 256
  920 P%=P%+2
  930 =pass
  940 DEFFNequd(double)
  950 !P%=double
  960 P%=P%+4
  970 =pass
  980 DEFFNequs(string$)
  990 $P%=string$
 1000 P%=P%+LEN(string$)
 1010 =pass
00000000  4d 61 73 74 65 72 69 6e  67 20 53 69 64 65 77 61  |Mastering Sidewa|
00000010  79 73 20 52 4f 4d 20 26  20 52 41 4d 20 2d 20 4d  |ys ROM & RAM - M|
00000020  6f 64 75 6c 65 20 30 34  20 2d 20 55 73 69 6e 67  |odule 04 - Using|
00000030  20 2a 45 4e 41 42 4c 45  0d 2d 2d 2d 2d 2d 2d 2d  | *ENABLE.-------|
00000040  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000070  2d 0d 0d 20 20 49 6e 20  74 68 69 73 20 6d 6f 64  |-..  In this mod|
00000080  75 6c 65 20 49 20 77 69  6c 6c 20 73 68 6f 77 20  |ule I will show |
00000090  79 6f 75 20 68 6f 77 20  74 6f 20 75 73 65 20 74  |you how to use t|
000000a0  68 65 20 2a 45 4e 41 42  4c 45 20 63 68 65 63 6b  |he *ENABLE check|
000000b0  65 72 0d 70 72 6f 76 69  64 65 64 20 69 6e 20 74  |er.provided in t|
000000c0  68 65 20 41 63 6f 72 6e  20 30 2e 39 30 20 44 46  |he Acorn 0.90 DF|
000000d0  53 2e 20 54 68 69 73 20  74 65 63 68 6e 69 71 75  |S. This techniqu|
000000e0  65 20 63 61 6e 20 62 65  20 61 64 61 70 74 65 64  |e can be adapted|
000000f0  20 66 6f 72 20 75 73 65  0d 69 6e 20 79 6f 75 72  | for use.in your|
00000100  20 6f 77 6e 20 73 69 64  65 77 61 79 73 20 72 61  | own sideways ra|
00000110  6d 20 70 72 6f 67 72 61  6d 73 20 77 69 74 68 20  |m programs with |
00000120  65 69 74 68 65 72 20 44  46 53 20 30 2e 39 30 20  |either DFS 0.90 |
00000130  6f 72 20 44 46 53 20 31  2e 32 30 2e 0d 0d 20 20  |or DFS 1.20...  |
00000140  54 68 65 20 44 46 53 20  70 72 6f 76 69 64 65 73  |The DFS provides|
00000150  20 61 20 64 69 73 63 2d  73 70 65 63 69 66 69 63  | a disc-specific|
00000160  20 6f 70 65 72 61 74 69  6e 67 20 73 79 73 74 65  | operating syste|
00000170  6d 20 63 6f 6e 74 72 6f  6c 20 66 75 6e 63 74 69  |m control functi|
00000180  6f 6e 73 0d 73 75 70 70  6f 72 74 20 28 4f 73 66  |ons.support (Osf|
00000190  73 63 29 20 77 68 69 63  68 20 79 6f 75 20 63 61  |sc) which you ca|
000001a0  6e 20 75 73 65 20 66 72  6f 6d 20 79 6f 75 72 20  |n use from your |
000001b0  6f 77 6e 20 6d 61 63 68  69 6e 65 20 63 6f 64 65  |own machine code|
000001c0  20 70 72 6f 67 72 61 6d  73 2e 0d 4f 73 66 73 63  | programs..Osfsc|
000001d0  20 69 73 20 76 65 63 74  6f 72 65 64 20 62 79 20  | is vectored by |
000001e0  74 68 65 20 66 69 6c 69  6e 67 20 73 79 73 74 65  |the filing syste|
000001f0  6d 20 63 6f 6e 74 72 6f  6c 20 76 65 63 74 6f 72  |m control vector|
00000200  20 28 46 53 43 56 29 20  61 74 20 26 32 31 45 0d  | (FSCV) at &21E.|
00000210  74 6f 20 26 46 46 32 41  2c 20 77 68 69 63 68 20  |to &FF2A, which |
00000220  73 77 69 74 63 68 65 73  20 74 6f 20 74 68 65 20  |switches to the |
00000230  44 46 53 20 72 6f 6d 20  61 6e 64 20 75 73 65 73  |DFS rom and uses|
00000240  20 74 68 65 20 65 78 74  65 6e 64 65 64 20 46 53  | the extended FS|
00000250  43 56 0d 76 65 63 74 6f  72 20 61 74 20 26 44 43  |CV.vector at &DC|
00000260  43 20 74 6f 20 61 63 63  65 73 73 20 74 68 65 20  |C to access the |
00000270  44 46 53 2e 0d 0d 20 20  4f 73 66 73 63 20 64 6f  |DFS...  Osfsc do|
00000280  65 73 20 6e 6f 74 20 68  61 76 65 20 61 20 64 69  |es not have a di|
00000290  72 65 63 74 20 65 6e 74  72 79 20 61 64 64 72 65  |rect entry addre|
000002a0  73 73 20 6f 6e 6c 79 20  61 6e 20 69 6e 64 69 72  |ss only an indir|
000002b0  65 63 74 20 65 6e 74 72  79 20 61 74 0d 26 32 31  |ect entry at.&21|
000002c0  45 2e 20 54 68 65 20 61  63 63 75 6d 75 6c 61 74  |E. The accumulat|
000002d0  6f 72 20 6f 6e 20 65 6e  74 72 79 20 74 6f 20 4f  |or on entry to O|
000002e0  73 66 73 63 20 63 6f 6e  74 61 69 6e 73 20 61 20  |sfsc contains a |
000002f0  63 6f 64 65 20 64 65 66  69 6e 69 6e 67 20 74 68  |code defining th|
00000300  65 0d 61 63 74 69 6f 6e  20 74 6f 20 62 65 20 70  |e.action to be p|
00000310  65 72 66 6f 72 6d 65 64  2e 20 4f 73 66 73 63 20  |erformed. Osfsc |
00000320  63 61 6c 6c 65 64 20 77  69 74 68 20 41 3d 38 20  |called with A=8 |
00000330  28 58 20 61 6e 64 20 59  20 75 6e 64 65 66 69 6e  |(X and Y undefin|
00000340  65 64 29 20 69 73 0d 75  73 65 64 20 62 79 20 74  |ed) is.used by t|
00000350  68 65 20 44 46 53 20 74  6f 20 69 6d 70 6c 65 6d  |he DFS to implem|
00000360  65 6e 74 20 61 20 70 72  6f 74 65 63 74 69 6f 6e  |ent a protection|
00000370  20 6d 65 63 68 61 6e 69  73 6d 20 6f 6e 20 64 61  | mechanism on da|
00000380  6e 67 65 72 6f 75 73 0d  63 6f 6d 6d 61 6e 64 73  |ngerous.commands|
00000390  20 62 79 20 69 6e 73 69  73 74 69 6e 67 20 74 68  | by insisting th|
000003a0  61 74 20 74 68 65 20 70  72 65 76 69 6f 75 73 20  |at the previous |
000003b0  63 6f 6d 6d 61 6e 64 20  77 61 73 20 2a 45 4e 41  |command was *ENA|
000003c0  42 4c 45 2e 0d 0d 20 20  41 63 6f 72 6e 20 44 46  |BLE...  Acorn DF|
000003d0  53 20 30 2e 39 30 20 68  61 73 20 61 20 44 46 53  |S 0.90 has a DFS|
000003e0  20 45 6e 61 62 6c 65 20  66 6c 61 67 20 61 74 20  | Enable flag at |
000003f0  26 31 30 43 38 2e 20 49  74 20 63 61 6e 20 68 61  |&10C8. It can ha|
00000400  76 65 20 6f 6e 65 20 6f  66 0d 74 68 72 65 65 20  |ve one of.three |
00000410  76 61 6c 75 65 73 20 73  68 6f 77 6e 20 69 6e 20  |values shown in |
00000420  66 69 67 75 72 65 20 34  2e 31 0d 0d 0d 0d 0d 26  |figure 4.1.....&|
00000430  31 30 43 38 20 20 20 20  4d 65 61 6e 69 6e 67 0d  |10C8    Meaning.|
00000440  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000470  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 26 46 46 20 20  |----------.&FF  |
00000480  20 20 20 20 4e 6f 20 72  65 63 6f 72 64 20 6f 66  |    No record of|
00000490  20 2a 45 4e 41 42 4c 45  2c 20 66 6c 61 67 20 64  | *ENABLE, flag d|
000004a0  69 73 61 62 6c 65 64 2e  0d 26 30 30 20 20 20 20  |isabled..&00    |
000004b0  20 20 46 6c 61 67 20 6f  6e 20 69 74 73 20 77 61  |  Flag on its wa|
000004c0  79 20 66 72 6f 6d 20 26  30 31 20 74 6f 20 26 46  |y from &01 to &F|
000004d0  46 2c 20 66 6c 61 67 20  74 72 61 6e 73 69 74 6f  |F, flag transito|
000004e0  72 79 2e 0d 26 30 31 20  20 20 20 20 20 2a 45 4e  |ry..&01      *EN|
000004f0  41 42 4c 45 20 77 61 73  20 74 68 65 20 6c 61 73  |ABLE was the las|
00000500  74 20 63 6f 6d 6d 61 6e  64 2c 20 66 6c 61 67 20  |t command, flag |
00000510  65 6e 61 62 6c 65 64 2e  0d 0d 46 69 67 75 72 65  |enabled...Figure|
00000520  20 34 2e 31 20 54 68 65  20 45 6e 61 62 6c 65 20  | 4.1 The Enable |
00000530  66 6c 61 67 20 61 74 20  26 31 30 43 38 20 28 44  |flag at &10C8 (D|
00000540  46 53 20 30 2e 39 30 29  0d 2d 2d 2d 2d 2d 2d 2d  |FS 0.90).-------|
00000550  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000570  2d 2d 2d 2d 2d 2d 2d 0d  0d 0d 0d 0d 20 20 4f 73  |-------.....  Os|
00000580  66 73 63 20 73 65 74 73  20 74 68 65 20 6e 65 67  |fsc sets the neg|
00000590  61 74 69 76 65 20 66 6c  61 67 20 69 66 20 2a 45  |ative flag if *E|
000005a0  4e 41 42 4c 45 20 77 61  73 20 6e 6f 74 20 74 68  |NABLE was not th|
000005b0  65 20 6c 61 73 74 20 63  6f 6d 6d 61 6e 64 2e 20  |e last command. |
000005c0  49 74 0d 61 6c 73 6f 20  72 65 73 65 74 73 20 74  |It.also resets t|
000005d0  68 65 20 65 6e 61 62 6c  65 20 66 6c 61 67 20 61  |he enable flag a|
000005e0  73 20 73 68 6f 77 6e 20  69 6e 20 66 69 67 75 72  |s shown in figur|
000005f0  65 20 34 2e 32 0d 0d 0d  0d 0d 42 65 66 6f 72 65  |e 4.2.....Before|
00000600  20 63 61 6c 6c 20 20 20  41 66 74 65 72 20 63 61  | call   After ca|
00000610  6c 6c 20 20 20 4e 20 66  6c 61 67 0d 2d 2d 2d 2d  |ll   N flag.----|
00000620  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000630  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 20 20 20  |------------.   |
00000640  26 46 46 20 20 20 20 20  20 20 20 20 20 20 26 46  |&FF           &F|
00000650  46 20 20 20 20 20 20 20  20 20 31 0d 20 20 20 26  |F         1.   &|
00000660  30 30 20 20 20 20 20 20  20 20 20 20 20 26 46 46  |00           &FF|
00000670  20 20 20 20 20 20 20 20  20 31 0d 20 20 20 26 30  |         1.   &0|
00000680  31 20 20 20 20 20 20 20  20 20 20 20 26 30 30 20  |1           &00 |
00000690  20 20 20 20 20 20 20 20  30 0d 0d 46 69 67 75 72  |        0..Figur|
000006a0  65 20 34 2e 32 20 54 68  65 20 45 6e 61 62 6c 65  |e 4.2 The Enable|
000006b0  20 61 6e 64 20 4e 65 67  61 74 69 76 65 20 66 6c  | and Negative fl|
000006c0  61 67 73 20 61 66 74 65  72 20 2a 45 4e 41 42 4c  |ags after *ENABL|
000006d0  45 0d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |E.--------------|
000006e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000700  2d 2d 2d 2d 2d 2d 2d 2d  0d 0d 0d 0d 0d 20 20 49  |--------.....  I|
00000710  74 20 63 61 6e 20 62 65  20 73 65 65 6e 20 66 72  |t can be seen fr|
00000720  6f 6d 20 66 69 67 75 72  65 20 34 2e 32 20 74 68  |om figure 4.2 th|
00000730  61 74 20 63 61 6c 6c 69  6e 67 20 4f 73 66 73 63  |at calling Osfsc|
00000740  20 77 69 74 68 20 41 3d  38 20 73 77 69 74 63 68  | with A=8 switch|
00000750  65 73 0d 74 68 65 20 65  6e 61 62 6c 65 20 66 6c  |es.the enable fl|
00000760  61 67 20 66 72 6f 6d 20  61 6e 20 65 6e 61 62 6c  |ag from an enabl|
00000770  65 64 20 73 74 61 74 65  20 28 26 30 31 29 20 74  |ed state (&01) t|
00000780  6f 20 61 20 74 72 61 6e  73 69 74 6f 72 79 20 73  |o a transitory s|
00000790  74 61 74 65 0d 28 26 30  30 29 20 61 6e 64 20 74  |tate.(&00) and t|
000007a0  68 65 6e 20 74 6f 20 61  20 64 69 73 61 62 6c 65  |hen to a disable|
000007b0  64 20 73 74 61 74 65 20  28 26 46 46 29 2e 20 49  |d state (&FF). I|
000007c0  74 20 63 61 6e 20 61 6c  73 6f 20 74 65 73 74 20  |t can also test |
000007d0  66 6f 72 20 2a 45 4e 41  42 4c 45 0d 61 73 20 74  |for *ENABLE.as t|
000007e0  68 65 20 70 72 65 76 69  6f 75 73 20 63 6f 6d 6d  |he previous comm|
000007f0  61 6e 64 20 28 6e 65 67  61 74 69 76 65 20 66 6c  |and (negative fl|
00000800  61 67 20 63 6c 65 61 72  29 2e 20 59 6f 75 20 77  |ag clear). You w|
00000810  69 6c 6c 20 73 65 65 20  6c 61 74 65 72 20 69 6e  |ill see later in|
00000820  0d 74 68 65 20 6d 6f 64  75 6c 65 20 74 68 61 74  |.the module that|
00000830  20 74 68 65 20 74 72 61  6e 73 69 74 6f 72 79 20  | the transitory |
00000840  73 74 61 74 65 20 63 61  6e 20 62 65 20 75 73 65  |state can be use|
00000850  64 20 74 6f 20 74 65 73  74 20 66 6f 72 20 2a 45  |d to test for *E|
00000860  4e 41 42 4c 45 0d 66 72  6f 6d 20 73 69 64 65 77  |NABLE.from sidew|
00000870  61 79 73 20 72 61 6d 20  73 65 72 76 69 63 65 20  |ays ram service |
00000880  75 74 69 6c 69 74 69 65  73 20 62 75 74 20 63 61  |utilities but ca|
00000890  6c 6c 69 6e 67 20 4f 73  66 73 63 20 61 6e 64 20  |lling Osfsc and |
000008a0  74 65 73 74 69 6e 67 20  74 68 65 0d 6e 65 67 61  |testing the.nega|
000008b0  74 69 76 65 20 66 6c 61  67 20 69 73 20 74 68 65  |tive flag is the|
000008c0  20 22 6c 65 67 61 6c 22  20 77 61 79 20 74 6f 20  | "legal" way to |
000008d0  74 65 73 74 20 66 6f 72  20 2a 45 4e 41 42 4c 45  |test for *ENABLE|
000008e0  20 66 72 6f 6d 20 75 73  65 72 20 6d 65 6d 6f 72  | from user memor|
000008f0  79 2e 0d 0d 20 20 4e 6f  74 20 61 6c 6c 20 44 46  |y...  Not all DF|
00000900  53 20 72 6f 6d 73 20 66  75 6c 6c 79 20 69 6d 70  |S roms fully imp|
00000910  6c 65 6d 65 6e 74 20 4f  73 66 73 63 20 77 69 74  |lement Osfsc wit|
00000920  68 20 41 3d 38 2e 20 41  63 6f 72 6e 20 44 46 53  |h A=8. Acorn DFS|
00000930  20 31 2e 32 30 20 64 6f  65 73 0d 6e 6f 74 20 61  | 1.20 does.not a|
00000940  6e 64 20 44 46 53 20 72  6f 6d 73 20 66 72 6f 6d  |nd DFS roms from|
00000950  20 6d 61 6e 75 66 61 63  74 75 72 65 72 73 20 6f  | manufacturers o|
00000960  74 68 65 72 20 74 68 61  6e 20 41 63 6f 72 6e 20  |ther than Acorn |
00000970  6d 61 79 20 6e 6f 74 20  69 6d 70 6c 65 6d 65 6e  |may not implemen|
00000980  74 0d 69 74 20 69 6e 20  74 68 65 20 77 61 79 20  |t.it in the way |
00000990  64 65 6d 6f 6e 73 74 72  61 74 65 64 2e 20 59 6f  |demonstrated. Yo|
000009a0  75 20 63 61 6e 20 75 73  65 20 74 68 65 20 70 72  |u can use the pr|
000009b0  6f 67 72 61 6d 20 45 4e  41 42 54 53 54 20 74 6f  |ogram ENABTST to|
000009c0  20 74 65 73 74 0d 79 6f  75 72 20 44 46 53 20 72  | test.your DFS r|
000009d0  6f 6d 2e 20 45 4e 41 42  54 53 54 20 6d 75 73 74  |om. ENABTST must|
000009e0  20 72 75 6e 20 69 6e 20  74 68 65 20 49 2f 4f 20  | run in the I/O |
000009f0  70 72 6f 63 65 73 73 6f  72 2e 0d 0d 20 20 4c 6f  |processor...  Lo|
00000a00  61 64 20 45 4e 41 42 54  53 54 20 69 6e 74 6f 20  |ad ENABTST into |
00000a10  6d 65 6d 6f 72 79 20 61  6e 64 20 72 75 6e 20 74  |memory and run t|
00000a20  68 65 20 70 72 6f 67 72  61 6d 2e 20 49 74 20 73  |he program. It s|
00000a30  68 6f 75 6c 64 20 72 65  73 70 6f 6e 64 20 77 69  |hould respond wi|
00000a40  74 68 0d 22 4e 6f 74 20  65 6e 61 62 6c 65 64 20  |th."Not enabled |
00000a50  61 74 20 6c 69 6e 65 20  32 33 30 22 2e 20 54 79  |at line 230". Ty|
00000a60  70 65 20 2a 45 4e 41 42  4c 45 2c 20 70 72 65 73  |pe *ENABLE, pres|
00000a70  73 20 52 65 74 75 72 6e  20 61 6e 64 20 72 75 6e  |s Return and run|
00000a80  20 74 68 65 0d 70 72 6f  67 72 61 6d 20 61 67 61  | the.program aga|
00000a90  69 6e 2e 20 49 66 20 79  6f 75 72 20 44 46 53 20  |in. If your DFS |
00000aa0  69 6d 70 6c 65 6d 65 6e  74 73 20 61 6e 20 65 6e  |implements an en|
00000ab0  61 62 6c 65 20 63 68 65  63 6b 65 72 20 74 68 65  |able checker the|
00000ac0  20 70 72 6f 67 72 61 6d  0d 77 69 6c 6c 20 72 65  | program.will re|
00000ad0  73 70 6f 6e 64 20 77 69  74 68 20 22 45 6e 61 62  |spond with "Enab|
00000ae0  6c 65 64 20 61 74 20 6c  69 6e 65 20 32 33 30 22  |led at line 230"|
00000af0  2c 20 69 66 20 74 68 65  20 44 46 53 20 64 6f 65  |, if the DFS doe|
00000b00  73 20 6e 6f 74 20 69 6d  70 6c 65 6d 65 6e 74 0d  |s not implement.|
00000b10  61 6e 20 65 6e 61 62 6c  65 20 63 68 65 63 6b 65  |an enable checke|
00000b20  72 20 74 68 65 20 70 72  6f 67 72 61 6d 20 77 69  |r the program wi|
00000b30  6c 6c 20 61 67 61 69 6e  20 72 65 73 70 6f 6e 64  |ll again respond|
00000b40  20 77 69 74 68 20 22 4e  6f 74 20 65 6e 61 62 6c  | with "Not enabl|
00000b50  65 64 20 61 74 0d 6c 69  6e 65 20 32 33 30 22 2e  |ed at.line 230".|
00000b60  20 49 66 20 74 68 65 20  70 72 6f 67 72 61 6d 20  | If the program |
00000b70  72 65 73 70 6f 6e 64 65  64 20 77 69 74 68 20 74  |responded with t|
00000b80  68 65 20 65 6e 61 62 6c  65 64 20 6d 65 73 73 61  |he enabled messa|
00000b90  67 65 20 72 75 6e 20 69  74 20 61 0d 74 68 69 72  |ge run it a.thir|
00000ba0  64 20 74 69 6d 65 2e 20  49 66 20 74 68 65 20 65  |d time. If the e|
00000bb0  6e 61 62 6c 65 20 63 68  65 63 6b 65 72 20 77 6f  |nable checker wo|
00000bc0  72 6b 73 20 70 72 6f 70  65 72 6c 79 20 74 68 65  |rks properly the|
00000bd0  20 70 72 6f 67 72 61 6d  20 77 69 6c 6c 20 67 6f  | program will go|
00000be0  0d 62 61 63 6b 20 74 6f  20 74 68 65 20 6e 6f 74  |.back to the not|
00000bf0  20 65 6e 61 62 6c 65 64  20 6d 65 73 73 61 67 65  | enabled message|
00000c00  2e 20 54 68 69 73 20 74  65 73 74 20 70 72 6f 67  |. This test prog|
00000c10  72 61 6d 20 77 69 6c 6c  20 73 68 6f 77 20 74 68  |ram will show th|
00000c20  61 74 20 74 68 65 0d 65  6e 61 62 6c 65 20 63 68  |at the.enable ch|
00000c30  65 63 6b 65 72 2c 20 69  66 20 69 74 20 68 61 73  |ecker, if it has|
00000c40  20 62 65 65 6e 20 70 72  6f 70 65 72 6c 79 20 69  | been properly i|
00000c50  6d 70 6c 65 6d 65 6e 74  65 64 20 69 6e 20 74 68  |mplemented in th|
00000c60  65 20 44 46 53 2c 20 77  69 6c 6c 0d 6f 6e 6c 79  |e DFS, will.only|
00000c70  20 69 6e 64 69 63 61 74  65 20 61 6e 20 65 6e 61  | indicate an ena|
00000c80  62 6c 65 64 20 73 74 61  74 65 20 69 66 20 2a 45  |bled state if *E|
00000c90  4e 41 42 4c 45 20 77 61  73 20 74 68 65 20 70 72  |NABLE was the pr|
00000ca0  65 76 69 6f 75 73 20 63  6f 6d 6d 61 6e 64 2e 0d  |evious command..|
00000cb0  0d 0d 0d 0d 20 20 20 31  30 20 52 45 4d 3a 20 45  |....   10 REM: E|
00000cc0  4e 41 42 54 53 54 0d 20  20 20 32 30 20 44 49 4d  |NABTST.   20 DIM|
00000cd0  20 6d 63 6f 64 65 20 26  31 30 30 0d 20 20 20 33  | mcode &100.   3|
00000ce0  30 20 66 73 63 76 3d 26  32 31 45 0d 20 20 20 34  |0 fscv=&21E.   4|
00000cf0  30 20 46 4f 52 20 70 61  73 73 3d 30 20 54 4f 20  |0 FOR pass=0 TO |
00000d00  32 20 53 54 45 50 20 32  0d 20 20 20 35 30 20 50  |2 STEP 2.   50 P|
00000d10  25 3d 6d 63 6f 64 65 0d  20 20 20 36 30 20 5b 20  |%=mcode.   60 [ |
00000d20  20 20 20 20 20 20 4f 50  54 20 70 61 73 73 0d 20  |      OPT pass. |
00000d30  20 20 37 30 20 2e 74 65  73 74 0d 20 20 20 38 30  |  70 .test.   80|
00000d40  20 20 20 20 20 20 20 20  20 4c 44 41 20 23 38 0d  |         LDA #8.|
00000d50  20 20 20 39 30 20 20 20  20 20 20 20 20 20 4a 53  |   90         JS|
00000d60  52 20 6f 73 66 73 63 0d  20 20 31 30 30 20 20 20  |R osfsc.  100   |
00000d70  20 20 20 20 20 20 42 50  4c 20 65 6e 61 62 6c 65  |      BPL enable|
00000d80  64 0d 20 20 31 31 30 20  20 20 20 20 20 20 20 20  |d.  110         |
00000d90  42 52 4b 0d 20 20 31 32  30 20 20 20 20 20 20 20  |BRK.  120       |
00000da0  20 20 42 52 4b 0d 20 20  31 33 30 20 20 20 20 20  |  BRK.  130     |
00000db0  20 20 20 20 4f 50 54 20  46 4e 65 71 75 73 28 22  |    OPT FNequs("|
00000dc0  4e 6f 74 20 65 6e 61 62  6c 65 64 22 29 0d 20 20  |Not enabled").  |
00000dd0  31 34 30 20 2e 65 6e 61  62 6c 65 64 0d 20 20 31  |140 .enabled.  1|
00000de0  35 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |50         BRK. |
00000df0  20 31 36 30 20 20 20 20  20 20 20 20 20 42 52 4b  | 160         BRK|
00000e00  0d 20 20 31 37 30 20 20  20 20 20 20 20 20 20 4f  |.  170         O|
00000e10  50 54 20 46 4e 65 71 75  73 28 22 45 6e 61 62 6c  |PT FNequs("Enabl|
00000e20  65 64 22 29 0d 20 20 31  38 30 20 20 20 20 20 20  |ed").  180      |
00000e30  20 20 20 42 52 4b 0d 20  20 31 39 30 20 2e 6f 73  |   BRK.  190 .os|
00000e40  66 73 63 0d 20 20 32 30  30 20 20 20 20 20 20 20  |fsc.  200       |
00000e50  20 20 4a 4d 50 20 28 66  73 63 76 29 0d 20 20 32  |  JMP (fscv).  2|
00000e60  31 30 20 5d 0d 20 20 32  32 30 20 4e 45 58 54 0d  |10 ].  220 NEXT.|
00000e70  20 20 32 33 30 20 43 41  4c 4c 20 74 65 73 74 0d  |  230 CALL test.|
00000e80  20 20 32 34 30 20 45 4e  44 0d 20 20 32 35 30 20  |  240 END.  250 |
00000e90  44 45 46 46 4e 65 71 75  73 28 73 74 72 69 6e 67  |DEFFNequs(string|
00000ea0  24 29 0d 20 20 32 36 30  20 24 50 25 3d 73 74 72  |$).  260 $P%=str|
00000eb0  69 6e 67 24 0d 20 20 32  37 30 20 50 25 3d 50 25  |ing$.  270 P%=P%|
00000ec0  2b 4c 45 4e 28 73 74 72  69 6e 67 24 29 0d 20 20  |+LEN(string$).  |
00000ed0  32 38 30 20 3d 70 61 73  73 0d 0d 0d 0d 0d 20 20  |280 =pass.....  |
00000ee0  54 68 65 20 70 72 6f 67  72 61 6d 20 45 4e 41 42  |The program ENAB|
00000ef0  54 53 54 20 64 65 6d 6f  6e 73 74 72 61 74 65 73  |TST demonstrates|
00000f00  20 74 68 65 20 6c 65 67  61 6c 20 75 73 65 20 6f  | the legal use o|
00000f10  66 20 4f 73 66 73 63 2e  20 49 74 20 73 68 6f 75  |f Osfsc. It shou|
00000f20  6c 64 0d 62 65 20 63 61  6c 6c 65 64 20 62 79 20  |ld.be called by |
00000f30  6a 75 6d 70 69 6e 67 20  74 6f 20 61 20 73 75 62  |jumping to a sub|
00000f40  72 6f 75 74 69 6e 65 20  77 68 65 72 65 20 74 68  |routine where th|
00000f50  65 20 6f 6e 6c 79 20 69  6e 73 74 72 75 63 74 69  |e only instructi|
00000f60  6f 6e 20 69 73 20 61 6e  0d 69 6e 64 69 72 65 63  |on is an.indirec|
00000f70  74 20 6a 75 6d 70 20 75  73 69 6e 67 20 46 53 43  |t jump using FSC|
00000f80  56 2c 20 69 65 2e 20 4a  4d 50 28 26 32 31 45 29  |V, ie. JMP(&21E)|
00000f90  2e 20 4f 73 66 73 63 20  63 61 6e 6e 6f 74 20 62  |. Osfsc cannot b|
00000fa0  65 20 75 73 65 64 20 69  6e 20 74 68 69 73 0d 77  |e used in this.w|
00000fb0  61 79 20 69 6e 20 61 20  73 69 64 65 77 61 79 73  |ay in a sideways|
00000fc0  20 72 61 6d 20 70 72 6f  67 72 61 6d 20 62 65 63  | ram program bec|
00000fd0  61 75 73 65 20 75 73 69  6e 67 20 61 20 2a 20 63  |ause using a * c|
00000fe0  6f 6d 6d 61 6e 64 20 74  6f 20 63 61 6c 6c 20 79  |ommand to call y|
00000ff0  6f 75 72 0d 75 74 69 6c  69 74 79 20 77 69 6c 6c  |our.utility will|
00001000  20 72 65 73 65 74 20 74  68 65 20 65 6e 61 62 6c  | reset the enabl|
00001010  65 20 66 6c 61 67 20 69  6e 74 6f 20 69 74 73 20  |e flag into its |
00001020  74 72 61 6e 73 69 74 6f  72 79 20 73 74 61 74 65  |transitory state|
00001030  20 62 65 66 6f 72 65 0d  4f 73 66 73 63 20 68 61  | before.Osfsc ha|
00001040  73 20 74 68 65 20 63 68  61 6e 63 65 20 74 6f 20  |s the chance to |
00001050  74 65 73 74 20 69 74 2e  20 41 73 20 79 6f 75 20  |test it. As you |
00001060  68 61 76 65 20 73 65 65  6e 20 69 6e 20 66 69 67  |have seen in fig|
00001070  75 72 65 20 34 2e 32 20  4f 73 66 73 63 0d 63 61  |ure 4.2 Osfsc.ca|
00001080  6e 6e 6f 74 20 64 69 73  74 69 6e 67 75 69 73 68  |nnot distinguish|
00001090  20 62 65 74 77 65 65 6e  20 74 68 65 20 74 72 61  | between the tra|
000010a0  6e 73 69 74 6f 72 79 20  73 74 61 74 65 20 61 6e  |nsitory state an|
000010b0  64 20 74 68 65 20 64 69  73 61 62 6c 65 64 20 73  |d the disabled s|
000010c0  74 61 74 65 0d 75 73 69  6e 67 20 74 68 65 20 6e  |tate.using the n|
000010d0  65 67 61 74 69 76 65 20  66 6c 61 67 2e 20 49 6e  |egative flag. In|
000010e0  20 6f 72 64 65 72 20 74  6f 20 75 73 65 20 2a 45  | order to use *E|
000010f0  4e 41 42 4c 45 20 69 6e  20 79 6f 75 72 20 6f 77  |NABLE in your ow|
00001100  6e 20 53 57 52 0d 73 6f  66 74 77 61 72 65 20 79  |n SWR.software y|
00001110  6f 75 20 68 61 76 65 20  74 6f 20 63 68 65 61 74  |ou have to cheat|
00001120  20 62 79 20 70 65 65 6b  69 6e 67 20 74 68 65 20  | by peeking the |
00001130  65 6e 61 62 6c 65 20 66  6c 61 67 20 64 69 72 65  |enable flag dire|
00001140  63 74 6c 79 20 61 6e 64  0d 74 68 65 6e 20 75 73  |ctly and.then us|
00001150  65 20 74 68 65 20 74 72  61 6e 73 69 74 6f 72 79  |e the transitory|
00001160  20 73 74 61 74 65 2c 20  77 68 65 6e 20 69 74 20  | state, when it |
00001170  69 73 20 6f 6e 20 69 74  73 20 77 61 79 20 66 72  |is on its way fr|
00001180  6f 6d 20 26 30 31 20 74  6f 20 26 46 46 2c 0d 74  |om &01 to &FF,.t|
00001190  6f 20 69 6e 64 69 63 61  74 65 20 61 6e 20 65 6e  |o indicate an en|
000011a0  61 62 6c 65 64 20 73 74  61 74 65 2e 20 54 68 65  |abled state. The|
000011b0  20 66 6c 61 67 20 61 74  20 26 31 30 43 38 20 28  | flag at &10C8 (|
000011c0  26 31 30 43 37 20 69 6e  20 44 46 53 20 31 2e 32  |&10C7 in DFS 1.2|
000011d0  30 29 0d 77 69 6c 6c 20  65 71 75 61 6c 20 7a 65  |0).will equal ze|
000011e0  72 6f 20 69 6e 20 74 68  65 20 74 72 61 6e 73 69  |ro in the transi|
000011f0  74 6f 72 79 20 73 74 61  74 65 20 61 6e 64 20 74  |tory state and t|
00001200  68 69 73 20 69 73 20 75  73 65 64 20 74 6f 20 69  |his is used to i|
00001210  6e 64 69 63 61 74 65 0d  74 6f 20 53 57 52 20 73  |ndicate.to SWR s|
00001220  6f 66 74 77 61 72 65 20  74 68 61 74 20 2a 45 4e  |oftware that *EN|
00001230  41 42 4c 45 20 77 61 73  20 74 68 65 20 70 72 65  |ABLE was the pre|
00001240  76 69 6f 75 73 20 63 6f  6d 6d 61 6e 64 2e 0d 0d  |vious command...|
00001250  20 54 68 69 73 20 74 65  63 68 6e 69 71 75 65 20  | This technique |
00001260  69 73 20 64 65 6d 6f 6e  73 74 72 61 74 65 64 20  |is demonstrated |
00001270  69 6e 20 74 68 65 20 70  72 6f 67 72 61 6d 20 45  |in the program E|
00001280  4e 41 42 4c 45 20 77 68  69 63 68 20 63 61 6e 20  |NABLE which can |
00001290  62 65 0d 75 73 65 64 20  77 69 74 68 20 65 69 74  |be.used with eit|
000012a0  68 65 72 20 41 63 6f 72  6e 20 44 46 53 20 30 2e  |her Acorn DFS 0.|
000012b0  39 30 20 6f 72 20 31 2e  32 30 20 62 79 20 63 68  |90 or 1.20 by ch|
000012c0  6f 6f 73 69 6e 67 20 74  68 65 20 61 70 70 72 6f  |oosing the appro|
000012d0  70 72 69 61 74 65 0d 61  64 64 72 65 73 73 20 66  |priate.address f|
000012e0  6f 72 20 74 68 65 20 65  6e 61 62 6c 65 20 66 6c  |or the enable fl|
000012f0  61 67 20 69 6e 20 6c 69  6e 65 20 39 30 2e 20 52  |ag in line 90. R|
00001300  65 6d 65 6d 62 65 72 20  74 68 61 74 20 74 68 69  |emember that thi|
00001310  73 20 6d 61 6b 65 73 20  74 68 65 0d 70 72 6f 67  |s makes the.prog|
00001320  72 61 6d 20 44 46 53 20  73 70 65 63 69 66 69 63  |ram DFS specific|
00001330  2e 20 49 66 20 79 6f 75  20 69 6e 74 65 6e 64 20  |. If you intend |
00001340  74 6f 20 75 73 65 20 74  68 69 73 20 74 65 63 68  |to use this tech|
00001350  6e 69 71 75 65 20 79 6f  75 20 6d 75 73 74 0d 73  |nique you must.s|
00001360  70 65 63 69 66 79 20 77  68 69 63 68 20 44 46 53  |pecify which DFS|
00001370  20 69 73 20 74 6f 20 62  65 20 75 73 65 64 20 77  | is to be used w|
00001380  69 74 68 20 79 6f 75 72  20 70 72 6f 67 72 61 6d  |ith your program|
00001390  73 2e 0d 0d 20 20 54 68  65 20 70 72 6f 67 72 61  |s...  The progra|
000013a0  6d 20 45 4e 41 42 4c 45  20 75 73 65 73 20 61 20  |m ENABLE uses a |
000013b0  22 64 61 6e 67 65 72 6f  75 73 22 20 72 6f 75 74  |"dangerous" rout|
000013c0  69 6e 65 20 74 6f 20 72  65 73 65 74 20 74 68 65  |ine to reset the|
000013d0  20 63 6f 6d 70 75 74 65  72 0d 61 6e 64 20 69 73  | computer.and is|
000013e0  20 70 72 6f 74 65 63 74  65 64 20 75 73 69 6e 67  | protected using|
000013f0  20 74 68 65 20 2a 45 4e  41 42 4c 45 20 63 6f 6d  | the *ENABLE com|
00001400  6d 61 6e 64 2e 20 54 6f  20 73 68 6f 77 20 79 6f  |mand. To show yo|
00001410  75 72 73 65 6c 66 20 68  6f 77 20 74 68 65 0d 72  |urself how the.r|
00001420  65 73 65 74 20 77 6f 72  6b 73 20 66 69 72 73 74  |eset works first|
00001430  20 66 69 6e 64 20 74 68  65 20 72 65 73 65 74 20  | find the reset |
00001440  61 64 64 72 65 73 73 20  66 6f 72 20 79 6f 75 72  |address for your|
00001450  20 63 6f 6d 70 75 74 65  72 27 73 20 6f 70 65 72  | computer's oper|
00001460  61 74 69 6e 67 0d 73 79  73 74 65 6d 2e 20 54 6f  |ating.system. To|
00001470  20 66 69 6e 64 20 69 74  20 66 72 6f 6d 20 42 41  | find it from BA|
00001480  53 49 43 20 74 79 70 65  20 50 52 49 4e 54 20 7e  |SIC type PRINT ~|
00001490  20 21 2d 34 20 61 6e 64  20 70 72 65 73 73 20 52  | !-4 and press R|
000014a0  65 74 75 72 6e 2e 20 57  69 74 68 0d 4d 4f 53 20  |eturn. With.MOS |
000014b0  31 2e 32 30 20 79 6f 75  20 77 69 6c 6c 20 67 65  |1.20 you will ge|
000014c0  74 20 74 68 65 20 66 6f  6c 6c 6f 77 69 6e 67 20  |t the following |
000014d0  72 65 73 75 6c 74 3a 0d  0d 3e 50 52 49 4e 54 20  |result:..>PRINT |
000014e0  7e 20 21 2d 34 0d 20 20  44 43 31 43 44 39 43 44  |~ !-4.  DC1CD9CD|
000014f0  0d 3e 0d 0d 20 20 54 68  69 73 20 70 72 69 6e 74  |.>..  This print|
00001500  73 20 74 68 65 20 68 65  78 61 64 65 63 69 6d 61  |s the hexadecima|
00001510  6c 20 76 61 6c 75 65 73  20 6f 66 20 74 68 65 20  |l values of the |
00001520  34 20 62 79 74 65 73 20  61 74 20 74 68 65 20 74  |4 bytes at the t|
00001530  6f 70 20 6f 66 20 74 68  65 0d 6d 65 6d 6f 72 79  |op of the.memory|
00001540  20 6d 61 70 2e 20 54 68  65 20 72 65 73 65 74 20  | map. The reset |
00001550  61 64 64 72 65 73 73 20  69 73 20 69 6e 20 62 79  |address is in by|
00001560  74 65 73 20 26 46 46 46  43 20 28 6c 6f 77 20 62  |tes &FFFC (low b|
00001570  79 74 65 29 20 61 6e 64  20 26 46 46 46 44 0d 28  |yte) and &FFFD.(|
00001580  68 69 67 68 20 62 79 74  65 29 2c 20 69 6e 20 74  |high byte), in t|
00001590  68 69 73 20 65 78 61 6d  70 6c 65 20 74 68 65 20  |his example the |
000015a0  6c 6f 77 20 62 79 74 65  20 69 73 20 26 43 44 20  |low byte is &CD |
000015b0  61 6e 64 20 74 68 65 20  68 69 67 68 20 62 79 74  |and the high byt|
000015c0  65 20 69 73 0d 26 44 39  2e 20 54 68 65 20 72 65  |e is.&D9. The re|
000015d0  73 65 74 20 61 64 64 72  65 73 73 20 69 73 20 26  |set address is &|
000015e0  44 39 43 44 2e 20 54 6f  20 72 65 73 65 74 20 74  |D9CD. To reset t|
000015f0  68 65 20 42 42 43 20 42  20 77 69 74 68 20 4d 4f  |he BBC B with MO|
00001600  53 20 31 2e 32 30 0d 74  79 70 65 3a 0d 0d 3e 2a  |S 1.20.type:..>*|
00001610  46 58 20 31 35 31 2c 37  38 2c 31 32 37 0d 3e 43  |FX 151,78,127.>C|
00001620  41 4c 4c 20 26 44 39 43  44 0d 0d 20 20 54 68 69  |ALL &D9CD..  Thi|
00001630  73 20 77 69 6c 6c 20 72  65 73 65 74 20 74 68 65  |s will reset the|
00001640  20 63 6f 6d 70 75 74 65  72 20 61 6e 64 20 63 6c  | computer and cl|
00001650  65 61 72 20 74 68 65 20  75 73 65 72 20 6d 65 6d  |ear the user mem|
00001660  6f 72 79 2e 20 54 68 65  20 76 61 6c 75 65 20 6f  |ory. The value o|
00001670  66 0d 70 72 6f 74 65 63  74 69 6e 67 20 73 75 63  |f.protecting suc|
00001680  68 20 61 20 64 61 6e 67  65 72 6f 75 73 20 72 6f  |h a dangerous ro|
00001690  75 74 69 6e 65 20 66 72  6f 6d 20 63 61 72 65 6c  |utine from carel|
000016a0  65 73 73 20 75 73 65 20  73 68 6f 75 6c 64 20 62  |ess use should b|
000016b0  65 0d 6f 62 76 69 6f 75  73 2e 0d 0d 20 20 45 4e  |e.obvious...  EN|
000016c0  41 42 4c 45 20 75 73 65  73 20 61 20 73 69 6d 69  |ABLE uses a simi|
000016d0  6c 61 72 20 68 65 61 64  65 72 20 61 6e 64 20 69  |lar header and i|
000016e0  6e 74 65 72 70 72 65 74  65 72 20 74 6f 20 74 68  |nterpreter to th|
000016f0  65 20 53 57 52 20 73 6f  66 74 77 61 72 65 0d 75  |e SWR software.u|
00001700  73 65 64 20 74 6f 20 69  6c 6c 75 73 74 72 61 74  |sed to illustrat|
00001710  65 20 4d 6f 64 75 6c 65  20 33 2e 20 54 68 65 20  |e Module 3. The |
00001720  74 69 74 6c 65 20 73 74  72 69 6e 67 2c 20 61 6e  |title string, an|
00001730  64 20 74 68 65 72 65 66  6f 72 65 20 74 68 65 0d  |d therefore the.|
00001740  63 6f 6d 6d 61 6e 64 20  73 74 72 69 6e 67 2c 20  |command string, |
00001750  69 73 20 22 52 45 53 45  54 22 2e 20 54 6f 20 75  |is "RESET". To u|
00001760  73 65 20 74 68 65 20 70  72 6f 67 72 61 6d 20 6c  |se the program l|
00001770  6f 61 64 20 74 68 65 20  6f 62 6a 65 63 74 20 63  |oad the object c|
00001780  6f 64 65 20 69 74 0d 67  65 6e 65 72 61 74 65 73  |ode it.generates|
00001790  20 69 6e 74 6f 20 73 69  64 65 77 61 79 73 20 72  | into sideways r|
000017a0  61 6d 20 61 6e 64 20 70  72 65 73 73 20 42 72 65  |am and press Bre|
000017b0  61 6b 2e 20 54 68 65 6e  20 74 79 70 65 20 2a 45  |ak. Then type *E|
000017c0  4e 41 42 4c 45 20 61 6e  64 0d 52 65 74 75 72 6e  |NABLE and.Return|
000017d0  20 66 6f 6c 6c 6f 77 65  64 20 62 79 20 2a 52 45  | followed by *RE|
000017e0  53 45 54 20 61 6e 64 20  52 65 74 75 72 6e 2e 0d  |SET and Return..|
000017f0  0d 20 20 54 68 65 20 65  6e 61 62 6c 65 20 63 68  |.  The enable ch|
00001800  65 63 6b 65 72 20 69 73  20 69 6e 20 6c 69 6e 65  |ecker is in line|
00001810  73 20 36 30 30 20 61 6e  64 20 36 31 30 2e 20 49  |s 600 and 610. I|
00001820  66 20 74 68 65 20 6e 75  6d 62 65 72 20 73 74 6f  |f the number sto|
00001830  72 65 64 20 69 6e 0d 74  68 65 20 65 6e 61 62 6c  |red in.the enabl|
00001840  65 20 66 6c 61 67 20 69  73 20 26 30 30 20 63 6f  |e flag is &00 co|
00001850  6e 74 72 6f 6c 20 69 73  20 70 61 73 73 65 73 20  |ntrol is passes |
00001860  74 6f 20 74 68 65 20 72  65 73 65 74 20 72 6f 75  |to the reset rou|
00001870  74 69 6e 65 20 73 74 61  72 74 69 6e 67 0d 61 74  |tine starting.at|
00001880  20 6c 69 6e 65 20 36 37  30 2e 20 49 66 20 74 68  | line 670. If th|
00001890  65 20 65 6e 61 62 6c 65  20 66 6c 61 67 20 73 74  |e enable flag st|
000018a0  6f 72 65 73 20 61 6e 79  20 6e 75 6d 62 65 72 20  |ores any number |
000018b0  6f 74 68 65 72 20 74 68  61 6e 20 7a 65 72 6f 20  |other than zero |
000018c0  74 68 65 0d 72 65 67 69  73 74 65 72 73 20 61 72  |the.registers ar|
000018d0  65 20 70 75 6c 6c 65 64  20 6f 66 66 20 74 68 65  |e pulled off the|
000018e0  20 73 74 61 63 6b 20 61  6e 64 20 63 6f 6e 74 72  | stack and contr|
000018f0  6f 6c 20 69 73 20 70 61  73 73 65 64 20 62 61 63  |ol is passed bac|
00001900  6b 20 74 6f 20 74 68 65  0d 4d 4f 53 20 77 69 74  |k to the.MOS wit|
00001910  68 20 41 3d 30 20 28 6c  69 6e 65 73 20 36 32 30  |h A=0 (lines 620|
00001920  2d 36 35 30 29 2e 20 54  68 65 20 72 65 67 69 73  |-650). The regis|
00001930  74 65 72 73 20 61 72 65  20 6e 6f 74 20 70 75 6c  |ters are not pul|
00001940  6c 65 64 20 6f 66 66 20  74 68 65 0d 73 74 61 63  |led off the.stac|
00001950  6b 20 62 79 20 74 68 65  20 72 65 73 65 74 20 72  |k by the reset r|
00001960  6f 75 74 69 6e 65 20 28  6c 69 6e 65 73 20 36 38  |outine (lines 68|
00001970  30 2d 37 32 30 29 20 62  65 63 61 75 73 65 20 72  |0-720) because r|
00001980  65 73 65 74 69 6e 67 20  74 68 65 0d 63 6f 6d 70  |eseting the.comp|
00001990  75 74 65 72 20 69 6e 20  74 68 69 73 20 77 61 79  |uter in this way|
000019a0  20 61 6c 73 6f 20 72 65  73 65 74 73 20 74 68 65  | also resets the|
000019b0  20 73 74 61 63 6b 20 70  6f 69 6e 74 65 72 2e 0d  | stack pointer..|
000019c0  0d 0d 20 20 20 31 30 20  52 45 4d 3a 20 45 4e 41  |..   10 REM: ENA|
000019d0  42 4c 45 0d 20 20 20 32  30 20 4d 4f 44 45 37 0d  |BLE.   20 MODE7.|
000019e0  20 20 20 33 30 20 48 49  4d 45 4d 3d 26 33 43 30  |   30 HIMEM=&3C0|
000019f0  30 0d 20 20 20 34 30 20  44 49 4d 20 73 61 76 65  |0.   40 DIM save|
00001a00  20 35 30 0d 20 20 20 35  30 20 64 69 66 66 3d 26  | 50.   50 diff=&|
00001a10  38 30 30 30 2d 48 49 4d  45 4d 0d 20 20 20 36 30  |8000-HIMEM.   60|
00001a20  20 63 6f 6d 76 65 63 3d  26 46 32 0d 20 20 20 37  | comvec=&F2.   7|
00001a30  30 20 52 45 4d 3a 20 44  46 53 20 31 2e 32 30 20  |0 REM: DFS 1.20 |
00001a40  65 6e 61 62 66 6c 61 67  3d 26 31 30 43 37 0d 20  |enabflag=&10C7. |
00001a50  20 20 38 30 20 52 45 4d  3a 20 44 46 53 20 30 2e  |  80 REM: DFS 0.|
00001a60  39 30 20 65 6e 61 62 66  6c 61 67 3d 26 31 30 43  |90 enabflag=&10C|
00001a70  38 0d 20 20 20 39 30 20  65 6e 61 62 66 6c 61 67  |8.   90 enabflag|
00001a80  3d 26 31 30 43 38 0d 20  20 31 30 30 20 67 73 72  |=&10C8.  100 gsr|
00001a90  65 61 64 3d 26 46 46 43  35 0d 20 20 31 31 30 20  |ead=&FFC5.  110 |
00001aa0  6f 73 62 79 74 65 3d 26  46 46 46 34 0d 20 20 31  |osbyte=&FFF4.  1|
00001ab0  32 30 20 6f 73 63 6c 69  3d 26 46 46 46 37 0d 20  |20 oscli=&FFF7. |
00001ac0  20 31 33 30 20 72 65 73  65 74 3d 26 46 46 46 43  | 130 reset=&FFFC|
00001ad0  0d 20 20 31 34 30 20 46  4f 52 20 70 61 73 73 20  |.  140 FOR pass |
00001ae0  3d 20 30 20 54 4f 20 32  20 53 54 45 50 20 32 0d  |= 0 TO 2 STEP 2.|
00001af0  20 20 31 35 30 20 50 25  3d 48 49 4d 45 4d 0d 20  |  150 P%=HIMEM. |
00001b00  20 31 36 30 20 5b 20 20  20 20 20 20 20 4f 50 54  | 160 [       OPT|
00001b10  20 70 61 73 73 0d 20 20  31 37 30 20 20 20 20 20  | pass.  170     |
00001b20  20 20 20 20 42 52 4b 0d  20 20 31 38 30 20 20 20  |    BRK.  180   |
00001b30  20 20 20 20 20 20 42 52  4b 0d 20 20 31 39 30 20  |      BRK.  190 |
00001b40  20 20 20 20 20 20 20 20  42 52 4b 0d 20 20 32 30  |        BRK.  20|
00001b50  30 20 20 20 20 20 20 20  20 20 4a 4d 50 20 73 65  |0         JMP se|
00001b60  72 76 69 63 65 2b 64 69  66 66 0d 20 20 32 31 30  |rvice+diff.  210|
00001b70  20 20 20 20 20 20 20 20  20 4f 50 54 20 46 4e 65  |         OPT FNe|
00001b80  71 75 62 28 26 38 32 29  0d 20 20 32 32 30 20 20  |qub(&82).  220  |
00001b90  20 20 20 20 20 20 20 4f  50 54 20 46 4e 65 71 75  |       OPT FNequ|
00001ba0  62 28 28 63 6f 70 79 72  69 67 68 74 2b 64 69 66  |b((copyright+dif|
00001bb0  66 29 20 4d 4f 44 20 32  35 36 29 0d 20 20 32 33  |f) MOD 256).  23|
00001bc0  30 20 20 20 20 20 20 20  20 20 42 52 4b 0d 20 20  |0         BRK.  |
00001bd0  32 34 30 20 2e 74 69 74  6c 65 0d 20 20 32 35 30  |240 .title.  250|
00001be0  20 20 20 20 20 20 20 20  20 4f 50 54 20 46 4e 65  |         OPT FNe|
00001bf0  71 75 73 28 22 52 45 53  45 54 22 29 0d 20 20 32  |qus("RESET").  2|
00001c00  36 30 20 2e 63 6f 70 79  72 69 67 68 74 0d 20 20  |60 .copyright.  |
00001c10  32 37 30 20 20 20 20 20  20 20 20 20 42 52 4b 0d  |270         BRK.|
00001c20  20 20 32 38 30 20 20 20  20 20 20 20 20 20 4f 50  |  280         OP|
00001c30  54 20 46 4e 65 71 75 73  28 22 28 43 29 20 47 6f  |T FNequs("(C) Go|
00001c40  72 64 6f 6e 20 48 6f 72  73 69 6e 67 74 6f 6e 20  |rdon Horsington |
00001c50  31 39 38 37 22 29 0d 20  20 32 39 30 20 20 20 20  |1987").  290    |
00001c60  20 20 20 20 20 42 52 4b  0d 20 20 33 30 30 20 2e  |     BRK.  300 .|
00001c70  73 65 72 76 69 63 65 0d  20 20 33 31 30 20 20 20  |service.  310   |
00001c80  20 20 20 20 20 20 43 4d  50 20 23 34 0d 20 20 33  |      CMP #4.  3|
00001c90  32 30 20 20 20 20 20 20  20 20 20 42 45 51 20 75  |20         BEQ u|
00001ca0  6e 72 65 63 6f 67 6e 69  73 65 64 0d 20 20 33 33  |nrecognised.  33|
00001cb0  30 20 20 20 20 20 20 20  20 20 52 54 53 0d 20 20  |0         RTS.  |
00001cc0  33 34 30 20 2e 75 6e 72  65 63 6f 67 6e 69 73 65  |340 .unrecognise|
00001cd0  64 0d 20 20 33 35 30 20  20 20 20 20 20 20 20 20  |d.  350         |
00001ce0  50 48 41 0d 20 20 33 36  30 20 20 20 20 20 20 20  |PHA.  360       |
00001cf0  20 20 54 58 41 0d 20 20  33 37 30 20 20 20 20 20  |  TXA.  370     |
00001d00  20 20 20 20 50 48 41 0d  20 20 33 38 30 20 20 20  |    PHA.  380   |
00001d10  20 20 20 20 20 20 54 59  41 0d 20 20 33 39 30 20  |      TYA.  390 |
00001d20  20 20 20 20 20 20 20 20  50 48 41 0d 20 20 34 30  |        PHA.  40|
00001d30  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 23 26  |0         LDX #&|
00001d40  46 46 0d 20 20 34 31 30  20 2e 63 6f 6d 6c 6f 6f  |FF.  410 .comloo|
00001d50  70 0d 20 20 34 32 30 20  20 20 20 20 20 20 20 20  |p.  420         |
00001d60  49 4e 58 0d 20 20 34 33  30 20 20 20 20 20 20 20  |INX.  430       |
00001d70  20 20 4c 44 41 20 74 69  74 6c 65 2b 64 69 66 66  |  LDA title+diff|
00001d80  2c 58 0d 20 20 34 34 30  20 20 20 20 20 20 20 20  |,X.  440        |
00001d90  20 42 45 51 20 66 6f 75  6e 64 0d 20 20 34 35 30  | BEQ found.  450|
00001da0  20 20 20 20 20 20 20 20  20 4c 44 41 20 28 63 6f  |         LDA (co|
00001db0  6d 76 65 63 29 2c 59 0d  20 20 34 36 30 20 20 20  |mvec),Y.  460   |
00001dc0  20 20 20 20 20 20 49 4e  59 0d 20 20 34 37 30 20  |      INY.  470 |
00001dd0  20 20 20 20 20 20 20 20  43 4d 50 20 23 41 53 43  |        CMP #ASC|
00001de0  28 22 2e 22 29 0d 20 20  34 38 30 20 20 20 20 20  |(".").  480     |
00001df0  20 20 20 20 42 45 51 20  66 6f 75 6e 64 0d 20 20  |    BEQ found.  |
00001e00  34 39 30 20 20 20 20 20  20 20 20 20 41 4e 44 20  |490         AND |
00001e10  23 26 44 46 0d 20 20 35  30 30 20 20 20 20 20 20  |#&DF.  500      |
00001e20  20 20 20 43 4d 50 20 74  69 74 6c 65 2b 64 69 66  |   CMP title+dif|
00001e30  66 2c 58 0d 20 20 35 31  30 20 20 20 20 20 20 20  |f,X.  510       |
00001e40  20 20 42 45 51 20 63 6f  6d 6c 6f 6f 70 0d 20 20  |  BEQ comloop.  |
00001e50  35 32 30 20 2e 66 69 6e  69 73 68 0d 20 20 35 33  |520 .finish.  53|
00001e60  30 20 20 20 20 20 20 20  20 20 50 4c 41 0d 20 20  |0         PLA.  |
00001e70  35 34 30 20 20 20 20 20  20 20 20 20 54 41 59 0d  |540         TAY.|
00001e80  20 20 35 35 30 20 20 20  20 20 20 20 20 20 50 4c  |  550         PL|
00001e90  41 0d 20 20 35 36 30 20  20 20 20 20 20 20 20 20  |A.  560         |
00001ea0  54 41 58 0d 20 20 35 37  30 20 20 20 20 20 20 20  |TAX.  570       |
00001eb0  20 20 50 4c 41 0d 20 20  35 38 30 20 20 20 20 20  |  PLA.  580     |
00001ec0  20 20 20 20 52 54 53 0d  20 20 35 39 30 20 2e 66  |    RTS.  590 .f|
00001ed0  6f 75 6e 64 0d 20 20 36  30 30 20 20 20 20 20 20  |ound.  600      |
00001ee0  20 20 20 4c 44 41 20 65  6e 61 62 66 6c 61 67 0d  |   LDA enabflag.|
00001ef0  20 20 36 31 30 20 20 20  20 20 20 20 20 20 42 45  |  610         BE|
00001f00  51 20 65 6e 61 62 6c 65  64 20 20 20 5c 20 46 6c  |Q enabled   \ Fl|
00001f10  61 67 20 67 6f 69 6e 67  20 66 72 6f 6d 20 26 30  |ag going from &0|
00001f20  31 20 74 6f 20 26 46 46  0d 20 20 36 32 30 20 20  |1 to &FF.  620  |
00001f30  20 20 20 20 20 20 20 50  4c 41 0d 20 20 36 33 30  |       PLA.  630|
00001f40  20 20 20 20 20 20 20 20  20 50 4c 41 0d 20 20 36  |         PLA.  6|
00001f50  34 30 20 20 20 20 20 20  20 20 20 50 4c 41 0d 20  |40         PLA. |
00001f60  20 36 35 30 20 20 20 20  20 20 20 20 20 4c 44 41  | 650         LDA|
00001f70  20 23 30 0d 20 20 36 36  30 20 20 20 20 20 20 20  | #0.  660       |
00001f80  20 20 52 54 53 0d 20 20  36 37 30 20 2e 65 6e 61  |  RTS.  670 .ena|
00001f90  62 6c 65 64 0d 20 20 36  38 30 20 20 20 20 20 20  |bled.  680      |
00001fa0  20 20 20 4c 44 41 20 23  26 39 37 0d 20 20 36 39  |   LDA #&97.  69|
00001fb0  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 23 26  |0         LDX #&|
00001fc0  34 45 0d 20 20 37 30 30  20 20 20 20 20 20 20 20  |4E.  700        |
00001fd0  20 4c 44 59 20 23 26 37  46 0d 20 20 37 31 30 20  | LDY #&7F.  710 |
00001fe0  20 20 20 20 20 20 20 20  4a 53 52 20 6f 73 62 79  |        JSR osby|
00001ff0  74 65 20 20 20 20 5c 20  2a 46 58 31 35 31 2c 37  |te    \ *FX151,7|
00002000  38 2c 31 32 37 0d 20 20  37 32 30 20 20 20 20 20  |8,127.  720     |
00002010  20 20 20 20 4a 4d 50 20  28 72 65 73 65 74 29 0d  |    JMP (reset).|
00002020  20 20 37 33 30 20 2e 6c  61 73 74 62 79 74 65 0d  |  730 .lastbyte.|
00002030  20 20 37 34 30 20 5d 0d  20 20 37 35 30 20 4e 45  |  740 ].  750 NE|
00002040  58 54 0d 20 20 37 36 30  20 49 4e 50 55 54 27 22  |XT.  760 INPUT'"|
00002050  53 61 76 65 20 66 69 6c  65 6e 61 6d 65 20 3d 20  |Save filename = |
00002060  22 66 69 6c 65 6e 61 6d  65 24 0d 20 20 37 37 30  |"filename$.  770|
00002070  20 49 46 20 66 69 6c 65  6e 61 6d 65 24 3d 22 22  | IF filename$=""|
00002080  20 45 4e 44 0d 20 20 37  38 30 20 24 73 61 76 65  | END.  780 $save|
00002090  3d 22 53 41 56 45 20 22  2b 66 69 6c 65 6e 61 6d  |="SAVE "+filenam|
000020a0  65 24 2b 22 20 22 2b 53  54 52 24 7e 28 48 49 4d  |e$+" "+STR$~(HIM|
000020b0  45 4d 29 2b 22 20 22 2b  53 54 52 24 7e 28 6c 61  |EM)+" "+STR$~(la|
000020c0  73 0d 20 20 20 20 20 20  74 62 79 74 65 29 2b 22  |s.      tbyte)+"|
000020d0  20 46 46 46 46 38 30 30  30 20 46 46 46 46 38 30  | FFFF8000 FFFF80|
000020e0  30 30 22 0d 20 20 37 39  30 20 58 25 3d 73 61 76  |00".  790 X%=sav|
000020f0  65 20 4d 4f 44 20 32 35  36 0d 20 20 38 30 30 20  |e MOD 256.  800 |
00002100  59 25 3d 73 61 76 65 20  44 49 56 20 32 35 36 0d  |Y%=save DIV 256.|
00002110  20 20 38 31 30 20 2a 4f  50 54 31 2c 32 0d 20 20  |  810 *OPT1,2.  |
00002120  38 32 30 20 43 41 4c 4c  20 6f 73 63 6c 69 0d 20  |820 CALL oscli. |
00002130  20 38 33 30 20 2a 4f 50  54 31 2c 30 0d 20 20 38  | 830 *OPT1,0.  8|
00002140  34 30 20 45 4e 44 0d 20  20 38 35 30 20 44 45 46  |40 END.  850 DEF|
00002150  46 4e 65 71 75 62 28 62  79 74 65 29 0d 20 20 38  |FNequb(byte).  8|
00002160  36 30 20 3f 50 25 3d 62  79 74 65 0d 20 20 38 37  |60 ?P%=byte.  87|
00002170  30 20 50 25 3d 50 25 2b  31 0d 20 20 38 38 30 20  |0 P%=P%+1.  880 |
00002180  3d 70 61 73 73 0d 20 20  38 39 30 20 44 45 46 46  |=pass.  890 DEFF|
00002190  4e 65 71 75 77 28 77 6f  72 64 29 0d 20 20 39 30  |Nequw(word).  90|
000021a0  30 20 3f 50 25 3d 77 6f  72 64 20 4d 4f 44 20 32  |0 ?P%=word MOD 2|
000021b0  35 36 0d 20 20 39 31 30  20 50 25 3f 31 3d 77 6f  |56.  910 P%?1=wo|
000021c0  72 64 20 44 49 56 20 32  35 36 0d 20 20 39 32 30  |rd DIV 256.  920|
000021d0  20 50 25 3d 50 25 2b 32  0d 20 20 39 33 30 20 3d  | P%=P%+2.  930 =|
000021e0  70 61 73 73 0d 20 20 39  34 30 20 44 45 46 46 4e  |pass.  940 DEFFN|
000021f0  65 71 75 64 28 64 6f 75  62 6c 65 29 0d 20 20 39  |equd(double).  9|
00002200  35 30 20 21 50 25 3d 64  6f 75 62 6c 65 0d 20 20  |50 !P%=double.  |
00002210  39 36 30 20 50 25 3d 50  25 2b 34 0d 20 20 39 37  |960 P%=P%+4.  97|
00002220  30 20 3d 70 61 73 73 0d  20 20 39 38 30 20 44 45  |0 =pass.  980 DE|
00002230  46 46 4e 65 71 75 73 28  73 74 72 69 6e 67 24 29  |FFNequs(string$)|
00002240  0d 20 20 39 39 30 20 24  50 25 3d 73 74 72 69 6e  |.  990 $P%=strin|
00002250  67 24 0d 20 31 30 30 30  20 50 25 3d 50 25 2b 4c  |g$. 1000 P%=P%+L|
00002260  45 4e 28 73 74 72 69 6e  67 24 29 0d 20 31 30 31  |EN(string$). 101|
00002270  30 20 3d 70 61 73 73 0d                           |0 =pass.|
00002278
30-07-88/T\SWR04.m0
30-07-88/T\SWR04.m1
30-07-88/T\SWR04.m2
30-07-88/T\SWR04.m4
30-07-88/T\SWR04.m5