Home » CEEFAX disks » telesoftware3.adl » 01_11_87/READROM

01_11_87/READROM

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 » telesoftware3.adl
Filename: 01_11_87/READROM
Read OK:
File size: 0733 bytes
Load address: 1900
Exec address: 8023
Duplicates

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

File contents
   10REM: READROM
   20MODE7
   30HIMEM=&3C00
   40DIM mcode &100
   50select=&FE30
   60osrdrm=&FFB9
   70osasci=&FFE3
   80osbyte=&FFF4
   90oscli=&FFF7
  100copy=&70
  110temp=&71
  120read=&72
  130write=&74
  140romnumber=&F4
  150rompoint=&F6
  160ON ERROR PRINT:END
  170FOR pass=0 TO 2 STEP 2
  180P%=mcode
  190[OPT pass
  200.number
  210LDA #&AA
  220LDX #0
  230LDY #&FF
  240JSR osbyte \ Find rom table
  250STX read
  260STY read+1
  270LDY copy
  280LDA (read),Y
  290BEQ finish
  300LDA #8
  310STA rompoint
  320LDA #&80
  330STA rompoint+1
  340.readname
  350INC rompoint
  360LDY copy
  370JSR osrdrm
  380CMP #ASC(" ")
  390BCC finish
  400JSR osasci
  410JMP readname
  420.finish
  430RTS
  440.move
  450LDA romnumber
  460STA temp
  470LDA copy
  480STA romnumber
  490STA select
  500LDA #&80
  510STA read+1
  520LDA #&3C
  530STA write+1
  540LDY #0
  550STY read
  560STY write
  570.relocate
  580LDA (read),Y
  590STA (write),Y
  600INY
  610BNE relocate
  620INC read+1
  630INC write+1
  640LDA read+1
  650CMP #&C0
  660BNE relocate
  670LDA temp
  680STA romnumber
  690STA select
  700RTS
  710]
  720NEXT
  730FOR socket=0 TO 15
  740?copy=socket
  750IF socket<10 PRINT;" ";
  760PRINT;socket;" ";
  770CALL number
  780PRINT
  790NEXT
  800VDU14
  810REPEAT
  820INPUT'"Which ROM (0-15) "socket
  830UNTIL socket >= 0 AND socket < 16
  840?copy=socket
  850CALL move
  860PRINT'"<SHIFT> to scroll, <ESCAPE> to exit"
  870ON ERROR PROCsave
  880FOR block=&3C00 TO &7BFF STEP 8
  890PRINT';~block+&4400;"  ";
  900FOR memory=0 TO 7
  910byte=block?memory
  920IF byte<16 VDU48
  930PRINT;~byte;" ";
  940NEXT
  950FOR memory=0 TO 7
  960byte=memory?block
  970IF byte>31 AND byte<127 VDUbyte ELSE VDU46
  980NEXT
  990NEXT
 1000PROCsave
 1010END
 1020DEFPROCsave
 1030ON ERROR PRINT:END
 1040VDU15
 1050INPUT''"Save ROM? (Y/N) "yes$
 1060REPEAT
 1070IF yes$="Y" INPUT"Filename = "filename$ ELSE INPUT"Another? (Y/N) "yes$:IF yes$<>"Y" END ELSE RUN
 1080size=FALSE
 1090FOR block=&3C00 TO &3D00
 1100IF ?block <> ?(block+&2000) size= TRUE
 1110NEXT
 1120IF size=TRUE size=&4000 ELSE size=&2000
 1130$mcode="SAVE "+filename$+" 3C00+"+STR$~(size)+" FFFF8000 FFFF8000"
 1140X%=mcode MOD 256
 1150Y%=mcode DIV 256
 1160CALL oscli
 1170yes$=""
 1180UNTIL FALSE
 1190ENDPROC

