Home » CEEFAX disks » telesoftware17.adl » 25-08-89/HeadM\C

25-08-89/HeadM\C

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 » telesoftware17.adl
Filename: 25-08-89/HeadM\C
Read OK:
File size: 1147 bytes
Load address: FFFF0E00
Exec address: FFFF802B
File contents
   10 REM   M/Code ROM header
   20 REM   by TERRY BLUNT
   30 REM   22 / 6 / 87
   40 
   50 CLOSE #0
   60 ON ERROR PROCerror
   70 PROCclear
   80 CLEAR
   90 copy$="TERRY BLUNT"
  100 eor=RND(255)
  110 E%=eor
  120 
  130 DIM block &40:A%=5:!block=block+&12
  140 X%=block MOD 256
  150 Y%=block DIV 256
  160 
  170 line=&F2
  180 rom_No=&F4
  190 
  200 base=&8000
  210 start=&3800
  220 copy=0
  230 entry=0
  240 offset=base-start
  250 
  255 osfile=&FFDD
  260 osnewl=&FFE7
  270 oswrch=&FFEE
  280 osbyte=&FFF4
  290 oscli=&FFF7
  300 
  310 MODE 7
  320 
  330 REPEAT
  340 READ A$
  350 PRINT CHR$130 A$
  360 UNTIL A$=" "
  370 
  380 PRINT CHR$134 "Enter Source program" CHR$133;
  390 INPUT "" source$
  400 S%=OPENUP source$
  410 IF S%=0 PRINT' "File not found"!
  420 $(block+&12)=source$:CALL osfile
  430 load=(block!2)AND &FFFF:exec=(block!6)AND &FFFF
  440 
  450 PRINT CHR$134 "Enter ROM title     " CHR$133;
  460 INPUT "" title$
  470 IF LEN title$>39 PRINT' "Too long"!
  480 
  490 PRINT CHR$134 "Enter Dest. filename" CHR$133;
  500 INPUT "" dest$
  510 D%=OPENUP dest$
  520 IF D% PRINT' "File exists"!
  530 
  540 copy$="(C) "+copy$
  550 
  560 FOR I%=0 TO 2 STEP 2
  570 P%=start
  580 !P%=&4C000000
  590 P%=P%+4
  600 !P%=entry+offset
  610 P%=P%+2
  620 ?P%=&82
  630 P%=P%+1
  640 ?P%=copy-start
  650 P%=P%+1
  660 ?P%=1
  670 P%=P%+1
  680 
  690 title=P%
  700 $P%=title$
  710 P%=P%+LEN title$
  720 copy=P%
  730 ?P%=0
  740 P%=P%+1
  750 $P%=copy$
  760 P%=P%+LEN copy$
  770 [OPT I%
  780 
  790          BRK
  800 
  810 .ident
  820          LDX #&00
  830 
  840 .identloop
  850          LDA title+offset,X
  860          BEQ identexit
  870          JSR oswrch
  880          INX
  890          BNE identloop
  900 
  910 .identexit
  920          JMP osnewl
  930 
  940 .entry
  950          PHP
  960          PHA
  970          CMP #&03
  980          BNE notbreak
  990          JSR ident+offset
 1000          JSR osnewl
 1010          BNE exit
 1020 
 1030 .notbreak
 1040          CMP #&04
 1050          BEQ test
 1060          CMP #&09
 1070          BNE exit
 1080          LDA (line),Y
 1090          CMP #&0D
 1100          BNE exit
 1110          JSR osnewl
 1120          JSR ident+offset
 1130          BNE exit
 1140 
 1150 .notus
 1160          PLA
 1170          TAY
 1180 
 1190 .exit
 1200          PLA
 1210          LDX rom_No
 1220          PLP
 1230          RTS
 1240 
 1250 .test
 1260          TYA
 1270          PHA
 1280          LDX #&00
 1290 
 1300 .loop
 1310          LDA (line),Y
 1320          CMP #ASC"."
 1330          BNE cont
 1340          CPX #&02
 1350          BCS yes
 1360 
 1370 .cont
 1380          AND #&5F
 1390          CMP title+offset,X
 1400          BNE notus
 1410          INY
 1420          INX
 1430          LDA title+offset,X
 1440          AND #&5F
 1450          BNE loop
 1460 
 1470 .yes
 1480          LDA #&C8
 1490          LDX #&03
 1500          JSR osbyte
 1510          LDA #eor
 1520          STA &74
 1530          LDA #(prog+offset) MOD 256
 1540          STA &70
 1550          LDA #(prog+offset) DIV 256
 1560          STA &71
 1570          LDA #load MOD 256
 1580          STA &72
 1590          LDA #load DIV 256
 1600          STA &73
 1610          LDY #&00
 1620          LDX #(top-prog) DIV 256+1
 1630 
 1640 .down
 1650          LDA (&70),Y
 1660          EOR &74
 1670          INC &74
 1680          STA (&72),Y
 1690          INY
 1700          BNE down
 1710          INC &71
 1720          INC &73
 1730          DEX
 1740          BNE down
 1750 
 1760          JSR exec
 1770          PLA
 1780          TAY
 1790          PLA
 1800          LDA #&00
 1810          LDX rom_No
 1820          PLP
 1830          RTS
 1840 
 2010 .prog
 2020 
 2030 ]
 2040 IF I%=0 PROCload
 2050 NEXT
 2060 
 2070 $block="SAVE "+dest$+" "+STR$~start+" "+STR$~(start+end)+" 8000 8000"
 2080 CALL oscli
 2090 
 2100 PRINT' "Eprom size ";end DIV &400 "k"!
 2110 
 2120 DEFPROCload
 2160 REPEAT
 2170 N%=BGET#S% EOR E%
 2180 E%=(E%+1) AND &FF
 2190 ?P%=N%
 2200 P%=P%+1
 2210 UNTIL P%>start+&4000 OR EOF#S%
 2220 IF NOT EOF#S% PRINT' "Program too long"!
 2230 top=P%
 2240 CLOSE #S%
 2250 IF P%<start+&2001 end=&2000 ELSE end=&4000
 2260 ENDPROC
 2270 
 2280 DEFPROCerror
 2290 CLOSE #0
 2300 IF ERR<>26 REPORT
 2310 PRINT " - Press a key"
 2320 IF GET
 2330 ENDPROC
 2340 
 2350 DEFPROCclear
 2360 DIM block &40
 2370 !&70=&3800
 2380 A%=&FF:X%=&40:Y%=&00
 2390 P%=block
 2400 [OPT2
 2410 
 2420 .loop
 2430          STA (&70),Y
 2440          INY
 2450          BNE loop
 2460          INC &71
 2470          DEX
 2480          BNE loop
 2490          RTS
 2500 
 2510 ]
 2520 CALL block
 2530 ENDPROC
 2540 
 2550 DATA (c) Terry Blunt
 2560 DATA ,,,"             EPROM HEADER"
 2570 DATA ,,,"  This program adds a header routine"
 2580 DATA "to any M/Code program,  generating a"
 2590 DATA new file that can be programmed into
 2600 DATA an 8K or 16K EPROM. File size is set
 2610 DATA automatically by the program.
 2620 DATA ,"  When called by the ROM title,  the"
 2630 DATA EPROM  will  download the program to
 2640 DATA user RAM and jump to its entry point
 2650 DATA (EXEC address).," "

 �   M/Code ROM header
 �   by TERRY BLUNT
 �   22 / 6 / 87
