Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape08b_acorn_palace_of_magic.wav » REMSAVE

REMSAVE

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_tape08b_acorn_palace_of_magic.wav
Filename: REMSAVE
Read OK:
File size: 04ED bytes
Load address: 2000
Exec address: 1900
File contents

� >REMSAVE
� By Stephen Ramplin
� (c) Electron User
(string = &80
2oldv = &82
<
tmp = &84
Foscli = &208
Posfile = &FFDD
Zpage = &18
d
top = &12
n� n = 0 � 3 � 3
x
P% = &C00
�[ OPT n
�.init LDA oscli
�LDX oscli+1
�CMP #ncliv � 256
�BNE change
�CPX #ncliv � 256
�BEQ done
�.change
�STA oldv
�STX oldv+1
�SEI
�LDA #ncliv � 256
�
STA oscli
LDA #ncliv � 256
STA oscli+1
CLI
"	.done
,RTS
6
.ncliv
@PHP
JPHA 
TSTX string
^STY string+1
h
LDY #1
r
.loop1
|LDA (string),Y
�
� #&DF
�CMP remsave,Y
�BNE not
�INY
�
CPY #3
�
BNE loop1
�LDA page
�
STA tmp+1
�
LDA #4
�STA tmp
�
LDY #0
�
.loop2
�LDA (tmp),Y
INC tmp

CMP #�">"

BEQ over1
&CMP #&0D
0BEQ error1
:
JMP loop2
D
.over1
NLDA (tmp),Y
XCMP #32
b
BNE over2
lINC tmp
v
JMP over1
�
.over2
�STA name,Y
�INY
�
CPY #9
�BEQ error2
�CMP #&0D
�
BNE over1
�LDA page
�STA block+3
�STA block+11
�LDA top
�STA block+14
�
LDA top+1
STA block+15
LDX #bl.error2
�BRK
�
EQUB 0
�EQUS "Filename too long"
BRK
.remsave
EQUS "*RS"
$EQUB &0D
.	.name
8EQUS �11,�0)
B
.block
L
EQUW name
V
EQUD 0
`EQUD &8023
j
EQUD 0
t
EQUD 0
~]
��
�
� init
�� "SAVE RS C00 "+�~P%
�
00000000  0d 00 0a 0e f4 20 3e 52  45 4d 53 41 56 45 0d 00  |..... >REMSAVE..|
00000010  14 18 f4 20 42 79 20 53  74 65 70 68 65 6e 20 52  |... By Stephen R|
00000020  61 6d 70 6c 69 6e 0d 00  1e 17 f4 20 28 63 29 20  |amplin..... (c) |
00000030  45 6c 65 63 74 72 6f 6e  20 55 73 65 72 0d 00 28  |Electron User..(|
00000040  10 73 74 72 69 6e 67 20  3d 20 26 38 30 0d 00 32  |.string = &80..2|
00000050  0e 6f 6c 64 76 20 3d 20  26 38 32 0d 00 3c 0d 74  |.oldv = &82..<.t|
00000060  6d 70 20 3d 20 26 38 34  0d 00 46 10 6f 73 63 6c  |mp = &84..F.oscl|
00000070  69 20 3d 20 26 32 30 38  0d 00 50 12 6f 73 66 69  |i = &208..P.osfi|
00000080  6c 65 20 3d 20 26 46 46  44 44 0d 00 5a 0e 70 61  |le = &FFDD..Z.pa|
00000090  67 65 20 3d 20 26 31 38  0d 00 64 0d 74 6f 70 20  |ge = &18..d.top |
000000a0  3d 20 26 31 32 0d 00 6e  13 e3 20 6e 20 3d 20 30  |= &12..n.. n = 0|
000000b0  20 b8 20 33 20 88 20 33  0d 00 78 0d 50 25 20 3d  | . 3 . 3..x.P% =|
000000c0  20 26 43 30 30 0d 00 82  0b 5b 20 4f 50 54 20 6e  | &C00....[ OPT n|
000000d0  0d 00 8c 13 2e 69 6e 69  74 20 4c 44 41 20 6f 73  |.....init LDA os|
000000e0  63 6c 69 0d 00 96 0f 4c  44 58 20 6f 73 63 6c 69  |cli....LDX oscli|
000000f0  2b 31 0d 00 a0 14 43 4d  50 20 23 6e 63 6c 69 76  |+1....CMP #ncliv|
00000100  20 83 20 32 35 36 0d 00  aa 0e 42 4e 45 20 63 68  | . 256....BNE ch|
00000110  61 6e 67 65 0d 00 b4 14  43 50 58 20 23 6e 63 6c  |ange....CPX #ncl|
00000120  69 76 20 81 20 32 35 36  0d 00 be 0c 42 45 51 20  |iv . 256....BEQ |
00000130  64 6f 6e 65 0d 00 c8 0b  2e 63 68 61 6e 67 65 0d  |done.....change.|
00000140  00 d2 0c 53 54 41 20 6f  6c 64 76 0d 00 dc 0e 53  |...STA oldv....S|
00000150  54 58 20 6f 6c 64 76 2b  31 0d 00 e6 07 53 45 49  |TX oldv+1....SEI|
00000160  0d 00 f0 14 4c 44 41 20  23 6e 63 6c 69 76 20 83  |....LDA #ncliv .|
00000170  20 32 35 36 0d 00 fa 0d  53 54 41 20 6f 73 63 6c  | 256....STA oscl|
00000180  69 0d 01 04 14 4c 44 41  20 23 6e 63 6c 69 76 20  |i....LDA #ncliv |
00000190  81 20 32 35 36 0d 01 0e  0f 53 54 41 20 6f 73 63  |. 256....STA osc|
000001a0  6c 69 2b 31 0d 01 18 07  43 4c 49 0d 01 22 09 2e  |li+1....CLI.."..|
000001b0  64 6f 6e 65 0d 01 2c 07  52 54 53 0d 01 36 0a 2e  |done..,.RTS..6..|
000001c0  6e 63 6c 69 76 0d 01 40  07 50 48 50 0d 01 4a 08  |ncliv..@.PHP..J.|
000001d0  50 48 41 20 0d 01 54 0e  53 54 58 20 73 74 72 69  |PHA ..T.STX stri|
000001e0  6e 67 0d 01 5e 10 53 54  59 20 73 74 72 69 6e 67  |ng..^.STY string|
000001f0  2b 31 0d 01 68 0a 4c 44  59 20 23 31 0d 01 72 0a  |+1..h.LDY #1..r.|
00000200  2e 6c 6f 6f 70 31 0d 01  7c 12 4c 44 41 20 28 73  |.loop1..|.LDA (s|
00000210  74 72 69 6e 67 29 2c 59  0d 01 86 0a 80 20 23 26  |tring),Y..... #&|
00000220  44 46 0d 01 90 11 43 4d  50 20 72 65 6d 73 61 76  |DF....CMP remsav|
00000230  65 2c 59 0d 01 9a 0b 42  4e 45 20 6e 6f 74 0d 01  |e,Y....BNE not..|
00000240  a4 07 49 4e 59 0d 01 ae  0a 43 50 59 20 23 33 0d  |..INY....CPY #3.|
00000250  01 b8 0d 42 4e 45 20 6c  6f 6f 70 31 0d 01 c2 0c  |...BNE loop1....|
00000260  4c 44 41 20 70 61 67 65  0d 01 cc 0d 53 54 41 20  |LDA page....STA |
00000270  74 6d 70 2b 31 0d 01 d6  0a 4c 44 41 20 23 34 0d  |tmp+1....LDA #4.|
00000280  01 e0 0b 53 54 41 20 74  6d 70 0d 01 ea 0a 4c 44  |...STA tmp....LD|
00000290  59 20 23 30 0d 01 f4 0a  2e 6c 6f 6f 70 32 0d 01  |Y #0.....loop2..|
000002a0  fe 0f 4c 44 41 20 28 74  6d 70 29 2c 59 0d 02 08  |..LDA (tmp),Y...|
000002b0  0b 49 4e 43 20 74 6d 70  0d 02 12 0d 43 4d 50 20  |.INC tmp....CMP |
000002c0  23 97 22 3e 22 0d 02 1c  0d 42 45 51 20 6f 76 65  |#.">"....BEQ ove|
000002d0  72 31 0d 02 26 0c 43 4d  50 20 23 26 30 44 0d 02  |r1..&.CMP #&0D..|
000002e0  30 0e 42 45 51 20 65 72  72 6f 72 31 0d 02 3a 0d  |0.BEQ error1..:.|
000002f0  4a 4d 50 20 6c 6f 6f 70  32 0d 02 44 0a 2e 6f 76  |JMP loop2..D..ov|
00000300  65 72 31 0d 02 4e 0f 4c  44 41 20 28 74 6d 70 29  |er1..N.LDA (tmp)|
00000310  2c 59 0d 02 58 0b 43 4d  50 20 23 33 32 0d 02 62  |,Y..X.CMP #32..b|
00000320  0d 42 4e 45 20 6f 76 65  72 32 0d 02 6c 0b 49 4e  |.BNE over2..l.IN|
00000330  43 20 74 6d 70 0d 02 76  0d 4a 4d 50 20 6f 76 65  |C tmp..v.JMP ove|
00000340  72 31 0d 02 80 0a 2e 6f  76 65 72 32 0d 02 8a 0e  |r1.....over2....|
00000350  53 54 41 20 6e 61 6d 65  2c 59 0d 02 94 07 49 4e  |STA name,Y....IN|
00000360  59 0d 02 9e 0a 43 50 59  20 23 39 0d 02 a8 0e 42  |Y....CPY #9....B|
00000370  45 51 20 65 72 72 6f 72  32 0d 02 b2 0c 43 4d 50  |EQ error2....CMP|
00000380  20 23 26 30 44 0d 02 bc  0d 42 4e 45 20 6f 76 65  | #&0D....BNE ove|
00000390  72 31 0d 02 c6 0c 4c 44  41 20 70 61 67 65 0d 02  |r1....LDA page..|
000003a0  d0 0f 53 54 41 20 62 6c  6f 63 6b 2b 33 0d 02 da  |..STA block+3...|
000003b0  10 53 54 41 20 62 6c 6f  63 6b 2b 31 31 0d 02 e4  |.STA block+11...|
000003c0  0b 4c 44 41 20 74 6f 70  0d 02 ee 10 53 54 41 20  |.LDA top....STA |
000003d0  62 6c 6f 63 6b 2b 31 34  0d 02 f8 0d 4c 44 41 20  |block+14....LDA |
000003e0  74 6f 70 2b 31 0d 03 02  10 53 54 41 20 62 6c 6f  |top+1....STA blo|
000003f0  63 6b 2b 31 35 0d 03 0c  14 4c 44 58 20 23 62 6c  |ck+15....LDX #bl|
00000400  0b 2e 65 72 72 6f 72 32  0d 03 e8 07 42 52 4b 0d  |..error2....BRK.|
00000410  03 f2 0a 45 51 55 42 20  30 0d 03 fc 1c 45 51 55  |...EQUB 0....EQU|
00000420  53 20 22 46 69 6c 65 6e  61 6d 65 20 74 6f 6f 20  |S "Filename too |
00000430  6c 6f 6e 67 22 0d 04 06  07 42 52 4b 0d 04 10 0c  |long"....BRK....|
00000440  2e 72 65 6d 73 61 76 65  0d 04 1a 0e 45 51 55 53  |.remsave....EQUS|
00000450  20 22 2a 52 53 22 0d 04  24 0c 45 51 55 42 20 26  | "*RS"..$.EQUB &|
00000460  30 44 0d 04 2e 09 2e 6e  61 6d 65 0d 04 38 10 45  |0D.....name..8.E|
00000470  51 55 53 20 c4 31 31 2c  bd 30 29 0d 04 42 0a 2e  |QUS .11,.0)..B..|
00000480  62 6c 6f 63 6b 0d 04 4c  0d 45 51 55 57 20 6e 61  |block..L.EQUW na|
00000490  6d 65 0d 04 56 0a 45 51  55 44 20 30 0d 04 60 0e  |me..V.EQUD 0..`.|
000004a0  45 51 55 44 20 26 38 30  32 33 0d 04 6a 0a 45 51  |EQUD &8023..j.EQ|
000004b0  55 44 20 30 0d 04 74 0a  45 51 55 44 20 30 0d 04  |UD 0..t.EQUD 0..|
000004c0  7e 05 5d 0d 04 88 05 ed  0d 04 92 0a d6 20 69 6e  |~.].......... in|
000004d0  69 74 0d 04 9c 19 ff 20  22 53 41 56 45 20 52 53  |it..... "SAVE RS|
000004e0  20 43 30 30 20 22 2b c3  7e 50 25 0d ff           | C00 "+.~P%..|
000004ed
REMSAVE.m0
REMSAVE.m1
REMSAVE.m2
REMSAVE.m4
REMSAVE.m5