Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape18b_acorn_eu_1991_january.wav » R.KeyTune

R.KeyTune

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 tapes » Electron_User » Electron_User_tape18b_acorn_eu_1991_january.wav
Filename: R.KeyTune
Read OK:
File size: 0269 bytes
Load address: FFFF1900
Exec address: FFFF802B
Duplicates

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

File contents
   10REM *KeyTune source code
   20REM by Timothy Phillips
   30REM (c) The Micro User
   40REM January 1991
   50byte=&FFF4:word=&FFF1
   60FOR pass=0 TO 2 STEP 2:P%=&900
   70[OPT pass:.store
   80LDX #sa MOD 256:LDY #sa DIV 256
   90SEI:STX &220:STY &221:CLI
  100LDA #14:LDX #2:JSR byte:RTS
  110.sa PHP:PHA:TXA:PHA:TYA:PHA
  120STY sb+4:LDA #7:LDX #sb MOD 256
  130LDY #sb DIV 256:JSR word
  140PLA:TAY:PLA:TAX:PLA:PLP:RTS
  150.sb          \ Sound data block
  160OPT FNw(1)   \ Channel number
  170OPT FNw(250) \ Amplitude
  180OPT FNw(0)   \ Pitch
  190OPT FNw(1)   \ Duration
  200]:NEXT
  210$&700="SAVE KeyTune 900 "+STR$~P%:X%=0:Y%=7:CALL &FFF7:END
  220DEF FNw(W%):!P%=W%:P%=P%+2:=pass

