Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape09a_acorn_eu_1990_march.wav » VAR-REC

VAR-REC

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_tape09a_acorn_eu_1990_march.wav
Filename: VAR-REC
Read OK:
File size: 04CF bytes
Load address: 2000
Exec address: 1900
Duplicates

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

File contents
   10REM Variable Recovery
   20REM By Peter Dew
   30REM (C) The Electron User
   40MODE 6
   50PRINT "Assembling...";
   60FOR p=0 TO 2 STEP 2
   70P%=&900
   80[OPT p
   90.break
  100LDA &79
  101CMP #&AA
  102BEQ exit
  103LDA #&AA
  110STA &79   \Flag set if already run
  120LDA #247
  130LDX #&4C
  131JSR &FFF4
  140LDA #248
  150LDX #entry MOD 256
  151JSR &FFF4
  160LDA #249
  170LDX #entry DIV 256
  171JMP &FFF4
  180.entry
  190BCC exit
  200LDX #0
  201LDY #&FF
  210.loop
  220INY
  230LDA &482,Y
  240STA buffer,Y
  250CPY #115
  260BNE loop
  270LDA &2
  271STA buffer,Y
  272INY
  280LDA &3
  281STA buffer,Y
  290LDA &220
  291STA &77
  292LDA &221
  293STA &78
  300LDA #i MOD 256
  301STA &220
  310LDA #i DIV 256
  312STA &221
  320LDA #10
  321STA &76
  330LDA #14
  331LDX#4
  332JMP &FFF4
  340.exit:RTS
  350.recover
  360LDX #0
  361LDY #&FF
  370.loop
  380INY
  390LDA buffer,Y
  400STA &482,Y
  410CPY #115
  420BNE loop
  430LDA buffer,Y
  431STA &2
  440INY
  442LDA buffer,Y
  443STA &3  \VARTOP
  450RTS
  460.i
  470PHP
  471PHA
  472TXA
  473PHA
  474TYA
  475PHA
  480DEC &76
  481LDA &76
  482CMP #0
  490BNE exiti
  500LDA #13
  501LDX #4
  502JSR &FFF4
  510JSR recover
  511LDA &77
  512STA &220
  513LDA &78
  514STA &221
  520.exiti
  521PLA
  522TAY
  523PLA
  524TAX
  525PLA
  526PLP
  530RTS
  540.buffer
  550]
  560NEXT
  570PRINT''
  580OSCLI"SAVE RECOVER 900 "+STR$~(P%)
  590PRINT"Type *RUN RECOVER to run the program!"