�: READROM
�7
�=&3C00
(� mcode &100
2select=&FE30
<osrdrm=&FFB9
Fosasci=&FFE3
Posbyte=&FFF4
Zoscli=&FFF7
dcopy=&70
ntemp=&71
xread=&72
�
write=&74
�romnumber=&F4
�rompoint=&F6
�� � �:�
�� pass=0 � 2 � 2
�P%=mcode
�
[OPT pass
�.number
�LDA #&AA
�
LDX #0
�LDY #&FF
�JSR osbyte \ Find rom table
�STX read
STY read+1
LDY copy
LDA (read),Y
"BEQ finish
,
LDA #8
6STA rompoint
@LDA #&80
JSTA rompoint+1
T
.readname
^INC rompoint
hLDY copy
rJSR osrdrm
|CMP #�(" ")
�BCC finish
�JSR osasci
�JMP readname
�.finish
�RTS
�	.move
�LDA romnumber
�STA temp
�LDA copy
�STA romnumber
�STA select
�LDA #&80
�STA read+1
LDA #&3C
STA write+1

LDY #0
&STY read
0
STY write
:
.relocate
DLDA (read),Y
NSTA (write),Y
XINY
bBNE relocate
lINC read+1
vINC write+1
�LDA read+1
�CMP #&C0
�BNE relocate
�LDA temp
�STA romnumber
�STA select
�RTS
�]
��
�� socket=0 � 15
�?copy=socket
�� socket<10 �;" ";
��;socket;" ";
� number
�
�
 �14
*�
4�'"Which ROM (0-15) "socket
>� socket >= 0 � socket < 16
H?copy=socket
R
� move
\+�'"<SHIFT> to scroll, <ESCAPE> to exit"
f
� � �save
p� block=&3C00 � &7BFF � 8
z�';~block+&4400;"  ";
�� memory=0 � 7
�byte=block?memory
�� byte<16 �48
��;~byte;" ";
��
�� memory=0 � 7
�byte=memory?block
�$� byte>31 � byte<127 �byte � �46
��
��
�	�save
��
�
��save
� � �:�
�15
�''"Save ROM? (Y/N) "yes$
$�
.Q� yes$="Y" �"Filename = "filename$ � �"Another? (Y/N) "yes$:� yes$<>"Y" � � �
8
size=�
B� block=&3C00 � &3D00
L&� ?block <> ?(block+&2000) size= �
V�
`$� size=� size=&4000 � size=&2000
jC$mcode="SAVE "+filename$+" 3C00+"+�~(size)+" FFFF8000 FFFF8000"
tX%=mcode � 256
~Y%=mcode � 256
�� oscli
�yes$=""
�� �
��
�
00000000  0d 00 0a 0e f4 3a 20 52  45 41 44 52 4f 4d 0d 00  |.....: READROM..|
00000010  14 06 eb 37 0d 00 1e 0b  d3 3d 26 33 43 30 30 0d  |...7.....=&3C00.|
00000020  00 28 10 de 20 6d 63 6f  64 65 20 26 31 30 30 0d  |.(.. mcode &100.|
00000030  00 32 10 73 65 6c 65 63  74 3d 26 46 45 33 30 0d  |.2.select=&FE30.|
00000040  00 3c 10 6f 73 72 64 72  6d 3d 26 46 46 42 39 0d  |.<.osrdrm=&FFB9.|
00000050  00 46 10 6f 73 61 73 63  69 3d 26 46 46 45 33 0d  |.F.osasci=&FFE3.|
00000060  00 50 10 6f 73 62 79 74  65 3d 26 46 46 46 34 0d  |.P.osbyte=&FFF4.|
00000070  00 5a 0f 6f 73 63 6c 69  3d 26 46 46 46 37 0d 00  |.Z.oscli=&FFF7..|
00000080  64 0c 63 6f 70 79 3d 26  37 30 0d 00 6e 0c 74 65  |d.copy=&70..n.te|
00000090  6d 70 3d 26 37 31 0d 00  78 0c 72 65 61 64 3d 26  |mp=&71..x.read=&|
000000a0  37 32 0d 00 82 0d 77 72  69 74 65 3d 26 37 34 0d  |72....write=&74.|
000000b0  00 8c 11 72 6f 6d 6e 75  6d 62 65 72 3d 26 46 34  |...romnumber=&F4|
000000c0  0d 00 96 10 72 6f 6d 70  6f 69 6e 74 3d 26 46 36  |....rompoint=&F6|
000000d0  0d 00 a0 0b ee 20 85 20  f1 3a e0 0d 00 aa 14 e3  |..... . .:......|
000000e0  20 70 61 73 73 3d 30 20  b8 20 32 20 88 20 32 0d  | pass=0 . 2 . 2.|
000000f0  00 b4 0c 50 25 3d 6d 63  6f 64 65 0d 00 be 0d 5b  |...P%=mcode....[|
00000100  4f 50 54 20 70 61 73 73  0d 00 c8 0b 2e 6e 75 6d  |OPT pass.....num|
00000110  62 65 72 0d 00 d2 0c 4c  44 41 20 23 26 41 41 0d  |ber....LDA #&AA.|
00000120  00 dc 0a 4c 44 58 20 23  30 0d 00 e6 0c 4c 44 59  |...LDX #0....LDY|
00000130  20 23 26 46 46 0d 00 f0  1f 4a 53 52 20 6f 73 62  | #&FF....JSR osb|
00000140  79 74 65 20 5c 20 46 69  6e 64 20 72 6f 6d 20 74  |yte \ Find rom t|
00000150  61 62 6c 65 0d 00 fa 0c  53 54 58 20 72 65 61 64  |able....STX read|
00000160  0d 01 04 0e 53 54 59 20  72 65 61 64 2b 31 0d 01  |....STY read+1..|
00000170  0e 0c 4c 44 59 20 63 6f  70 79 0d 01 18 10 4c 44  |..LDY copy....LD|
00000180  41 20 28 72 65 61 64 29  2c 59 0d 01 22 0e 42 45  |A (read),Y..".BE|
00000190  51 20 66 69 6e 69 73 68  0d 01 2c 0a 4c 44 41 20  |Q finish..,.LDA |
000001a0  23 38 0d 01 36 10 53 54  41 20 72 6f 6d 70 6f 69  |#8..6.STA rompoi|
000001b0  6e 74 0d 01 40 0c 4c 44  41 20 23 26 38 30 0d 01  |nt..@.LDA #&80..|
000001c0  4a 12 53 54 41 20 72 6f  6d 70 6f 69 6e 74 2b 31  |J.STA rompoint+1|
000001d0  0d 01 54 0d 2e 72 65 61  64 6e 61 6d 65 0d 01 5e  |..T..readname..^|
000001e0  10 49 4e 43 20 72 6f 6d  70 6f 69 6e 74 0d 01 68  |.INC rompoint..h|
000001f0  0c 4c 44 59 20 63 6f 70  79 0d 01 72 0e 4a 53 52  |.LDY copy..r.JSR|
00000200  20 6f 73 72 64 72 6d 0d  01 7c 0f 43 4d 50 20 23  | osrdrm..|.CMP #|
00000210  97 28 22 20 22 29 0d 01  86 0e 42 43 43 20 66 69  |.(" ")....BCC fi|
00000220  6e 69 73 68 0d 01 90 0e  4a 53 52 20 6f 73 61 73  |nish....JSR osas|
00000230  63 69 0d 01 9a 10 4a 4d  50 20 72 65 61 64 6e 61  |ci....JMP readna|
00000240  6d 65 0d 01 a4 0b 2e 66  69 6e 69 73 68 0d 01 ae  |me.....finish...|
00000250  07 52 54 53 0d 01 b8 09  2e 6d 6f 76 65 0d 01 c2  |.RTS.....move...|
00000260  11 4c 44 41 20 72 6f 6d  6e 75 6d 62 65 72 0d 01  |.LDA romnumber..|
00000270  cc 0c 53 54 41 20 74 65  6d 70 0d 01 d6 0c 4c 44  |..STA temp....LD|
00000280  41 20 63 6f 70 79 0d 01  e0 11 53 54 41 20 72 6f  |A copy....STA ro|
00000290  6d 6e 75 6d 62 65 72 0d  01 ea 0e 53 54 41 20 73  |mnumber....STA s|
000002a0  65 6c 65 63 74 0d 01 f4  0c 4c 44 41 20 23 26 38  |elect....LDA #&8|
000002b0  30 0d 01 fe 0e 53 54 41  20 72 65 61 64 2b 31 0d  |0....STA read+1.|
000002c0  02 08 0c 4c 44 41 20 23  26 33 43 0d 02 12 0f 53  |...LDA #&3C....S|
000002d0  54 41 20 77 72 69 74 65  2b 31 0d 02 1c 0a 4c 44  |TA write+1....LD|
000002e0  59 20 23 30 0d 02 26 0c  53 54 59 20 72 65 61 64  |Y #0..&.STY read|
000002f0  0d 02 30 0d 53 54 59 20  77 72 69 74 65 0d 02 3a  |..0.STY write..:|
00000300  0d 2e 72 65 6c 6f 63 61  74 65 0d 02 44 10 4c 44  |..relocate..D.LD|
00000310  41 20 28 72 65 61 64 29  2c 59 0d 02 4e 11 53 54  |A (read),Y..N.ST|
00000320  41 20 28 77 72 69 74 65  29 2c 59 0d 02 58 07 49  |A (write),Y..X.I|
00000330  4e 59 0d 02 62 10 42 4e  45 20 72 65 6c 6f 63 61  |NY..b.BNE reloca|
00000340  74 65 0d 02 6c 0e 49 4e  43 20 72 65 61 64 2b 31  |te..l.INC read+1|
00000350  0d 02 76 0f 49 4e 43 20  77 72 69 74 65 2b 31 0d  |..v.INC write+1.|
00000360  02 80 0e 4c 44 41 20 72  65 61 64 2b 31 0d 02 8a  |...LDA read+1...|
00000370  0c 43 4d 50 20 23 26 43  30 0d 02 94 10 42 4e 45  |.CMP #&C0....BNE|
00000380  20 72 65 6c 6f 63 61 74  65 0d 02 9e 0c 4c 44 41  | relocate....LDA|
00000390  20 74 65 6d 70 0d 02 a8  11 53 54 41 20 72 6f 6d  | temp....STA rom|
000003a0  6e 75 6d 62 65 72 0d 02  b2 0e 53 54 41 20 73 65  |number....STA se|
000003b0  6c 65 63 74 0d 02 bc 07  52 54 53 0d 02 c6 05 5d  |lect....RTS....]|
000003c0  0d 02 d0 05 ed 0d 02 da  13 e3 20 73 6f 63 6b 65  |.......... socke|
000003d0  74 3d 30 20 b8 20 31 35  0d 02 e4 10 3f 63 6f 70  |t=0 . 15....?cop|
000003e0  79 3d 73 6f 63 6b 65 74  0d 02 ee 16 e7 20 73 6f  |y=socket..... so|
000003f0  63 6b 65 74 3c 31 30 20  f1 3b 22 20 22 3b 0d 02  |cket<10 .;" ";..|
00000400  f8 11 f1 3b 73 6f 63 6b  65 74 3b 22 20 22 3b 0d  |...;socket;" ";.|
00000410  03 02 0c d6 20 6e 75 6d  62 65 72 0d 03 0c 05 f1  |.... number.....|
00000420  0d 03 16 05 ed 0d 03 20  07 ef 31 34 0d 03 2a 05  |....... ..14..*.|
00000430  f5 0d 03 34 1f e8 27 22  57 68 69 63 68 20 52 4f  |...4..'"Which RO|
00000440  4d 20 28 30 2d 31 35 29  20 22 73 6f 63 6b 65 74  |M (0-15) "socket|
00000450  0d 03 3e 1f fd 20 73 6f  63 6b 65 74 20 3e 3d 20  |..>.. socket >= |
00000460  30 20 80 20 73 6f 63 6b  65 74 20 3c 20 31 36 0d  |0 . socket < 16.|
00000470  03 48 10 3f 63 6f 70 79  3d 73 6f 63 6b 65 74 0d  |.H.?copy=socket.|
00000480  03 52 0a d6 20 6d 6f 76  65 0d 03 5c 2b f1 27 22  |.R.. move..\+.'"|
00000490  3c 53 48 49 46 54 3e 20  74 6f 20 73 63 72 6f 6c  |<SHIFT> to scrol|
000004a0  6c 2c 20 3c 45 53 43 41  50 45 3e 20 74 6f 20 65  |l, <ESCAPE> to e|
000004b0  78 69 74 22 0d 03 66 0d  ee 20 85 20 f2 73 61 76  |xit"..f.. . .sav|
000004c0  65 0d 03 70 1d e3 20 62  6c 6f 63 6b 3d 26 33 43  |e..p.. block=&3C|
000004d0  30 30 20 b8 20 26 37 42  46 46 20 88 20 38 0d 03  |00 . &7BFF . 8..|
000004e0  7a 19 f1 27 3b 7e 62 6c  6f 63 6b 2b 26 34 34 30  |z..';~block+&440|
000004f0  30 3b 22 20 20 22 3b 0d  03 84 12 e3 20 6d 65 6d  |0;"  ";..... mem|
00000500  6f 72 79 3d 30 20 b8 20  37 0d 03 8e 15 62 79 74  |ory=0 . 7....byt|
00000510  65 3d 62 6c 6f 63 6b 3f  6d 65 6d 6f 72 79 0d 03  |e=block?memory..|
00000520  98 11 e7 20 62 79 74 65  3c 31 36 20 ef 34 38 0d  |... byte<16 .48.|
00000530  03 a2 10 f1 3b 7e 62 79  74 65 3b 22 20 22 3b 0d  |....;~byte;" ";.|
00000540  03 ac 05 ed 0d 03 b6 12  e3 20 6d 65 6d 6f 72 79  |......... memory|
00000550  3d 30 20 b8 20 37 0d 03  c0 15 62 79 74 65 3d 6d  |=0 . 7....byte=m|
00000560  65 6d 6f 72 79 3f 62 6c  6f 63 6b 0d 03 ca 24 e7  |emory?block...$.|
00000570  20 62 79 74 65 3e 33 31  20 80 20 62 79 74 65 3c  | byte>31 . byte<|
00000580  31 32 37 20 ef 62 79 74  65 20 8b 20 ef 34 36 0d  |127 .byte . .46.|
00000590  03 d4 05 ed 0d 03 de 05  ed 0d 03 e8 09 f2 73 61  |..............sa|
000005a0  76 65 0d 03 f2 05 e0 0d  03 fc 0a dd f2 73 61 76  |ve...........sav|
000005b0  65 0d 04 06 0b ee 20 85  20 f1 3a e0 0d 04 10 07  |e..... . .:.....|
000005c0  ef 31 35 0d 04 1a 1d e8  27 27 22 53 61 76 65 20  |.15.....''"Save |
000005d0  52 4f 4d 3f 20 28 59 2f  4e 29 20 22 79 65 73 24  |ROM? (Y/N) "yes$|
000005e0  0d 04 24 05 f5 0d 04 2e  51 e7 20 79 65 73 24 3d  |..$.....Q. yes$=|
000005f0  22 59 22 20 e8 22 46 69  6c 65 6e 61 6d 65 20 3d  |"Y" ."Filename =|
00000600  20 22 66 69 6c 65 6e 61  6d 65 24 20 8b 20 e8 22  | "filename$ . ."|
00000610  41 6e 6f 74 68 65 72 3f  20 28 59 2f 4e 29 20 22  |Another? (Y/N) "|
00000620  79 65 73 24 3a e7 20 79  65 73 24 3c 3e 22 59 22  |yes$:. yes$<>"Y"|
00000630  20 e0 20 8b 20 f9 0d 04  38 0a 73 69 7a 65 3d a3  | . . ...8.size=.|
00000640  0d 04 42 19 e3 20 62 6c  6f 63 6b 3d 26 33 43 30  |..B.. block=&3C0|
00000650  30 20 b8 20 26 33 44 30  30 0d 04 4c 26 e7 20 3f  |0 . &3D00..L&. ?|
00000660  62 6c 6f 63 6b 20 3c 3e  20 3f 28 62 6c 6f 63 6b  |block <> ?(block|
00000670  2b 26 32 30 30 30 29 20  73 69 7a 65 3d 20 b9 0d  |+&2000) size= ..|
00000680  04 56 05 ed 0d 04 60 24  e7 20 73 69 7a 65 3d b9  |.V....`$. size=.|
00000690  20 73 69 7a 65 3d 26 34  30 30 30 20 8b 20 73 69  | size=&4000 . si|
000006a0  7a 65 3d 26 32 30 30 30  0d 04 6a 43 24 6d 63 6f  |ze=&2000..jC$mco|
000006b0  64 65 3d 22 53 41 56 45  20 22 2b 66 69 6c 65 6e  |de="SAVE "+filen|
000006c0  61 6d 65 24 2b 22 20 33  43 30 30 2b 22 2b c3 7e  |ame$+" 3C00+"+.~|
000006d0  28 73 69 7a 65 29 2b 22  20 46 46 46 46 38 30 30  |(size)+" FFFF800|
000006e0  30 20 46 46 46 46 38 30  30 30 22 0d 04 74 12 58  |0 FFFF8000"..t.X|
000006f0  25 3d 6d 63 6f 64 65 20  83 20 32 35 36 0d 04 7e  |%=mcode . 256..~|
00000700  12 59 25 3d 6d 63 6f 64  65 20 81 20 32 35 36 0d  |.Y%=mcode . 256.|
00000710  04 88 0b d6 20 6f 73 63  6c 69 0d 04 92 0b 79 65  |.... oscli....ye|
00000720  73 24 3d 22 22 0d 04 9c  07 fd 20 a3 0d 04 a6 05  |s$=""..... .....|
00000730  e1 0d ff                                          |...|
00000733
01_11_87/READROM.m0
01_11_87/READROM.m1
01_11_87/READROM.m2
01_11_87/READROM.m4
01_11_87/READROM.m5