( 
2	 � #0
< � � �error
F �clear
P �
Z copy$="TERRY BLUNT"
d eor=�(255)
n E%=eor
x 
�& � block &40:A%=5:!block=block+&12
� X%=block � 256
� Y%=block � 256
� 
�
 line=&F2
� rom_No=&F4
� 
� base=&8000
� start=&3800
� copy=0
� entry=0
� offset=base-start
� 
� osfile=&FFDD
 osnewl=&FFE7
 oswrch=&FFEE
 osbyte=&FFF4
" oscli=&FFF7
, 
6 � 7
@ 
J �
T	 � A$
^ � �130 A$
h
 � A$=" "
r 
|( � �134 "Enter Source program" �133;
� � "" source$
� S%=� source$
�  � S%=0 �' "File not found"!
�" $(block+&12)=source$:� osfile
�0 load=(block!2)� &FFFF:exec=(block!6)� &FFFF
� 
�( � �134 "Enter ROM title     " �133;
� � "" title$
�! � � title$>39 �' "Too long"!
� 
�( � �134 "Enter Dest. filename" �133;
� � "" dest$
� D%=� dest$
 � D% �' "File exists"!
 
 copy$="(C) "+copy$
& 
0 � I%=0 � 2 � 2
:
 P%=start
D !P%=&4C000000
N P%=P%+4
X !P%=entry+offset
b P%=P%+2
l ?P%=&82
v P%=P%+1
� ?P%=copy-start
� P%=P%+1
�
 ?P%=1
� P%=P%+1
� 
�
 title=P%
� $P%=title$
� P%=P%+� title$
� copy=P%
�
 ?P%=0
� P%=P%+1
� $P%=copy$
� P%=P%+� copy$
 [OPT I%
 
          BRK
  
* .ident
4          LDX #&00
> 
H .identloop
R           LDA title+offset,X
\          BEQ identexit
f          JSR oswrch
p          INX
z          BNE identloop
� 
� .identexit
�          JMP osnewl
� 
� .entry
�          PHP
�          PHA
�          CMP #&03
�          BNE notbreak
�          JSR ident+offset
�          JSR osnewl
�          BNE exit
� 
 .notbreak
          CMP #&04
          BEQ test
$          CMP #&09
.          BNE exit
8          LDA (line),Y
B          CMP #&0D
L          BNE exit
V          JSR osnewl
`          JSR ident+offset
j          BNE exit
t 
~ .notus
�          PLA
�          TAY
� 
�
 .exit
�          PLA
�          LDX rom_No
�          PLP
�          RTS
� 
�
 .test
�          TYA
�          PHA
          LDX #&00

 

 .loop
          LDA (line),Y
(          CMP #�"."
2          BNE cont
<          CPX #&02
F          BCS yes
P 
Z
 .cont
d          � #&5F
n           CMP title+offset,X
x          BNE notus
�          INY
�          INX
�           LDA title+offset,X
�          � #&5F
�          BNE loop
� 
�	 .yes
�          LDA #&C8
�          LDX #&03
�          JSR osbyte
�          LDA #eor
�          STA &74
�&          LDA #(prog+offset) � 256
          STA &70
&          LDA #(prog+offset) � 256
          STA &71
"          LDA #load � 256
,          STA &72
6          LDA #load � 256
@          STA &73
J          LDY #&00
T%          LDX #(top-prog) � 256+1
^ 
h
 .down
r          LDA (&70),Y
|          � &74
�          INC &74
�          STA (&72),Y
�          INY
�          BNE down
�          INC &71
�          INC &73
�          DEX
�          BNE down
� 
�          JSR exec
�          PLA
�          TAY
�          PLA
          LDA #&00
          LDX rom_No
          PLP
&          RTS
0 
�
 .prog
� 
� ]
� � I%=0 �load
 �
 
D $block="SAVE "+dest$+" "+�~start+" "+�~(start+end)+" 8000 8000"
  � oscli
* 
4% �' "Eprom size ";end � &400 "k"!
> 
H ��load
p �
z N%=�#S% � E%
� E%=(E%+1) � &FF
� ?P%=N%
� P%=P%+1
� � P%>start+&4000 � �#S%
�$ � � �#S% �' "Program too long"!
� top=P%
�
 � #S%
�+ � P%<start+&2001 end=&2000 � end=&4000
� �
� 
� ��error
�	 � #0
� � �<>26 �
	 � " - Press a key"
	 � �
	 �
	$ 
	. ��clear
	8 � block &40
	B !&70=&3800
	L A%=&FF:X%=&40:Y%=&00
	V
 P%=block
	`
 [OPT2
	j 
	t
 .loop
	~          STA (&70),Y
	�          INY
	�          BNE loop
	�          INC &71
	�          DEX
	�          BNE loop
	�          RTS
	� 
	� ]
	� � block
	� �
	� 
	� � (c) Terry Blunt
% � ,,,"             EPROM HEADER"

0 � ,,,"  This program adds a header routine"
- � "to any M/Code program,  generating a"
+ � new file that can be programmed into
(+ � an 8K or 16K EPROM. File size is set
2$ � automatically by the program.
<. � ,"  When called by the ROM title,  the"
F+ � EPROM  will  download the program to
P+ � user RAM and jump to its entry point
Z � (EXEC address).," "
�
00000000  0d 00 0a 1a 20 f4 20 20  20 4d 2f 43 6f 64 65 20  |.... .   M/Code |
00000010  52 4f 4d 20 68 65 61 64  65 72 0d 00 14 17 20 f4  |ROM header.... .|
00000020  20 20 20 62 79 20 54 45  52 52 59 20 42 4c 55 4e  |   by TERRY BLUN|
00000030  54 0d 00 1e 14 20 f4 20  20 20 32 32 20 2f 20 36  |T.... .   22 / 6|
00000040  20 2f 20 38 37 0d 00 28  05 20 0d 00 32 09 20 d9  | / 87..(. ..2. .|
00000050  20 23 30 0d 00 3c 0f 20  ee 20 85 20 f2 65 72 72  | #0..<. . . .err|
00000060  6f 72 0d 00 46 0b 20 f2  63 6c 65 61 72 0d 00 50  |or..F. .clear..P|
00000070  06 20 d8 0d 00 5a 18 20  63 6f 70 79 24 3d 22 54  |. ...Z. copy$="T|
00000080  45 52 52 59 20 42 4c 55  4e 54 22 0d 00 64 0f 20  |ERRY BLUNT"..d. |
00000090  65 6f 72 3d b3 28 32 35  35 29 0d 00 6e 0b 20 45  |eor=.(255)..n. E|
000000a0  25 3d 65 6f 72 0d 00 78  05 20 0d 00 82 26 20 de  |%=eor..x. ...& .|
000000b0  20 62 6c 6f 63 6b 20 26  34 30 3a 41 25 3d 35 3a  | block &40:A%=5:|
000000c0  21 62 6c 6f 63 6b 3d 62  6c 6f 63 6b 2b 26 31 32  |!block=block+&12|
000000d0  0d 00 8c 13 20 58 25 3d  62 6c 6f 63 6b 20 83 20  |.... X%=block . |
000000e0  32 35 36 0d 00 96 13 20  59 25 3d 62 6c 6f 63 6b  |256.... Y%=block|
000000f0  20 81 20 32 35 36 0d 00  a0 05 20 0d 00 aa 0d 20  | . 256.... .... |
00000100  6c 69 6e 65 3d 26 46 32  0d 00 b4 0f 20 72 6f 6d  |line=&F2.... rom|
00000110  5f 4e 6f 3d 26 46 34 0d  00 be 05 20 0d 00 c8 0f  |_No=&F4.... ....|
00000120  20 62 61 73 65 3d 26 38  30 30 30 0d 00 d2 10 20  | base=&8000.... |
00000130  73 74 61 72 74 3d 26 33  38 30 30 0d 00 dc 0b 20  |start=&3800.... |
00000140  63 6f 70 79 3d 30 0d 00  e6 0c 20 65 6e 74 72 79  |copy=0.... entry|
00000150  3d 30 0d 00 f0 16 20 6f  66 66 73 65 74 3d 62 61  |=0.... offset=ba|
00000160  73 65 2d 73 74 61 72 74  0d 00 fa 05 20 0d 00 ff  |se-start.... ...|
00000170  11 20 6f 73 66 69 6c 65  3d 26 46 46 44 44 0d 01  |. osfile=&FFDD..|
00000180  04 11 20 6f 73 6e 65 77  6c 3d 26 46 46 45 37 0d  |.. osnewl=&FFE7.|
00000190  01 0e 11 20 6f 73 77 72  63 68 3d 26 46 46 45 45  |... oswrch=&FFEE|
000001a0  0d 01 18 11 20 6f 73 62  79 74 65 3d 26 46 46 46  |.... osbyte=&FFF|
000001b0  34 0d 01 22 10 20 6f 73  63 6c 69 3d 26 46 46 46  |4..". oscli=&FFF|
000001c0  37 0d 01 2c 05 20 0d 01  36 08 20 eb 20 37 0d 01  |7..,. ..6. . 7..|
000001d0  40 05 20 0d 01 4a 06 20  f5 0d 01 54 09 20 f3 20  |@. ..J. ...T. . |
000001e0  41 24 0d 01 5e 0e 20 f1  20 bd 31 33 30 20 41 24  |A$..^. . .130 A$|
000001f0  0d 01 68 0d 20 fd 20 41  24 3d 22 20 22 0d 01 72  |..h. . A$=" "..r|
00000200  05 20 0d 01 7c 28 20 f1  20 bd 31 33 34 20 22 45  |. ..|( . .134 "E|
00000210  6e 74 65 72 20 53 6f 75  72 63 65 20 70 72 6f 67  |nter Source prog|
00000220  72 61 6d 22 20 bd 31 33  33 3b 0d 01 86 11 20 e8  |ram" .133;.... .|
00000230  20 22 22 20 73 6f 75 72  63 65 24 0d 01 90 11 20  | "" source$.... |
00000240  53 25 3d ad 20 73 6f 75  72 63 65 24 0d 01 9a 20  |S%=. source$... |
00000250  20 e7 20 53 25 3d 30 20  f1 27 20 22 46 69 6c 65  | . S%=0 .' "File|
00000260  20 6e 6f 74 20 66 6f 75  6e 64 22 21 0d 01 a4 22  | not found"!..."|
00000270  20 24 28 62 6c 6f 63 6b  2b 26 31 32 29 3d 73 6f  | $(block+&12)=so|
00000280  75 72 63 65 24 3a d6 20  6f 73 66 69 6c 65 0d 01  |urce$:. osfile..|
00000290  ae 30 20 6c 6f 61 64 3d  28 62 6c 6f 63 6b 21 32  |.0 load=(block!2|
000002a0  29 80 20 26 46 46 46 46  3a 65 78 65 63 3d 28 62  |). &FFFF:exec=(b|
000002b0  6c 6f 63 6b 21 36 29 80  20 26 46 46 46 46 0d 01  |lock!6). &FFFF..|
000002c0  b8 05 20 0d 01 c2 28 20  f1 20 bd 31 33 34 20 22  |.. ...( . .134 "|
000002d0  45 6e 74 65 72 20 52 4f  4d 20 74 69 74 6c 65 20  |Enter ROM title |
000002e0  20 20 20 20 22 20 bd 31  33 33 3b 0d 01 cc 10 20  |    " .133;.... |
000002f0  e8 20 22 22 20 74 69 74  6c 65 24 0d 01 d6 21 20  |. "" title$...! |
00000300  e7 20 a9 20 74 69 74 6c  65 24 3e 33 39 20 f1 27  |. . title$>39 .'|
00000310  20 22 54 6f 6f 20 6c 6f  6e 67 22 21 0d 01 e0 05  | "Too long"!....|
00000320  20 0d 01 ea 28 20 f1 20  bd 31 33 34 20 22 45 6e  | ...( . .134 "En|
00000330  74 65 72 20 44 65 73 74  2e 20 66 69 6c 65 6e 61  |ter Dest. filena|
00000340  6d 65 22 20 bd 31 33 33  3b 0d 01 f4 0f 20 e8 20  |me" .133;.... . |
00000350  22 22 20 64 65 73 74 24  0d 01 fe 0f 20 44 25 3d  |"" dest$.... D%=|
00000360  ad 20 64 65 73 74 24 0d  02 08 1b 20 e7 20 44 25  |. dest$.... . D%|
00000370  20 f1 27 20 22 46 69 6c  65 20 65 78 69 73 74 73  | .' "File exists|
00000380  22 21 0d 02 12 05 20 0d  02 1c 17 20 63 6f 70 79  |"!.... .... copy|
00000390  24 3d 22 28 43 29 20 22  2b 63 6f 70 79 24 0d 02  |$="(C) "+copy$..|
000003a0  26 05 20 0d 02 30 13 20  e3 20 49 25 3d 30 20 b8  |&. ..0. . I%=0 .|
000003b0  20 32 20 88 20 32 0d 02  3a 0d 20 50 25 3d 73 74  | 2 . 2..:. P%=st|
000003c0  61 72 74 0d 02 44 12 20  21 50 25 3d 26 34 43 30  |art..D. !P%=&4C0|
000003d0  30 30 30 30 30 0d 02 4e  0c 20 50 25 3d 50 25 2b  |00000..N. P%=P%+|
000003e0  34 0d 02 58 15 20 21 50  25 3d 65 6e 74 72 79 2b  |4..X. !P%=entry+|
000003f0  6f 66 66 73 65 74 0d 02  62 0c 20 50 25 3d 50 25  |offset..b. P%=P%|
00000400  2b 32 0d 02 6c 0c 20 3f  50 25 3d 26 38 32 0d 02  |+2..l. ?P%=&82..|
00000410  76 0c 20 50 25 3d 50 25  2b 31 0d 02 80 13 20 3f  |v. P%=P%+1.... ?|
00000420  50 25 3d 63 6f 70 79 2d  73 74 61 72 74 0d 02 8a  |P%=copy-start...|
00000430  0c 20 50 25 3d 50 25 2b  31 0d 02 94 0a 20 3f 50  |. P%=P%+1.... ?P|
00000440  25 3d 31 0d 02 9e 0c 20  50 25 3d 50 25 2b 31 0d  |%=1.... P%=P%+1.|
00000450  02 a8 05 20 0d 02 b2 0d  20 74 69 74 6c 65 3d 50  |... .... title=P|
00000460  25 0d 02 bc 0f 20 24 50  25 3d 74 69 74 6c 65 24  |%.... $P%=title$|
00000470  0d 02 c6 13 20 50 25 3d  50 25 2b a9 20 74 69 74  |.... P%=P%+. tit|
00000480  6c 65 24 0d 02 d0 0c 20  63 6f 70 79 3d 50 25 0d  |le$.... copy=P%.|
00000490  02 da 0a 20 3f 50 25 3d  30 0d 02 e4 0c 20 50 25  |... ?P%=0.... P%|
000004a0  3d 50 25 2b 31 0d 02 ee  0e 20 24 50 25 3d 63 6f  |=P%+1.... $P%=co|
000004b0  70 79 24 0d 02 f8 12 20  50 25 3d 50 25 2b a9 20  |py$.... P%=P%+. |
000004c0  63 6f 70 79 24 0d 03 02  0c 20 5b 4f 50 54 20 49  |copy$.... [OPT I|
000004d0  25 0d 03 0c 05 20 0d 03  16 11 20 20 20 20 20 20  |%.... ....      |
000004e0  20 20 20 20 42 52 4b 0d  03 20 05 20 0d 03 2a 0b  |    BRK.. . ..*.|
000004f0  20 2e 69 64 65 6e 74 0d  03 34 16 20 20 20 20 20  | .ident..4.     |
00000500  20 20 20 20 20 4c 44 58  20 23 26 30 30 0d 03 3e  |     LDX #&00..>|
00000510  05 20 0d 03 48 0f 20 2e  69 64 65 6e 74 6c 6f 6f  |. ..H. .identloo|
00000520  70 0d 03 52 20 20 20 20  20 20 20 20 20 20 20 4c  |p..R           L|
00000530  44 41 20 74 69 74 6c 65  2b 6f 66 66 73 65 74 2c  |DA title+offset,|
00000540  58 0d 03 5c 1b 20 20 20  20 20 20 20 20 20 20 42  |X..\.          B|
00000550  45 51 20 69 64 65 6e 74  65 78 69 74 0d 03 66 18  |EQ identexit..f.|
00000560  20 20 20 20 20 20 20 20  20 20 4a 53 52 20 6f 73  |          JSR os|
00000570  77 72 63 68 0d 03 70 11  20 20 20 20 20 20 20 20  |wrch..p.        |
00000580  20 20 49 4e 58 0d 03 7a  1b 20 20 20 20 20 20 20  |  INX..z.       |
00000590  20 20 20 42 4e 45 20 69  64 65 6e 74 6c 6f 6f 70  |   BNE identloop|
000005a0  0d 03 84 05 20 0d 03 8e  0f 20 2e 69 64 65 6e 74  |.... .... .ident|
000005b0  65 78 69 74 0d 03 98 18  20 20 20 20 20 20 20 20  |exit....        |
000005c0  20 20 4a 4d 50 20 6f 73  6e 65 77 6c 0d 03 a2 05  |  JMP osnewl....|
000005d0  20 0d 03 ac 0b 20 2e 65  6e 74 72 79 0d 03 b6 11  | .... .entry....|
000005e0  20 20 20 20 20 20 20 20  20 20 50 48 50 0d 03 c0  |          PHP...|
000005f0  11 20 20 20 20 20 20 20  20 20 20 50 48 41 0d 03  |.          PHA..|
00000600  ca 16 20 20 20 20 20 20  20 20 20 20 43 4d 50 20  |..          CMP |
00000610  23 26 30 33 0d 03 d4 1a  20 20 20 20 20 20 20 20  |#&03....        |
00000620  20 20 42 4e 45 20 6e 6f  74 62 72 65 61 6b 0d 03  |  BNE notbreak..|
00000630  de 1e 20 20 20 20 20 20  20 20 20 20 4a 53 52 20  |..          JSR |
00000640  69 64 65 6e 74 2b 6f 66  66 73 65 74 0d 03 e8 18  |ident+offset....|
00000650  20 20 20 20 20 20 20 20  20 20 4a 53 52 20 6f 73  |          JSR os|
00000660  6e 65 77 6c 0d 03 f2 16  20 20 20 20 20 20 20 20  |newl....        |
00000670  20 20 42 4e 45 20 65 78  69 74 0d 03 fc 05 20 0d  |  BNE exit.... .|
00000680  04 06 0e 20 2e 6e 6f 74  62 72 65 61 6b 0d 04 10  |... .notbreak...|
00000690  16 20 20 20 20 20 20 20  20 20 20 43 4d 50 20 23  |.          CMP #|
000006a0  26 30 34 0d 04 1a 16 20  20 20 20 20 20 20 20 20  |&04....         |
000006b0  20 42 45 51 20 74 65 73  74 0d 04 24 16 20 20 20  | BEQ test..$.   |
000006c0  20 20 20 20 20 20 20 43  4d 50 20 23 26 30 39 0d  |       CMP #&09.|
000006d0  04 2e 16 20 20 20 20 20  20 20 20 20 20 42 4e 45  |...          BNE|
000006e0  20 65 78 69 74 0d 04 38  1a 20 20 20 20 20 20 20  | exit..8.       |
000006f0  20 20 20 4c 44 41 20 28  6c 69 6e 65 29 2c 59 0d  |   LDA (line),Y.|
00000700  04 42 16 20 20 20 20 20  20 20 20 20 20 43 4d 50  |.B.          CMP|
00000710  20 23 26 30 44 0d 04 4c  16 20 20 20 20 20 20 20  | #&0D..L.       |
00000720  20 20 20 42 4e 45 20 65  78 69 74 0d 04 56 18 20  |   BNE exit..V. |
00000730  20 20 20 20 20 20 20 20  20 4a 53 52 20 6f 73 6e  |         JSR osn|
00000740  65 77 6c 0d 04 60 1e 20  20 20 20 20 20 20 20 20  |ewl..`.         |
00000750  20 4a 53 52 20 69 64 65  6e 74 2b 6f 66 66 73 65  | JSR ident+offse|
00000760  74 0d 04 6a 16 20 20 20  20 20 20 20 20 20 20 42  |t..j.          B|
00000770  4e 45 20 65 78 69 74 0d  04 74 05 20 0d 04 7e 0b  |NE exit..t. ..~.|
00000780  20 2e 6e 6f 74 75 73 0d  04 88 11 20 20 20 20 20  | .notus....     |
00000790  20 20 20 20 20 50 4c 41  0d 04 92 11 20 20 20 20  |     PLA....    |
000007a0  20 20 20 20 20 20 54 41  59 0d 04 9c 05 20 0d 04  |      TAY.... ..|
000007b0  a6 0a 20 2e 65 78 69 74  0d 04 b0 11 20 20 20 20  |.. .exit....    |
000007c0  20 20 20 20 20 20 50 4c  41 0d 04 ba 18 20 20 20  |      PLA....   |
000007d0  20 20 20 20 20 20 20 4c  44 58 20 72 6f 6d 5f 4e  |       LDX rom_N|
000007e0  6f 0d 04 c4 11 20 20 20  20 20 20 20 20 20 20 50  |o....          P|
000007f0  4c 50 0d 04 ce 11 20 20  20 20 20 20 20 20 20 20  |LP....          |
00000800  52 54 53 0d 04 d8 05 20  0d 04 e2 0a 20 2e 74 65  |RTS.... .... .te|
00000810  73 74 0d 04 ec 11 20 20  20 20 20 20 20 20 20 20  |st....          |
00000820  54 59 41 0d 04 f6 11 20  20 20 20 20 20 20 20 20  |TYA....         |
00000830  20 50 48 41 0d 05 00 16  20 20 20 20 20 20 20 20  | PHA....        |
00000840  20 20 4c 44 58 20 23 26  30 30 0d 05 0a 05 20 0d  |  LDX #&00.... .|
00000850  05 14 0a 20 2e 6c 6f 6f  70 0d 05 1e 1a 20 20 20  |... .loop....   |
00000860  20 20 20 20 20 20 20 4c  44 41 20 28 6c 69 6e 65  |       LDA (line|
00000870  29 2c 59 0d 05 28 17 20  20 20 20 20 20 20 20 20  |),Y..(.         |
00000880  20 43 4d 50 20 23 97 22  2e 22 0d 05 32 16 20 20  | CMP #."."..2.  |
00000890  20 20 20 20 20 20 20 20  42 4e 45 20 63 6f 6e 74  |        BNE cont|
000008a0  0d 05 3c 16 20 20 20 20  20 20 20 20 20 20 43 50  |..<.          CP|
000008b0  58 20 23 26 30 32 0d 05  46 15 20 20 20 20 20 20  |X #&02..F.      |
000008c0  20 20 20 20 42 43 53 20  79 65 73 0d 05 50 05 20  |    BCS yes..P. |
000008d0  0d 05 5a 0a 20 2e 63 6f  6e 74 0d 05 64 14 20 20  |..Z. .cont..d.  |
000008e0  20 20 20 20 20 20 20 20  80 20 23 26 35 46 0d 05  |        . #&5F..|
000008f0  6e 20 20 20 20 20 20 20  20 20 20 20 43 4d 50 20  |n           CMP |
00000900  74 69 74 6c 65 2b 6f 66  66 73 65 74 2c 58 0d 05  |title+offset,X..|
00000910  78 17 20 20 20 20 20 20  20 20 20 20 42 4e 45 20  |x.          BNE |
00000920  6e 6f 74 75 73 0d 05 82  11 20 20 20 20 20 20 20  |notus....       |
00000930  20 20 20 49 4e 59 0d 05  8c 11 20 20 20 20 20 20  |   INY....      |
00000940  20 20 20 20 49 4e 58 0d  05 96 20 20 20 20 20 20  |    INX...      |
00000950  20 20 20 20 20 4c 44 41  20 74 69 74 6c 65 2b 6f  |     LDA title+o|
00000960  66 66 73 65 74 2c 58 0d  05 a0 14 20 20 20 20 20  |ffset,X....     |
00000970  20 20 20 20 20 80 20 23  26 35 46 0d 05 aa 16 20  |     . #&5F.... |
00000980  20 20 20 20 20 20 20 20  20 42 4e 45 20 6c 6f 6f  |         BNE loo|
00000990  70 0d 05 b4 05 20 0d 05  be 09 20 2e 79 65 73 0d  |p.... .... .yes.|
000009a0  05 c8 16 20 20 20 20 20  20 20 20 20 20 4c 44 41  |...          LDA|
000009b0  20 23 26 43 38 0d 05 d2  16 20 20 20 20 20 20 20  | #&C8....       |
000009c0  20 20 20 4c 44 58 20 23  26 30 33 0d 05 dc 18 20  |   LDX #&03.... |
000009d0  20 20 20 20 20 20 20 20  20 4a 53 52 20 6f 73 62  |         JSR osb|
000009e0  79 74 65 0d 05 e6 16 20  20 20 20 20 20 20 20 20  |yte....         |
000009f0  20 4c 44 41 20 23 65 6f  72 0d 05 f0 15 20 20 20  | LDA #eor....   |
00000a00  20 20 20 20 20 20 20 53  54 41 20 26 37 34 0d 05  |       STA &74..|
00000a10  fa 26 20 20 20 20 20 20  20 20 20 20 4c 44 41 20  |.&          LDA |
00000a20  23 28 70 72 6f 67 2b 6f  66 66 73 65 74 29 20 83  |#(prog+offset) .|
00000a30  20 32 35 36 0d 06 04 15  20 20 20 20 20 20 20 20  | 256....        |
00000a40  20 20 53 54 41 20 26 37  30 0d 06 0e 26 20 20 20  |  STA &70...&   |
00000a50  20 20 20 20 20 20 20 4c  44 41 20 23 28 70 72 6f  |       LDA #(pro|
00000a60  67 2b 6f 66 66 73 65 74  29 20 81 20 32 35 36 0d  |g+offset) . 256.|
00000a70  06 18 15 20 20 20 20 20  20 20 20 20 20 53 54 41  |...          STA|
00000a80  20 26 37 31 0d 06 22 1d  20 20 20 20 20 20 20 20  | &71..".        |
00000a90  20 20 4c 44 41 20 23 6c  6f 61 64 20 83 20 32 35  |  LDA #load . 25|
00000aa0  36 0d 06 2c 15 20 20 20  20 20 20 20 20 20 20 53  |6..,.          S|
00000ab0  54 41 20 26 37 32 0d 06  36 1d 20 20 20 20 20 20  |TA &72..6.      |
00000ac0  20 20 20 20 4c 44 41 20  23 6c 6f 61 64 20 81 20  |    LDA #load . |
00000ad0  32 35 36 0d 06 40 15 20  20 20 20 20 20 20 20 20  |256..@.         |
00000ae0  20 53 54 41 20 26 37 33  0d 06 4a 16 20 20 20 20  | STA &73..J.    |
00000af0  20 20 20 20 20 20 4c 44  59 20 23 26 30 30 0d 06  |      LDY #&00..|
00000b00  54 25 20 20 20 20 20 20  20 20 20 20 4c 44 58 20  |T%          LDX |
00000b10  23 28 74 6f 70 2d 70 72  6f 67 29 20 81 20 32 35  |#(top-prog) . 25|
00000b20  36 2b 31 0d 06 5e 05 20  0d 06 68 0a 20 2e 64 6f  |6+1..^. ..h. .do|
00000b30  77 6e 0d 06 72 19 20 20  20 20 20 20 20 20 20 20  |wn..r.          |
00000b40  4c 44 41 20 28 26 37 30  29 2c 59 0d 06 7c 13 20  |LDA (&70),Y..|. |
00000b50  20 20 20 20 20 20 20 20  20 82 20 26 37 34 0d 06  |         . &74..|
00000b60  86 15 20 20 20 20 20 20  20 20 20 20 49 4e 43 20  |..          INC |
00000b70  26 37 34 0d 06 90 19 20  20 20 20 20 20 20 20 20  |&74....         |
00000b80  20 53 54 41 20 28 26 37  32 29 2c 59 0d 06 9a 11  | STA (&72),Y....|
00000b90  20 20 20 20 20 20 20 20  20 20 49 4e 59 0d 06 a4  |          INY...|
00000ba0  16 20 20 20 20 20 20 20  20 20 20 42 4e 45 20 64  |.          BNE d|
00000bb0  6f 77 6e 0d 06 ae 15 20  20 20 20 20 20 20 20 20  |own....         |
00000bc0  20 49 4e 43 20 26 37 31  0d 06 b8 15 20 20 20 20  | INC &71....    |
00000bd0  20 20 20 20 20 20 49 4e  43 20 26 37 33 0d 06 c2  |      INC &73...|
00000be0  11 20 20 20 20 20 20 20  20 20 20 44 45 58 0d 06  |.          DEX..|
00000bf0  cc 16 20 20 20 20 20 20  20 20 20 20 42 4e 45 20  |..          BNE |
00000c00  64 6f 77 6e 0d 06 d6 05  20 0d 06 e0 16 20 20 20  |down.... ....   |
00000c10  20 20 20 20 20 20 20 4a  53 52 20 65 78 65 63 0d  |       JSR exec.|
00000c20  06 ea 11 20 20 20 20 20  20 20 20 20 20 50 4c 41  |...          PLA|
00000c30  0d 06 f4 11 20 20 20 20  20 20 20 20 20 20 54 41  |....          TA|
00000c40  59 0d 06 fe 11 20 20 20  20 20 20 20 20 20 20 50  |Y....          P|
00000c50  4c 41 0d 07 08 16 20 20  20 20 20 20 20 20 20 20  |LA....          |
00000c60  4c 44 41 20 23 26 30 30  0d 07 12 18 20 20 20 20  |LDA #&00....    |
00000c70  20 20 20 20 20 20 4c 44  58 20 72 6f 6d 5f 4e 6f  |      LDX rom_No|
00000c80  0d 07 1c 11 20 20 20 20  20 20 20 20 20 20 50 4c  |....          PL|
00000c90  50 0d 07 26 11 20 20 20  20 20 20 20 20 20 20 52  |P..&.          R|
00000ca0  54 53 0d 07 30 05 20 0d  07 da 0a 20 2e 70 72 6f  |TS..0. .... .pro|
00000cb0  67 0d 07 e4 05 20 0d 07  ee 06 20 5d 0d 07 f8 11  |g.... .... ]....|
00000cc0  20 e7 20 49 25 3d 30 20  f2 6c 6f 61 64 0d 08 02  | . I%=0 .load...|
00000cd0  06 20 ed 0d 08 0c 05 20  0d 08 16 44 20 24 62 6c  |. ..... ...D $bl|
00000ce0  6f 63 6b 3d 22 53 41 56  45 20 22 2b 64 65 73 74  |ock="SAVE "+dest|
00000cf0  24 2b 22 20 22 2b c3 7e  73 74 61 72 74 2b 22 20  |$+" "+.~start+" |
00000d00  22 2b c3 7e 28 73 74 61  72 74 2b 65 6e 64 29 2b  |"+.~(start+end)+|
00000d10  22 20 38 30 30 30 20 38  30 30 30 22 0d 08 20 0c  |" 8000 8000".. .|
00000d20  20 d6 20 6f 73 63 6c 69  0d 08 2a 05 20 0d 08 34  | . oscli..*. ..4|
00000d30  25 20 f1 27 20 22 45 70  72 6f 6d 20 73 69 7a 65  |% .' "Eprom size|
00000d40  20 22 3b 65 6e 64 20 81  20 26 34 30 30 20 22 6b  | ";end . &400 "k|
00000d50  22 21 0d 08 3e 05 20 0d  08 48 0b 20 dd f2 6c 6f  |"!..>. ..H. ..lo|
00000d60  61 64 0d 08 70 06 20 f5  0d 08 7a 11 20 4e 25 3d  |ad..p. ...z. N%=|
00000d70  9a 23 53 25 20 82 20 45  25 0d 08 84 14 20 45 25  |.#S% . E%.... E%|
00000d80  3d 28 45 25 2b 31 29 20  80 20 26 46 46 0d 08 8e  |=(E%+1) . &FF...|
00000d90  0b 20 3f 50 25 3d 4e 25  0d 08 98 0c 20 50 25 3d  |. ?P%=N%.... P%=|
00000da0  50 25 2b 31 0d 08 a2 1c  20 fd 20 50 25 3e 73 74  |P%+1.... . P%>st|
00000db0  61 72 74 2b 26 34 30 30  30 20 84 20 c5 23 53 25  |art+&4000 . .#S%|
00000dc0  0d 08 ac 24 20 e7 20 ac  20 c5 23 53 25 20 f1 27  |...$ . . .#S% .'|
00000dd0  20 22 50 72 6f 67 72 61  6d 20 74 6f 6f 20 6c 6f  | "Program too lo|
00000de0  6e 67 22 21 0d 08 b6 0b  20 74 6f 70 3d 50 25 0d  |ng"!.... top=P%.|
00000df0  08 c0 0a 20 d9 20 23 53  25 0d 08 ca 2b 20 e7 20  |... . #S%...+ . |
00000e00  50 25 3c 73 74 61 72 74  2b 26 32 30 30 31 20 65  |P%<start+&2001 e|
00000e10  6e 64 3d 26 32 30 30 30  20 8b 20 65 6e 64 3d 26  |nd=&2000 . end=&|
00000e20  34 30 30 30 0d 08 d4 06  20 e1 0d 08 de 05 20 0d  |4000.... ..... .|
00000e30  08 e8 0c 20 dd f2 65 72  72 6f 72 0d 08 f2 09 20  |... ..error.... |
00000e40  d9 20 23 30 0d 08 fc 0e  20 e7 20 9f 3c 3e 32 36  |. #0.... . .<>26|
00000e50  20 f6 0d 09 06 17 20 f1  20 22 20 2d 20 50 72 65  | ..... . " - Pre|
00000e60  73 73 20 61 20 6b 65 79  22 0d 09 10 08 20 e7 20  |ss a key".... . |
00000e70  a5 0d 09 1a 06 20 e1 0d  09 24 05 20 0d 09 2e 0c  |..... ...$. ....|
00000e80  20 dd f2 63 6c 65 61 72  0d 09 38 10 20 de 20 62  | ..clear..8. . b|
00000e90  6c 6f 63 6b 20 26 34 30  0d 09 42 0f 20 21 26 37  |lock &40..B. !&7|
00000ea0  30 3d 26 33 38 30 30 0d  09 4c 19 20 41 25 3d 26  |0=&3800..L. A%=&|
00000eb0  46 46 3a 58 25 3d 26 34  30 3a 59 25 3d 26 30 30  |FF:X%=&40:Y%=&00|
00000ec0  0d 09 56 0d 20 50 25 3d  62 6c 6f 63 6b 0d 09 60  |..V. P%=block..`|
00000ed0  0a 20 5b 4f 50 54 32 0d  09 6a 05 20 0d 09 74 0a  |. [OPT2..j. ..t.|
00000ee0  20 2e 6c 6f 6f 70 0d 09  7e 19 20 20 20 20 20 20  | .loop..~.      |
00000ef0  20 20 20 20 53 54 41 20  28 26 37 30 29 2c 59 0d  |    STA (&70),Y.|
00000f00  09 88 11 20 20 20 20 20  20 20 20 20 20 49 4e 59  |...          INY|
00000f10  0d 09 92 16 20 20 20 20  20 20 20 20 20 20 42 4e  |....          BN|
00000f20  45 20 6c 6f 6f 70 0d 09  9c 15 20 20 20 20 20 20  |E loop....      |
00000f30  20 20 20 20 49 4e 43 20  26 37 31 0d 09 a6 11 20  |    INC &71.... |
00000f40  20 20 20 20 20 20 20 20  20 44 45 58 0d 09 b0 16  |         DEX....|
00000f50  20 20 20 20 20 20 20 20  20 20 42 4e 45 20 6c 6f  |          BNE lo|
00000f60  6f 70 0d 09 ba 11 20 20  20 20 20 20 20 20 20 20  |op....          |
00000f70  52 54 53 0d 09 c4 05 20  0d 09 ce 06 20 5d 0d 09  |RTS.... .... ]..|
00000f80  d8 0c 20 d6 20 62 6c 6f  63 6b 0d 09 e2 06 20 e1  |.. . block.... .|
00000f90  0d 09 ec 05 20 0d 09 f6  16 20 dc 20 28 63 29 20  |.... .... . (c) |
00000fa0  54 65 72 72 79 20 42 6c  75 6e 74 0d 0a 00 25 20  |Terry Blunt...% |
00000fb0  dc 20 2c 2c 2c 22 20 20  20 20 20 20 20 20 20 20  |. ,,,"          |
00000fc0  20 20 20 45 50 52 4f 4d  20 48 45 41 44 45 52 22  |   EPROM HEADER"|
00000fd0  0d 0a 0a 30 20 dc 20 2c  2c 2c 22 20 20 54 68 69  |...0 . ,,,"  Thi|
00000fe0  73 20 70 72 6f 67 72 61  6d 20 61 64 64 73 20 61  |s program adds a|
00000ff0  20 68 65 61 64 65 72 20  72 6f 75 74 69 6e 65 22  | header routine"|
00001000  0d 0a 14 2d 20 dc 20 22  74 6f 20 61 6e 79 20 4d  |...- . "to any M|
00001010  2f 43 6f 64 65 20 70 72  6f 67 72 61 6d 2c 20 20  |/Code program,  |
00001020  67 65 6e 65 72 61 74 69  6e 67 20 61 22 0d 0a 1e  |generating a"...|
00001030  2b 20 dc 20 6e 65 77 20  66 69 6c 65 20 74 68 61  |+ . new file tha|
00001040  74 20 63 61 6e 20 62 65  20 70 72 6f 67 72 61 6d  |t can be program|
00001050  6d 65 64 20 69 6e 74 6f  0d 0a 28 2b 20 dc 20 61  |med into..(+ . a|
00001060  6e 20 38 4b 20 6f 72 20  31 36 4b 20 45 50 52 4f  |n 8K or 16K EPRO|
00001070  4d 2e 20 46 69 6c 65 20  73 69 7a 65 20 69 73 20  |M. File size is |
00001080  73 65 74 0d 0a 32 24 20  dc 20 61 75 74 6f 6d 61  |set..2$ . automa|
00001090  74 69 63 61 6c 6c 79 20  62 79 20 74 68 65 20 70  |tically by the p|
000010a0  72 6f 67 72 61 6d 2e 0d  0a 3c 2e 20 dc 20 2c 22  |rogram...<. . ,"|
000010b0  20 20 57 68 65 6e 20 63  61 6c 6c 65 64 20 62 79  |  When called by|
000010c0  20 74 68 65 20 52 4f 4d  20 74 69 74 6c 65 2c 20  | the ROM title, |
000010d0  20 74 68 65 22 0d 0a 46  2b 20 dc 20 45 50 52 4f  | the"..F+ . EPRO|
000010e0  4d 20 20 77 69 6c 6c 20  20 64 6f 77 6e 6c 6f 61  |M  will  downloa|
000010f0  64 20 74 68 65 20 70 72  6f 67 72 61 6d 20 74 6f  |d the program to|
00001100  0d 0a 50 2b 20 dc 20 75  73 65 72 20 52 41 4d 20  |..P+ . user RAM |
00001110  61 6e 64 20 6a 75 6d 70  20 74 6f 20 69 74 73 20  |and jump to its |
00001120  65 6e 74 72 79 20 70 6f  69 6e 74 0d 0a 5a 1a 20  |entry point..Z. |
00001130  dc 20 28 45 58 45 43 20  61 64 64 72 65 73 73 29  |. (EXEC address)|
00001140  2e 2c 22 20 22 0d ff                              |.," "..|
00001147
25-08-89/HeadM\C.m0
25-08-89/HeadM\C.m1
25-08-89/HeadM\C.m2
25-08-89/HeadM\C.m4
25-08-89/HeadM\C.m5