� *KeyTune source code
� by Timothy Phillips
� (c) The Micro User
(� January 1991
2byte=&FFF4:word=&FFF1
<� pass=0 � 2 � 2:P%=&900
F[OPT pass:.store
PLDX #sa � 256:LDY #sa � 256
ZSEI:STX &220:STY &221:CLI
dLDA #14:LDX #2:JSR byte:RTS
n.sa PHP:PHA:TXA:PHA:TYA:PHA
x!STY sb+4:LDA #7:LDX #sb � 256
�LDY #sb � 256:JSR word
�PLA:TAY:PLA:TAX:PLA:PLP:RTS
�#.sb          \ Sound data block
� OPT �w(1)   \ Channel number
�OPT �w(250) \ Amplitude
�OPT �w(0)   \ Pitch
�OPT �w(1)   \ Duration
�]:�
�6$&700="SAVE KeyTune 900 "+�~P%:X%=0:Y%=7:� &FFF7:�
�!� �w(W%):!P%=W%:P%=P%+2:=pass
�
00000000  0d 00 0a 1a f4 20 2a 4b  65 79 54 75 6e 65 20 73  |..... *KeyTune s|
00000010  6f 75 72 63 65 20 63 6f  64 65 0d 00 14 19 f4 20  |ource code..... |
00000020  62 79 20 54 69 6d 6f 74  68 79 20 50 68 69 6c 6c  |by Timothy Phill|
00000030  69 70 73 0d 00 1e 18 f4  20 28 63 29 20 54 68 65  |ips..... (c) The|
00000040  20 4d 69 63 72 6f 20 55  73 65 72 0d 00 28 12 f4  | Micro User..(..|
00000050  20 4a 61 6e 75 61 72 79  20 31 39 39 31 0d 00 32  | January 1991..2|
00000060  19 62 79 74 65 3d 26 46  46 46 34 3a 77 6f 72 64  |.byte=&FFF4:word|
00000070  3d 26 46 46 46 31 0d 00  3c 1c e3 20 70 61 73 73  |=&FFF1..<.. pass|
00000080  3d 30 20 b8 20 32 20 88  20 32 3a 50 25 3d 26 39  |=0 . 2 . 2:P%=&9|
00000090  30 30 0d 00 46 14 5b 4f  50 54 20 70 61 73 73 3a  |00..F.[OPT pass:|
000000a0  2e 73 74 6f 72 65 0d 00  50 1f 4c 44 58 20 23 73  |.store..P.LDX #s|
000000b0  61 20 83 20 32 35 36 3a  4c 44 59 20 23 73 61 20  |a . 256:LDY #sa |
000000c0  81 20 32 35 36 0d 00 5a  1d 53 45 49 3a 53 54 58  |. 256..Z.SEI:STX|
000000d0  20 26 32 32 30 3a 53 54  59 20 26 32 32 31 3a 43  | &220:STY &221:C|
000000e0  4c 49 0d 00 64 1f 4c 44  41 20 23 31 34 3a 4c 44  |LI..d.LDA #14:LD|
000000f0  58 20 23 32 3a 4a 53 52  20 62 79 74 65 3a 52 54  |X #2:JSR byte:RT|
00000100  53 0d 00 6e 1f 2e 73 61  20 50 48 50 3a 50 48 41  |S..n..sa PHP:PHA|
00000110  3a 54 58 41 3a 50 48 41  3a 54 59 41 3a 50 48 41  |:TXA:PHA:TYA:PHA|
00000120  0d 00 78 21 53 54 59 20  73 62 2b 34 3a 4c 44 41  |..x!STY sb+4:LDA|
00000130  20 23 37 3a 4c 44 58 20  23 73 62 20 83 20 32 35  | #7:LDX #sb . 25|
00000140  36 0d 00 82 1a 4c 44 59  20 23 73 62 20 81 20 32  |6....LDY #sb . 2|
00000150  35 36 3a 4a 53 52 20 77  6f 72 64 0d 00 8c 1f 50  |56:JSR word....P|
00000160  4c 41 3a 54 41 59 3a 50  4c 41 3a 54 41 58 3a 50  |LA:TAY:PLA:TAX:P|
00000170  4c 41 3a 50 4c 50 3a 52  54 53 0d 00 96 23 2e 73  |LA:PLP:RTS...#.s|
00000180  62 20 20 20 20 20 20 20  20 20 20 5c 20 53 6f 75  |b          \ Sou|
00000190  6e 64 20 64 61 74 61 20  62 6c 6f 63 6b 0d 00 a0  |nd data block...|
000001a0  20 4f 50 54 20 a4 77 28  31 29 20 20 20 5c 20 43  | OPT .w(1)   \ C|
000001b0  68 61 6e 6e 65 6c 20 6e  75 6d 62 65 72 0d 00 aa  |hannel number...|
000001c0  1b 4f 50 54 20 a4 77 28  32 35 30 29 20 5c 20 41  |.OPT .w(250) \ A|
000001d0  6d 70 6c 69 74 75 64 65  0d 00 b4 17 4f 50 54 20  |mplitude....OPT |
000001e0  a4 77 28 30 29 20 20 20  5c 20 50 69 74 63 68 0d  |.w(0)   \ Pitch.|
000001f0  00 be 1a 4f 50 54 20 a4  77 28 31 29 20 20 20 5c  |...OPT .w(1)   \|
00000200  20 44 75 72 61 74 69 6f  6e 0d 00 c8 07 5d 3a ed  | Duration....]:.|
00000210  0d 00 d2 36 24 26 37 30  30 3d 22 53 41 56 45 20  |...6$&700="SAVE |
00000220  4b 65 79 54 75 6e 65 20  39 30 30 20 22 2b c3 7e  |KeyTune 900 "+.~|
00000230  50 25 3a 58 25 3d 30 3a  59 25 3d 37 3a d6 20 26  |P%:X%=0:Y%=7:. &|
00000240  46 46 46 37 3a e0 0d 00  dc 21 dd 20 a4 77 28 57  |FFF7:....!. .w(W|
00000250  25 29 3a 21 50 25 3d 57  25 3a 50 25 3d 50 25 2b  |%):!P%=W%:P%=P%+|
00000260  32 3a 3d 70 61 73 73 0d  ff                       |2:=pass..|
00000269
R.KeyTune.m0
R.KeyTune.m1
R.KeyTune.m2
R.KeyTune.m4
R.KeyTune.m5