Home » CEEFAX disks » telesoftware14.adl » 05-03-89/Subtitl

05-03-89/Subtitl

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 » telesoftware14.adl
Filename: 05-03-89/Subtitl
Read OK:
File size: 075D bytes
Load address: FFFF1A00
Exec address: FFFF8023
File contents
   10REM> SUBTITL
   20A%=&EA :REM: read Tube presence flag
   30X%=0
   40Y%=&FF
   50IF ((USR(&FFF4)AND&FF00)DIV&100)<>0 END
   60zeropage=&70 :REM: 2 byte workspace
   70wordv=&20C :REM: osword indirection vector
   80mcode=&A00 :REM: machine code at &A00
   90oswrch=&FFEE
  100osword=&FFF1
  110FOR pass=0 TO 2 STEP 2
  120P%=mcode
  130[OPT pass
  140.firstbyte
  150LDX wordv \ osword vector low byte
  160LDY wordv+1 \ osword vector high byte
  170CPY #newcode DIV 256 \ is the vector already modified?
  180BEQ return \ return if already altered
  190STX oldvector \ save the original osword vector, low byte
  200STY oldvector+1 \ and high byte
  210LDX #newcode MOD 256 \ low byte of new code
  220LDY #newcode DIV 256 \ and high byte
  230STX wordv \ alter osword vector, low byte
  240STY wordv+1 \ and high byte
  250.return
  260RTS
  270.newcode
  280CMP #&7A \ all ATS osword calls use osword &7A
  290BNE jump \ branch if not from ATS
  300STX zeropage \ X and Y point to the parameter block
  310STY zeropage+1
  320LDY #&00 \ index to point to first parameter
  330LDA (zeropage),Y \ read first parameter
  340CMP #&A0 \ &A0 = unused function key
  350BNE exit
  360INY
  370LDA (zeropage),Y
  380CMP #&18 \ shift+f8, ATS unused function key
  390BEQ subtitle \ display subtitles
  400.exit
  410LDA #&7A \ restore accumulator
  420LDY zeropage+1 \ restore Y
  430.jump
  440JMP (oldvector) \ exit using the original osword vector
  450.subtitle
  460LDA #16
  470STA oswblock
  480JSR word
  490LDA #14
  500STA oswblock
  510JSR word
  520LDA #12
  530JSR oswrch
  540LDA #18
  550STA oswblock
  560LDA #0
  570STA oswblock+1
  580STA oswblock+2
  590LDA #&88
  600STA oswblock+3
  610.word
  620LDA #&7A
  630LDX #oswblock MOD 256
  640LDY #oswblock DIV 256
  650JMP osword
  660.oswblock
  670EQUD &00
  680EQUD &00
  690.oldvector
  700EQUW &00
  710.lastbyte
  720]
  730NEXT
  740INPUT"Filename for object code = "save$
  750IF save$ ="" CALL mcode:END
  760*OPT1,2
  770OSCLI("SAVE "+save$+" "+STR$~(&FFFF0000 OR firstbyte)+" "+STR$~(&FFFF0000 OR lastbyte))
  780*OPT0,0