� Variable Recovery
� By Peter Dew
� (C) The Electron User
(� 6
2� "Assembling...";
<� p=0 � 2 � 2
FP%=&900
P
[OPT p
Z
.break
dLDA &79
eCMP #&AA
fBEQ exit
gLDA #&AA
n&STA &79   \Flag set if already run
xLDA #247
�LDX #&4C
�
JSR &FFF4
�LDA #248
�LDX #entry � 256
�
JSR &FFF4
�LDA #249
�LDX #entry � 256
�
JMP &FFF4
�
.entry
�BCC exit
�
LDX #0
�LDY #&FF
�	.loop
�INY
�LDA &482,Y
�STA buffer,Y
�CPY #115
BNE loop

LDA &2
STA buffer,Y
INY

LDA &3
STA buffer,Y
"LDA &220
#STA &77
$LDA &221
%STA &78
,LDA #i � 256
-STA &220
6LDA #i � 256
8STA &221
@LDA #10
ASTA &76
JLDA #14
K	LDX#4
L
JMP &FFF4
T
.exit:RTS
^.recover
h
LDX #0
iLDY #&FF
r	.loop
|INY
�LDA buffer,Y
�STA &482,Y
�CPY #115
�BNE loop
�LDA buffer,Y
�
STA &2
�INY
�LDA buffer,Y
�STA &3  \VARTOP
�RTS
�.i
�PHP
�PHA
�TXA
�PHA
�TYA
�PHA
�DEC &76
�LDA &76
�
CMP #0
�
BNE exiti
�LDA #13
�
LDX #4
�
JSR &FFF4
�JSR recover
�LDA &77
STA &220
LDA &78
STA &221

.exiti
	PLA

TAY
PLA
TAX

PLA
PLP
RTS
.buffer
&]
0�
:�''
D�"SAVE RECOVER 900 "+�~(P%)
N,�"Type *RUN RECOVER to run the program!"
�
00000000  0d 00 0a 17 f4 20 56 61  72 69 61 62 6c 65 20 52  |..... Variable R|
00000010  65 63 6f 76 65 72 79 0d  00 14 12 f4 20 42 79 20  |ecovery..... By |
00000020  50 65 74 65 72 20 44 65  77 0d 00 1e 1b f4 20 28  |Peter Dew..... (|
00000030  43 29 20 54 68 65 20 45  6c 65 63 74 72 6f 6e 20  |C) The Electron |
00000040  55 73 65 72 0d 00 28 07  eb 20 36 0d 00 32 16 f1  |User..(.. 6..2..|
00000050  20 22 41 73 73 65 6d 62  6c 69 6e 67 2e 2e 2e 22  | "Assembling..."|
00000060  3b 0d 00 3c 11 e3 20 70  3d 30 20 b8 20 32 20 88  |;..<.. p=0 . 2 .|
00000070  20 32 0d 00 46 0b 50 25  3d 26 39 30 30 0d 00 50  | 2..F.P%=&900..P|
00000080  0a 5b 4f 50 54 20 70 0d  00 5a 0a 2e 62 72 65 61  |.[OPT p..Z..brea|
00000090  6b 0d 00 64 0b 4c 44 41  20 26 37 39 0d 00 65 0c  |k..d.LDA &79..e.|
000000a0  43 4d 50 20 23 26 41 41  0d 00 66 0c 42 45 51 20  |CMP #&AA..f.BEQ |
000000b0  65 78 69 74 0d 00 67 0c  4c 44 41 20 23 26 41 41  |exit..g.LDA #&AA|
000000c0  0d 00 6e 26 53 54 41 20  26 37 39 20 20 20 5c 46  |..n&STA &79   \F|
000000d0  6c 61 67 20 73 65 74 20  69 66 20 61 6c 72 65 61  |lag set if alrea|
000000e0  64 79 20 72 75 6e 0d 00  78 0c 4c 44 41 20 23 32  |dy run..x.LDA #2|
000000f0  34 37 0d 00 82 0c 4c 44  58 20 23 26 34 43 0d 00  |47....LDX #&4C..|
00000100  83 0d 4a 53 52 20 26 46  46 46 34 0d 00 8c 0c 4c  |..JSR &FFF4....L|
00000110  44 41 20 23 32 34 38 0d  00 96 14 4c 44 58 20 23  |DA #248....LDX #|
00000120  65 6e 74 72 79 20 83 20  32 35 36 0d 00 97 0d 4a  |entry . 256....J|
00000130  53 52 20 26 46 46 46 34  0d 00 a0 0c 4c 44 41 20  |SR &FFF4....LDA |
00000140  23 32 34 39 0d 00 aa 14  4c 44 58 20 23 65 6e 74  |#249....LDX #ent|
00000150  72 79 20 81 20 32 35 36  0d 00 ab 0d 4a 4d 50 20  |ry . 256....JMP |
00000160  26 46 46 46 34 0d 00 b4  0a 2e 65 6e 74 72 79 0d  |&FFF4.....entry.|
00000170  00 be 0c 42 43 43 20 65  78 69 74 0d 00 c8 0a 4c  |...BCC exit....L|
00000180  44 58 20 23 30 0d 00 c9  0c 4c 44 59 20 23 26 46  |DX #0....LDY #&F|
00000190  46 0d 00 d2 09 2e 6c 6f  6f 70 0d 00 dc 07 49 4e  |F.....loop....IN|
000001a0  59 0d 00 e6 0e 4c 44 41  20 26 34 38 32 2c 59 0d  |Y....LDA &482,Y.|
000001b0  00 f0 10 53 54 41 20 62  75 66 66 65 72 2c 59 0d  |...STA buffer,Y.|
000001c0  00 fa 0c 43 50 59 20 23  31 31 35 0d 01 04 0c 42  |...CPY #115....B|
000001d0  4e 45 20 6c 6f 6f 70 0d  01 0e 0a 4c 44 41 20 26  |NE loop....LDA &|
000001e0  32 0d 01 0f 10 53 54 41  20 62 75 66 66 65 72 2c  |2....STA buffer,|
000001f0  59 0d 01 10 07 49 4e 59  0d 01 18 0a 4c 44 41 20  |Y....INY....LDA |
00000200  26 33 0d 01 19 10 53 54  41 20 62 75 66 66 65 72  |&3....STA buffer|
00000210  2c 59 0d 01 22 0c 4c 44  41 20 26 32 32 30 0d 01  |,Y..".LDA &220..|
00000220  23 0b 53 54 41 20 26 37  37 0d 01 24 0c 4c 44 41  |#.STA &77..$.LDA|
00000230  20 26 32 32 31 0d 01 25  0b 53 54 41 20 26 37 38  | &221..%.STA &78|
00000240  0d 01 2c 10 4c 44 41 20  23 69 20 83 20 32 35 36  |..,.LDA #i . 256|
00000250  0d 01 2d 0c 53 54 41 20  26 32 32 30 0d 01 36 10  |..-.STA &220..6.|
00000260  4c 44 41 20 23 69 20 81  20 32 35 36 0d 01 38 0c  |LDA #i . 256..8.|
00000270  53 54 41 20 26 32 32 31  0d 01 40 0b 4c 44 41 20  |STA &221..@.LDA |
00000280  23 31 30 0d 01 41 0b 53  54 41 20 26 37 36 0d 01  |#10..A.STA &76..|
00000290  4a 0b 4c 44 41 20 23 31  34 0d 01 4b 09 4c 44 58  |J.LDA #14..K.LDX|
000002a0  23 34 0d 01 4c 0d 4a 4d  50 20 26 46 46 46 34 0d  |#4..L.JMP &FFF4.|
000002b0  01 54 0d 2e 65 78 69 74  3a 52 54 53 0d 01 5e 0c  |.T..exit:RTS..^.|
000002c0  2e 72 65 63 6f 76 65 72  0d 01 68 0a 4c 44 58 20  |.recover..h.LDX |
000002d0  23 30 0d 01 69 0c 4c 44  59 20 23 26 46 46 0d 01  |#0..i.LDY #&FF..|
000002e0  72 09 2e 6c 6f 6f 70 0d  01 7c 07 49 4e 59 0d 01  |r..loop..|.INY..|
000002f0  86 10 4c 44 41 20 62 75  66 66 65 72 2c 59 0d 01  |..LDA buffer,Y..|
00000300  90 0e 53 54 41 20 26 34  38 32 2c 59 0d 01 9a 0c  |..STA &482,Y....|
00000310  43 50 59 20 23 31 31 35  0d 01 a4 0c 42 4e 45 20  |CPY #115....BNE |
00000320  6c 6f 6f 70 0d 01 ae 10  4c 44 41 20 62 75 66 66  |loop....LDA buff|
00000330  65 72 2c 59 0d 01 af 0a  53 54 41 20 26 32 0d 01  |er,Y....STA &2..|
00000340  b8 07 49 4e 59 0d 01 ba  10 4c 44 41 20 62 75 66  |..INY....LDA buf|
00000350  66 65 72 2c 59 0d 01 bb  13 53 54 41 20 26 33 20  |fer,Y....STA &3 |
00000360  20 5c 56 41 52 54 4f 50  0d 01 c2 07 52 54 53 0d  | \VARTOP....RTS.|
00000370  01 cc 06 2e 69 0d 01 d6  07 50 48 50 0d 01 d7 07  |....i....PHP....|
00000380  50 48 41 0d 01 d8 07 54  58 41 0d 01 d9 07 50 48  |PHA....TXA....PH|
00000390  41 0d 01 da 07 54 59 41  0d 01 db 07 50 48 41 0d  |A....TYA....PHA.|
000003a0  01 e0 0b 44 45 43 20 26  37 36 0d 01 e1 0b 4c 44  |...DEC &76....LD|
000003b0  41 20 26 37 36 0d 01 e2  0a 43 4d 50 20 23 30 0d  |A &76....CMP #0.|
000003c0  01 ea 0d 42 4e 45 20 65  78 69 74 69 0d 01 f4 0b  |...BNE exiti....|
000003d0  4c 44 41 20 23 31 33 0d  01 f5 0a 4c 44 58 20 23  |LDA #13....LDX #|
000003e0  34 0d 01 f6 0d 4a 53 52  20 26 46 46 46 34 0d 01  |4....JSR &FFF4..|
000003f0  fe 0f 4a 53 52 20 72 65  63 6f 76 65 72 0d 01 ff  |..JSR recover...|
00000400  0b 4c 44 41 20 26 37 37  0d 02 00 0c 53 54 41 20  |.LDA &77....STA |
00000410  26 32 32 30 0d 02 01 0b  4c 44 41 20 26 37 38 0d  |&220....LDA &78.|
00000420  02 02 0c 53 54 41 20 26  32 32 31 0d 02 08 0a 2e  |...STA &221.....|
00000430  65 78 69 74 69 0d 02 09  07 50 4c 41 0d 02 0a 07  |exiti....PLA....|
00000440  54 41 59 0d 02 0b 07 50  4c 41 0d 02 0c 07 54 41  |TAY....PLA....TA|
00000450  58 0d 02 0d 07 50 4c 41  0d 02 0e 07 50 4c 50 0d  |X....PLA....PLP.|
00000460  02 12 07 52 54 53 0d 02  1c 0b 2e 62 75 66 66 65  |...RTS.....buffe|
00000470  72 0d 02 26 05 5d 0d 02  30 05 ed 0d 02 3a 07 f1  |r..&.]..0....:..|
00000480  27 27 0d 02 44 1f ff 22  53 41 56 45 20 52 45 43  |''..D.."SAVE REC|
00000490  4f 56 45 52 20 39 30 30  20 22 2b c3 7e 28 50 25  |OVER 900 "+.~(P%|
000004a0  29 0d 02 4e 2c f1 22 54  79 70 65 20 2a 52 55 4e  |)..N,."Type *RUN|
000004b0  20 52 45 43 4f 56 45 52  20 74 6f 20 72 75 6e 20  | RECOVER to run |
000004c0  74 68 65 20 70 72 6f 67  72 61 6d 21 22 0d ff     |the program!"..|
000004cf
VAR-REC.m0
VAR-REC.m1
VAR-REC.m2
VAR-REC.m4
VAR-REC.m5