Home » Archimedes archive » Acorn User » AU 1998-12.adf » Regulars » Rambles/ROMs

Rambles/ROMs

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 » Archimedes archive » Acorn User » AU 1998-12.adf » Regulars
Filename: Rambles/ROMs
Read OK:
File size: 022B bytes
Load address: 0000
Exec address: 0000
File contents
MODE 7
DIM code% 64
FOR pass%=0 TO 2 STEP 2
P%=code%
[OPT pass%
LDA &FE30
PHA
AND #&F0
ORA &70
STA &FE30
LDY #0
.loop
LDA (&72),Y
STA (&74),Y
INC &72
BNE P%+4
INC &73
INC &74
BNE P%+4
INC &75
LDA &72
CMP &76
BNE loop
LDA &73
CMP &77
BNE loop
PLA
STA &FE30
RTS
]
NEXT
DIM buffer% 16384
INPUT "ROM to save: "rom%
INPUT "Filename:    "file$
?&70=rom%
PROCdouble(&72,&8000)
PROCdouble(&74,buffer%)
PROCdouble(&76,&C000)
CALL code%
OSCLI"SAVE "+file$+" "+STR$~(buffer%)+" "+STR$~(buffer%+16384)
END
DEF PROCdouble(a%,n%)
?a%=n% MOD 256
a%?1=n% DIV 256
ENDPROC
00000000  4d 4f 44 45 20 37 0a 44  49 4d 20 63 6f 64 65 25  |MODE 7.DIM code%|
00000010  20 36 34 0a 46 4f 52 20  70 61 73 73 25 3d 30 20  | 64.FOR pass%=0 |
00000020  54 4f 20 32 20 53 54 45  50 20 32 0a 50 25 3d 63  |TO 2 STEP 2.P%=c|
00000030  6f 64 65 25 0a 5b 4f 50  54 20 70 61 73 73 25 0a  |ode%.[OPT pass%.|
00000040  4c 44 41 20 26 46 45 33  30 0a 50 48 41 0a 41 4e  |LDA &FE30.PHA.AN|
00000050  44 20 23 26 46 30 0a 4f  52 41 20 26 37 30 0a 53  |D #&F0.ORA &70.S|
00000060  54 41 20 26 46 45 33 30  0a 4c 44 59 20 23 30 0a  |TA &FE30.LDY #0.|
00000070  2e 6c 6f 6f 70 0a 4c 44  41 20 28 26 37 32 29 2c  |.loop.LDA (&72),|
00000080  59 0a 53 54 41 20 28 26  37 34 29 2c 59 0a 49 4e  |Y.STA (&74),Y.IN|
00000090  43 20 26 37 32 0a 42 4e  45 20 50 25 2b 34 0a 49  |C &72.BNE P%+4.I|
000000a0  4e 43 20 26 37 33 0a 49  4e 43 20 26 37 34 0a 42  |NC &73.INC &74.B|
000000b0  4e 45 20 50 25 2b 34 0a  49 4e 43 20 26 37 35 0a  |NE P%+4.INC &75.|
000000c0  4c 44 41 20 26 37 32 0a  43 4d 50 20 26 37 36 0a  |LDA &72.CMP &76.|
000000d0  42 4e 45 20 6c 6f 6f 70  0a 4c 44 41 20 26 37 33  |BNE loop.LDA &73|
000000e0  0a 43 4d 50 20 26 37 37  0a 42 4e 45 20 6c 6f 6f  |.CMP &77.BNE loo|
000000f0  70 0a 50 4c 41 0a 53 54  41 20 26 46 45 33 30 0a  |p.PLA.STA &FE30.|
00000100  52 54 53 0a 5d 0a 4e 45  58 54 0a 44 49 4d 20 62  |RTS.].NEXT.DIM b|
00000110  75 66 66 65 72 25 20 31  36 33 38 34 0a 49 4e 50  |uffer% 16384.INP|
00000120  55 54 20 22 52 4f 4d 20  74 6f 20 73 61 76 65 3a  |UT "ROM to save:|
00000130  20 22 72 6f 6d 25 0a 49  4e 50 55 54 20 22 46 69  | "rom%.INPUT "Fi|
00000140  6c 65 6e 61 6d 65 3a 20  20 20 20 22 66 69 6c 65  |lename:    "file|
00000150  24 0a 3f 26 37 30 3d 72  6f 6d 25 0a 50 52 4f 43  |$.?&70=rom%.PROC|
00000160  64 6f 75 62 6c 65 28 26  37 32 2c 26 38 30 30 30  |double(&72,&8000|
00000170  29 0a 50 52 4f 43 64 6f  75 62 6c 65 28 26 37 34  |).PROCdouble(&74|
00000180  2c 62 75 66 66 65 72 25  29 0a 50 52 4f 43 64 6f  |,buffer%).PROCdo|
00000190  75 62 6c 65 28 26 37 36  2c 26 43 30 30 30 29 0a  |uble(&76,&C000).|
000001a0  43 41 4c 4c 20 63 6f 64  65 25 0a 4f 53 43 4c 49  |CALL code%.OSCLI|
000001b0  22 53 41 56 45 20 22 2b  66 69 6c 65 24 2b 22 20  |"SAVE "+file$+" |
000001c0  22 2b 53 54 52 24 7e 28  62 75 66 66 65 72 25 29  |"+STR$~(buffer%)|
000001d0  2b 22 20 22 2b 53 54 52  24 7e 28 62 75 66 66 65  |+" "+STR$~(buffe|
000001e0  72 25 2b 31 36 33 38 34  29 0a 45 4e 44 0a 44 45  |r%+16384).END.DE|
000001f0  46 20 50 52 4f 43 64 6f  75 62 6c 65 28 61 25 2c  |F PROCdouble(a%,|
00000200  6e 25 29 0a 3f 61 25 3d  6e 25 20 4d 4f 44 20 32  |n%).?a%=n% MOD 2|
00000210  35 36 0a 61 25 3f 31 3d  6e 25 20 44 49 56 20 32  |56.a%?1=n% DIV 2|
00000220  35 36 0a 45 4e 44 50 52  4f 43 0a                 |56.ENDPROC.|
0000022b