�> SUBTITL
&A%=&EA :�: read Tube presence flag
X%=0
(
Y%=&FF
2"� ((�(&FFF4)�&FF00)�&100)<>0 �
<%zeropage=&70 :�: 2 byte workspace
F,wordv=&20C :�: osword indirection vector
P'mcode=&A00 :�: machine code at &A00
Zoswrch=&FFEE
dosword=&FFF1
n� pass=0 � 2 � 2
xP%=mcode
�
[OPT pass
�.firstbyte
�&LDX wordv \ osword vector low byte
�)LDY wordv+1 \ osword vector high byte
�8CPY #newcode � 256 \ is the vector already modified?
�*BEQ return \ return if already altered
�=STX oldvector \ save the original osword vector, low byte
�#STY oldvector+1 \ and high byte
�-LDX #newcode � 256 \ low byte of new code
�&LDY #newcode � 256 \ and high byte
�-STX wordv \ alter osword vector, low byte
�STY wordv+1 \ and high byte
�.return
RTS
.newcode
2CMP #&7A \ all ATS osword calls use osword &7A
"%BNE jump \ branch if not from ATS
,7STX zeropage \ X and Y point to the parameter block
6STY zeropage+1
@0LDY #&00 \ index to point to first parameter
J+LDA (zeropage),Y \ read first parameter
T(CMP #&A0 \ &A0 = unused function key
^BNE exit
hINY
rLDA (zeropage),Y
|0CMP #&18 \ shift+f8, ATS unused function key
�$BEQ subtitle \ display subtitles
�	.exit
�"LDA #&7A \ restore accumulator
�LDY zeropage+1 \ restore Y
�	.jump
�;JMP (oldvector) \ exit using the original osword vector
�
.subtitle
�LDA #16
�STA oswblock
�JSR word
�LDA #14
�STA oswblock
�JSR word
LDA #12
JSR oswrch
LDA #18
&STA oswblock
0
LDA #0
:STA oswblock+1
DSTA oswblock+2
NLDA #&88
XSTA oswblock+3
b	.word
lLDA #&7A
vLDX #oswblock � 256
�LDY #oswblock � 256
�JMP osword
�
.oswblock
�EQUD &00
�EQUD &00
�.oldvector
�EQUW &00
�
.lastbyte
�]
��
�'�"Filename for object code = "save$
�� save$ ="" � mcode:�
�*OPT1,2
O�("SAVE "+save$+" "+�~(&FFFF0000 � firstbyte)+" "+�~(&FFFF0000 � lastbyte))
*OPT0,0
�
00000000  0d 00 0a 0e f4 3e 20 53  55 42 54 49 54 4c 0d 00  |.....> SUBTITL..|
00000010  14 26 41 25 3d 26 45 41  20 3a f4 3a 20 72 65 61  |.&A%=&EA :.: rea|
00000020  64 20 54 75 62 65 20 70  72 65 73 65 6e 63 65 20  |d Tube presence |
00000030  66 6c 61 67 0d 00 1e 08  58 25 3d 30 0d 00 28 0a  |flag....X%=0..(.|
00000040  59 25 3d 26 46 46 0d 00  32 22 e7 20 28 28 ba 28  |Y%=&FF..2". ((.(|
00000050  26 46 46 46 34 29 80 26  46 46 30 30 29 81 26 31  |&FFF4).&FF00).&1|
00000060  30 30 29 3c 3e 30 20 e0  0d 00 3c 25 7a 65 72 6f  |00)<>0 ...<%zero|
00000070  70 61 67 65 3d 26 37 30  20 3a f4 3a 20 32 20 62  |page=&70 :.: 2 b|
00000080  79 74 65 20 77 6f 72 6b  73 70 61 63 65 0d 00 46  |yte workspace..F|
00000090  2c 77 6f 72 64 76 3d 26  32 30 43 20 3a f4 3a 20  |,wordv=&20C :.: |
000000a0  6f 73 77 6f 72 64 20 69  6e 64 69 72 65 63 74 69  |osword indirecti|
000000b0  6f 6e 20 76 65 63 74 6f  72 0d 00 50 27 6d 63 6f  |on vector..P'mco|
000000c0  64 65 3d 26 41 30 30 20  3a f4 3a 20 6d 61 63 68  |de=&A00 :.: mach|
000000d0  69 6e 65 20 63 6f 64 65  20 61 74 20 26 41 30 30  |ine code at &A00|
000000e0  0d 00 5a 10 6f 73 77 72  63 68 3d 26 46 46 45 45  |..Z.oswrch=&FFEE|
000000f0  0d 00 64 10 6f 73 77 6f  72 64 3d 26 46 46 46 31  |..d.osword=&FFF1|
00000100  0d 00 6e 14 e3 20 70 61  73 73 3d 30 20 b8 20 32  |..n.. pass=0 . 2|
00000110  20 88 20 32 0d 00 78 0c  50 25 3d 6d 63 6f 64 65  | . 2..x.P%=mcode|
00000120  0d 00 82 0d 5b 4f 50 54  20 70 61 73 73 0d 00 8c  |....[OPT pass...|
00000130  0e 2e 66 69 72 73 74 62  79 74 65 0d 00 96 26 4c  |..firstbyte...&L|
00000140  44 58 20 77 6f 72 64 76  20 5c 20 6f 73 77 6f 72  |DX wordv \ oswor|
00000150  64 20 76 65 63 74 6f 72  20 6c 6f 77 20 62 79 74  |d vector low byt|
00000160  65 0d 00 a0 29 4c 44 59  20 77 6f 72 64 76 2b 31  |e...)LDY wordv+1|
00000170  20 5c 20 6f 73 77 6f 72  64 20 76 65 63 74 6f 72  | \ osword vector|
00000180  20 68 69 67 68 20 62 79  74 65 0d 00 aa 38 43 50  | high byte...8CP|
00000190  59 20 23 6e 65 77 63 6f  64 65 20 81 20 32 35 36  |Y #newcode . 256|
000001a0  20 5c 20 69 73 20 74 68  65 20 76 65 63 74 6f 72  | \ is the vector|
000001b0  20 61 6c 72 65 61 64 79  20 6d 6f 64 69 66 69 65  | already modifie|
000001c0  64 3f 0d 00 b4 2a 42 45  51 20 72 65 74 75 72 6e  |d?...*BEQ return|
000001d0  20 5c 20 72 65 74 75 72  6e 20 69 66 20 61 6c 72  | \ return if alr|
000001e0  65 61 64 79 20 61 6c 74  65 72 65 64 0d 00 be 3d  |eady altered...=|
000001f0  53 54 58 20 6f 6c 64 76  65 63 74 6f 72 20 5c 20  |STX oldvector \ |
00000200  73 61 76 65 20 74 68 65  20 6f 72 69 67 69 6e 61  |save the origina|
00000210  6c 20 6f 73 77 6f 72 64  20 76 65 63 74 6f 72 2c  |l osword vector,|
00000220  20 6c 6f 77 20 62 79 74  65 0d 00 c8 23 53 54 59  | low byte...#STY|
00000230  20 6f 6c 64 76 65 63 74  6f 72 2b 31 20 5c 20 61  | oldvector+1 \ a|
00000240  6e 64 20 68 69 67 68 20  62 79 74 65 0d 00 d2 2d  |nd high byte...-|
00000250  4c 44 58 20 23 6e 65 77  63 6f 64 65 20 83 20 32  |LDX #newcode . 2|
00000260  35 36 20 5c 20 6c 6f 77  20 62 79 74 65 20 6f 66  |56 \ low byte of|
00000270  20 6e 65 77 20 63 6f 64  65 0d 00 dc 26 4c 44 59  | new code...&LDY|
00000280  20 23 6e 65 77 63 6f 64  65 20 81 20 32 35 36 20  | #newcode . 256 |
00000290  5c 20 61 6e 64 20 68 69  67 68 20 62 79 74 65 0d  |\ and high byte.|
000002a0  00 e6 2d 53 54 58 20 77  6f 72 64 76 20 5c 20 61  |..-STX wordv \ a|
000002b0  6c 74 65 72 20 6f 73 77  6f 72 64 20 76 65 63 74  |lter osword vect|
000002c0  6f 72 2c 20 6c 6f 77 20  62 79 74 65 0d 00 f0 1f  |or, low byte....|
000002d0  53 54 59 20 77 6f 72 64  76 2b 31 20 5c 20 61 6e  |STY wordv+1 \ an|
000002e0  64 20 68 69 67 68 20 62  79 74 65 0d 00 fa 0b 2e  |d high byte.....|
000002f0  72 65 74 75 72 6e 0d 01  04 07 52 54 53 0d 01 0e  |return....RTS...|
00000300  0c 2e 6e 65 77 63 6f 64  65 0d 01 18 32 43 4d 50  |..newcode...2CMP|
00000310  20 23 26 37 41 20 5c 20  61 6c 6c 20 41 54 53 20  | #&7A \ all ATS |
00000320  6f 73 77 6f 72 64 20 63  61 6c 6c 73 20 75 73 65  |osword calls use|
00000330  20 6f 73 77 6f 72 64 20  26 37 41 0d 01 22 25 42  | osword &7A.."%B|
00000340  4e 45 20 6a 75 6d 70 20  5c 20 62 72 61 6e 63 68  |NE jump \ branch|
00000350  20 69 66 20 6e 6f 74 20  66 72 6f 6d 20 41 54 53  | if not from ATS|
00000360  0d 01 2c 37 53 54 58 20  7a 65 72 6f 70 61 67 65  |..,7STX zeropage|
00000370  20 5c 20 58 20 61 6e 64  20 59 20 70 6f 69 6e 74  | \ X and Y point|
00000380  20 74 6f 20 74 68 65 20  70 61 72 61 6d 65 74 65  | to the paramete|
00000390  72 20 62 6c 6f 63 6b 0d  01 36 12 53 54 59 20 7a  |r block..6.STY z|
000003a0  65 72 6f 70 61 67 65 2b  31 0d 01 40 30 4c 44 59  |eropage+1..@0LDY|
000003b0  20 23 26 30 30 20 5c 20  69 6e 64 65 78 20 74 6f  | #&00 \ index to|
000003c0  20 70 6f 69 6e 74 20 74  6f 20 66 69 72 73 74 20  | point to first |
000003d0  70 61 72 61 6d 65 74 65  72 0d 01 4a 2b 4c 44 41  |parameter..J+LDA|
000003e0  20 28 7a 65 72 6f 70 61  67 65 29 2c 59 20 5c 20  | (zeropage),Y \ |
000003f0  72 65 61 64 20 66 69 72  73 74 20 70 61 72 61 6d  |read first param|
00000400  65 74 65 72 0d 01 54 28  43 4d 50 20 23 26 41 30  |eter..T(CMP #&A0|
00000410  20 5c 20 26 41 30 20 3d  20 75 6e 75 73 65 64 20  | \ &A0 = unused |
00000420  66 75 6e 63 74 69 6f 6e  20 6b 65 79 0d 01 5e 0c  |function key..^.|
00000430  42 4e 45 20 65 78 69 74  0d 01 68 07 49 4e 59 0d  |BNE exit..h.INY.|
00000440  01 72 14 4c 44 41 20 28  7a 65 72 6f 70 61 67 65  |.r.LDA (zeropage|
00000450  29 2c 59 0d 01 7c 30 43  4d 50 20 23 26 31 38 20  |),Y..|0CMP #&18 |
00000460  5c 20 73 68 69 66 74 2b  66 38 2c 20 41 54 53 20  |\ shift+f8, ATS |
00000470  75 6e 75 73 65 64 20 66  75 6e 63 74 69 6f 6e 20  |unused function |
00000480  6b 65 79 0d 01 86 24 42  45 51 20 73 75 62 74 69  |key...$BEQ subti|
00000490  74 6c 65 20 5c 20 64 69  73 70 6c 61 79 20 73 75  |tle \ display su|
000004a0  62 74 69 74 6c 65 73 0d  01 90 09 2e 65 78 69 74  |btitles.....exit|
000004b0  0d 01 9a 22 4c 44 41 20  23 26 37 41 20 5c 20 72  |..."LDA #&7A \ r|
000004c0  65 73 74 6f 72 65 20 61  63 63 75 6d 75 6c 61 74  |estore accumulat|
000004d0  6f 72 0d 01 a4 1e 4c 44  59 20 7a 65 72 6f 70 61  |or....LDY zeropa|
000004e0  67 65 2b 31 20 5c 20 72  65 73 74 6f 72 65 20 59  |ge+1 \ restore Y|
000004f0  0d 01 ae 09 2e 6a 75 6d  70 0d 01 b8 3b 4a 4d 50  |.....jump...;JMP|
00000500  20 28 6f 6c 64 76 65 63  74 6f 72 29 20 5c 20 65  | (oldvector) \ e|
00000510  78 69 74 20 75 73 69 6e  67 20 74 68 65 20 6f 72  |xit using the or|
00000520  69 67 69 6e 61 6c 20 6f  73 77 6f 72 64 20 76 65  |iginal osword ve|
00000530  63 74 6f 72 0d 01 c2 0d  2e 73 75 62 74 69 74 6c  |ctor.....subtitl|
00000540  65 0d 01 cc 0b 4c 44 41  20 23 31 36 0d 01 d6 10  |e....LDA #16....|
00000550  53 54 41 20 6f 73 77 62  6c 6f 63 6b 0d 01 e0 0c  |STA oswblock....|
00000560  4a 53 52 20 77 6f 72 64  0d 01 ea 0b 4c 44 41 20  |JSR word....LDA |
00000570  23 31 34 0d 01 f4 10 53  54 41 20 6f 73 77 62 6c  |#14....STA oswbl|
00000580  6f 63 6b 0d 01 fe 0c 4a  53 52 20 77 6f 72 64 0d  |ock....JSR word.|
00000590  02 08 0b 4c 44 41 20 23  31 32 0d 02 12 0e 4a 53  |...LDA #12....JS|
000005a0  52 20 6f 73 77 72 63 68  0d 02 1c 0b 4c 44 41 20  |R oswrch....LDA |
000005b0  23 31 38 0d 02 26 10 53  54 41 20 6f 73 77 62 6c  |#18..&.STA oswbl|
000005c0  6f 63 6b 0d 02 30 0a 4c  44 41 20 23 30 0d 02 3a  |ock..0.LDA #0..:|
000005d0  12 53 54 41 20 6f 73 77  62 6c 6f 63 6b 2b 31 0d  |.STA oswblock+1.|
000005e0  02 44 12 53 54 41 20 6f  73 77 62 6c 6f 63 6b 2b  |.D.STA oswblock+|
000005f0  32 0d 02 4e 0c 4c 44 41  20 23 26 38 38 0d 02 58  |2..N.LDA #&88..X|
00000600  12 53 54 41 20 6f 73 77  62 6c 6f 63 6b 2b 33 0d  |.STA oswblock+3.|
00000610  02 62 09 2e 77 6f 72 64  0d 02 6c 0c 4c 44 41 20  |.b..word..l.LDA |
00000620  23 26 37 41 0d 02 76 17  4c 44 58 20 23 6f 73 77  |#&7A..v.LDX #osw|
00000630  62 6c 6f 63 6b 20 83 20  32 35 36 0d 02 80 17 4c  |block . 256....L|
00000640  44 59 20 23 6f 73 77 62  6c 6f 63 6b 20 81 20 32  |DY #oswblock . 2|
00000650  35 36 0d 02 8a 0e 4a 4d  50 20 6f 73 77 6f 72 64  |56....JMP osword|
00000660  0d 02 94 0d 2e 6f 73 77  62 6c 6f 63 6b 0d 02 9e  |.....oswblock...|
00000670  0c 45 51 55 44 20 26 30  30 0d 02 a8 0c 45 51 55  |.EQUD &00....EQU|
00000680  44 20 26 30 30 0d 02 b2  0e 2e 6f 6c 64 76 65 63  |D &00.....oldvec|
00000690  74 6f 72 0d 02 bc 0c 45  51 55 57 20 26 30 30 0d  |tor....EQUW &00.|
000006a0  02 c6 0d 2e 6c 61 73 74  62 79 74 65 0d 02 d0 05  |....lastbyte....|
000006b0  5d 0d 02 da 05 ed 0d 02  e4 27 e8 22 46 69 6c 65  |]........'."File|
000006c0  6e 61 6d 65 20 66 6f 72  20 6f 62 6a 65 63 74 20  |name for object |
000006d0  63 6f 64 65 20 3d 20 22  73 61 76 65 24 0d 02 ee  |code = "save$...|
000006e0  19 e7 20 73 61 76 65 24  20 3d 22 22 20 d6 20 6d  |.. save$ ="" . m|
000006f0  63 6f 64 65 3a e0 0d 02  f8 0b 2a 4f 50 54 31 2c  |code:.....*OPT1,|
00000700  32 0d 03 02 4f ff 28 22  53 41 56 45 20 22 2b 73  |2...O.("SAVE "+s|
00000710  61 76 65 24 2b 22 20 22  2b c3 7e 28 26 46 46 46  |ave$+" "+.~(&FFF|
00000720  46 30 30 30 30 20 84 20  66 69 72 73 74 62 79 74  |F0000 . firstbyt|
00000730  65 29 2b 22 20 22 2b c3  7e 28 26 46 46 46 46 30  |e)+" "+.~(&FFFF0|
00000740  30 30 30 20 84 20 6c 61  73 74 62 79 74 65 29 29  |000 . lastbyte))|
00000750  0d 03 0c 0b 2a 4f 50 54  30 2c 30 0d ff           |....*OPT0,0..|
0000075d
05-03-89/Subtitl.m0
05-03-89/Subtitl.m1
05-03-89/Subtitl.m2
05-03-89/Subtitl.m4
05-03-89/Subtitl.m5