Home » CEEFAX disks » telesoftware9.adl » 18-09-88/DECODE
18-09-88/DECODE
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 » telesoftware9.adl |
Filename: | 18-09-88/DECODE |
Read OK: | ✔ |
File size: | 06A0 bytes |
Load address: | 0800 |
Exec address: | 8023 |
File contents
10REM: DECODE 20page=PAGE 30DIM mcode &100 40osasci=&FFE3 50osword=&FFF1 60osbyte=&FFF4 70FORpass=4 TO 6 STEP 2 80O%=mcode 90P%=page 100[OPT pass 110.firstbyte 120EQUW &FF0D \ OF the BASIC program 130.start 140\ LDA #&C8 \ write Break effect 150\ LDX #&02 \ clear memory on Break 160\ LDY #&00 170\ JSR osbyte 180\ LDA #&4C \ JMP opcode 190\ LDX #&87 \ JMP &287 gives an 200\ LDY #&02 \ endless loop on Break 210\ STA &287 220\ STX &288 230\ STY &289 240LDA #&7F 250LDX #block MOD 256 260LDY #block DIV 256 270JSR osword \ read deleted data 280LDA result \ load result byte 290AND #&1E \ isolate error code 300BNE error 310LDA #&FF \ initialise offset 320PHA \ save offset 330.pull 340PLA 350TAX 360INX \ increment offset 370TXA 380PHA \ store current offset 390LDY keyboard,X \ load byte for keyboard buffer 400BEQ continue \ branch if finished 410LDX #0 420LDA #&8A 430JSR osbyte \ put byte into keyboard buffer 440JMP pull 450.continue 460LDA #&15 470JSR osasci \ disable VDU 480LDA #&BB 490LDX #0 500LDY #&FF 510JSR osbyte \ find BASIC 520LDA #&8E 530JMP osbyte \ select BASIC no return 540.error 550BRK 560BRK 570EQUS "Disc read error" 580BRK 590.keyboard 600EQUS "CALL &"+STR$~(page+&102) 610EQUB &06 \ enable VDU 620EQUB &0D 630BRK 640.block 650EQUB &FF \ current drive 660EQUD page+&100 \ start at PAGE+&100 670EQUB &03 \ 3 parameters 680EQUB &57 \ read deleted multi-sector 690EQUB &01 \ logical track &01 700EQUB &00 \ start logical sector 0 710EQUB &42 \ 2 sectors of 512 bytes 720.result 730EQUB &00 \ result byte 740.lastbyte 750] 760NEXT 770PRINT'"Press Space to save !BOOT file" 780REPEAT 790UNTIL GET=32 800*OPT1,2 810OSCLI("SAVE $.!BOOT "+STR$~(mcode)+"+"+STR$~(lastbyte-firstbyte)+" "+STR$~(start)+" "+STR$~(firstbyte)) 820*OPT1,0
�: DECODE page=� � mcode &100 (osasci=&FFE3 2osword=&FFF1 <osbyte=&FFF4 F�pass=4 � 6 � 2 PO%=mcode ZP%=page d [OPT pass n.firstbyte x$EQUW &FF0D \ � the BASIC program � .start �#\ LDA #&C8 \ write Break effect �&\ LDX #&02 \ clear memory on Break �\ LDY #&00 �\ JSR osbyte �\ LDA #&4C \ JMP opcode �"\ LDX #&87 \ JMP &287 gives an �&\ LDY #&02 \ endless loop on Break �\ STA &287 �\ STX &288 �\ STY &289 �LDA #&7F �LDX #block � 256 LDY #block � 256 "JSR osword \ read deleted data !LDA result \ load result byte "� #&1E \ isolate error code , BNE error 6 LDA #&FF \ initialise offset @PHA \ save offset J .pull TPLA ^TAX hINX \ increment offset rTXA |PHA \ store current offset �2LDY keyboard,X \ load byte for keyboard buffer �%BEQ continue \ branch if finished � LDX #0 �LDA #&8A �.JSR osbyte \ put byte into keyboard buffer �JMP pull � .continue �LDA #&15 �JSR osasci \ disable � �LDA #&BB � LDX #0 �LDY #&FF �JSR osbyte \ find BASIC LDA #&8E 'JMP osbyte \ select BASIC no return .error &BRK 0BRK :EQUS "Disc read error" DBRK N .keyboard XEQUS "CALL &"+�~(page+&102) bEQUB &06 \ enable � lEQUB &0D vBRK � .block �EQUB &FF \ current drive �$EQUD page+&100 \ start at �+&100 �EQUB &03 \ 3 parameters �(EQUB &57 \ read deleted multi-sector � EQUB &01 \ logical track &01 �%EQUB &00 \ start logical sector 0 �%EQUB &42 \ 2 sectors of 512 bytes �.result �EQUB &00 \ result byte � .lastbyte �] �� &�'"Press Space to save !BOOT file" � � �=32 *OPT1,2 *[�("SAVE $.!BOOT "+�~(mcode)+"+"+�~(lastbyte-firstbyte)+" "+�~(start)+" "+�~(firstbyte)) 4*OPT1,0 �
00000000 0d 00 0a 0d f4 3a 20 44 45 43 4f 44 45 0d 00 14 |.....: DECODE...| 00000010 0a 70 61 67 65 3d 90 0d 00 1e 10 de 20 6d 63 6f |.page=...... mco| 00000020 64 65 20 26 31 30 30 0d 00 28 10 6f 73 61 73 63 |de &100..(.osasc| 00000030 69 3d 26 46 46 45 33 0d 00 32 10 6f 73 77 6f 72 |i=&FFE3..2.oswor| 00000040 64 3d 26 46 46 46 31 0d 00 3c 10 6f 73 62 79 74 |d=&FFF1..<.osbyt| 00000050 65 3d 26 46 46 46 34 0d 00 46 13 e3 70 61 73 73 |e=&FFF4..F..pass| 00000060 3d 34 20 b8 20 36 20 88 20 32 0d 00 50 0c 4f 25 |=4 . 6 . 2..P.O%| 00000070 3d 6d 63 6f 64 65 0d 00 5a 0b 50 25 3d 70 61 67 |=mcode..Z.P%=pag| 00000080 65 0d 00 64 0d 5b 4f 50 54 20 70 61 73 73 0d 00 |e..d.[OPT pass..| 00000090 6e 0e 2e 66 69 72 73 74 62 79 74 65 0d 00 78 24 |n..firstbyte..x$| 000000a0 45 51 55 57 20 26 46 46 30 44 20 5c 20 ca 20 74 |EQUW &FF0D \ . t| 000000b0 68 65 20 42 41 53 49 43 20 70 72 6f 67 72 61 6d |he BASIC program| 000000c0 0d 00 82 0a 2e 73 74 61 72 74 0d 00 8c 23 5c 20 |.....start...#\ | 000000d0 4c 44 41 20 23 26 43 38 20 5c 20 77 72 69 74 65 |LDA #&C8 \ write| 000000e0 20 42 72 65 61 6b 20 65 66 66 65 63 74 0d 00 96 | Break effect...| 000000f0 26 5c 20 4c 44 58 20 23 26 30 32 20 5c 20 63 6c |&\ LDX #&02 \ cl| 00000100 65 61 72 20 6d 65 6d 6f 72 79 20 6f 6e 20 42 72 |ear memory on Br| 00000110 65 61 6b 0d 00 a0 0e 5c 20 4c 44 59 20 23 26 30 |eak....\ LDY #&0| 00000120 30 0d 00 aa 10 5c 20 4a 53 52 20 6f 73 62 79 74 |0....\ JSR osbyt| 00000130 65 0d 00 b4 1b 5c 20 4c 44 41 20 23 26 34 43 20 |e....\ LDA #&4C | 00000140 5c 20 4a 4d 50 20 6f 70 63 6f 64 65 0d 00 be 22 |\ JMP opcode..."| 00000150 5c 20 4c 44 58 20 23 26 38 37 20 5c 20 4a 4d 50 |\ LDX #&87 \ JMP| 00000160 20 26 32 38 37 20 67 69 76 65 73 20 61 6e 0d 00 | &287 gives an..| 00000170 c8 26 5c 20 4c 44 59 20 23 26 30 32 20 5c 20 65 |.&\ LDY #&02 \ e| 00000180 6e 64 6c 65 73 73 20 6c 6f 6f 70 20 6f 6e 20 42 |ndless loop on B| 00000190 72 65 61 6b 0d 00 d2 0e 5c 20 53 54 41 20 26 32 |reak....\ STA &2| 000001a0 38 37 0d 00 dc 0e 5c 20 53 54 58 20 26 32 38 38 |87....\ STX &288| 000001b0 0d 00 e6 0e 5c 20 53 54 59 20 26 32 38 39 0d 00 |....\ STY &289..| 000001c0 f0 0c 4c 44 41 20 23 26 37 46 0d 00 fa 14 4c 44 |..LDA #&7F....LD| 000001d0 58 20 23 62 6c 6f 63 6b 20 83 20 32 35 36 0d 01 |X #block . 256..| 000001e0 04 14 4c 44 59 20 23 62 6c 6f 63 6b 20 81 20 32 |..LDY #block . 2| 000001f0 35 36 0d 01 0e 22 4a 53 52 20 6f 73 77 6f 72 64 |56..."JSR osword| 00000200 20 5c 20 72 65 61 64 20 64 65 6c 65 74 65 64 20 | \ read deleted | 00000210 64 61 74 61 0d 01 18 21 4c 44 41 20 72 65 73 75 |data...!LDA resu| 00000220 6c 74 20 5c 20 6c 6f 61 64 20 72 65 73 75 6c 74 |lt \ load result| 00000230 20 62 79 74 65 0d 01 22 1f 80 20 23 26 31 45 20 | byte..".. #&1E | 00000240 5c 20 69 73 6f 6c 61 74 65 20 65 72 72 6f 72 20 |\ isolate error | 00000250 63 6f 64 65 0d 01 2c 0d 42 4e 45 20 65 72 72 6f |code..,.BNE erro| 00000260 72 0d 01 36 20 4c 44 41 20 23 26 46 46 20 5c 20 |r..6 LDA #&FF \ | 00000270 69 6e 69 74 69 61 6c 69 73 65 20 6f 66 66 73 65 |initialise offse| 00000280 74 0d 01 40 15 50 48 41 20 5c 20 73 61 76 65 20 |t..@.PHA \ save | 00000290 6f 66 66 73 65 74 0d 01 4a 09 2e 70 75 6c 6c 0d |offset..J..pull.| 000002a0 01 54 07 50 4c 41 0d 01 5e 07 54 41 58 0d 01 68 |.T.PLA..^.TAX..h| 000002b0 1a 49 4e 58 20 5c 20 69 6e 63 72 65 6d 65 6e 74 |.INX \ increment| 000002c0 20 6f 66 66 73 65 74 0d 01 72 07 54 58 41 0d 01 | offset..r.TXA..| 000002d0 7c 1e 50 48 41 20 5c 20 73 74 6f 72 65 20 63 75 ||.PHA \ store cu| 000002e0 72 72 65 6e 74 20 6f 66 66 73 65 74 0d 01 86 32 |rrent offset...2| 000002f0 4c 44 59 20 6b 65 79 62 6f 61 72 64 2c 58 20 5c |LDY keyboard,X \| 00000300 20 6c 6f 61 64 20 62 79 74 65 20 66 6f 72 20 6b | load byte for k| 00000310 65 79 62 6f 61 72 64 20 62 75 66 66 65 72 0d 01 |eyboard buffer..| 00000320 90 25 42 45 51 20 63 6f 6e 74 69 6e 75 65 20 5c |.%BEQ continue \| 00000330 20 62 72 61 6e 63 68 20 69 66 20 66 69 6e 69 73 | branch if finis| 00000340 68 65 64 0d 01 9a 0a 4c 44 58 20 23 30 0d 01 a4 |hed....LDX #0...| 00000350 0c 4c 44 41 20 23 26 38 41 0d 01 ae 2e 4a 53 52 |.LDA #&8A....JSR| 00000360 20 6f 73 62 79 74 65 20 5c 20 70 75 74 20 62 79 | osbyte \ put by| 00000370 74 65 20 69 6e 74 6f 20 6b 65 79 62 6f 61 72 64 |te into keyboard| 00000380 20 62 75 66 66 65 72 0d 01 b8 0c 4a 4d 50 20 70 | buffer....JMP p| 00000390 75 6c 6c 0d 01 c2 0d 2e 63 6f 6e 74 69 6e 75 65 |ull.....continue| 000003a0 0d 01 cc 0c 4c 44 41 20 23 26 31 35 0d 01 d6 1a |....LDA #&15....| 000003b0 4a 53 52 20 6f 73 61 73 63 69 20 5c 20 64 69 73 |JSR osasci \ dis| 000003c0 61 62 6c 65 20 ef 0d 01 e0 0c 4c 44 41 20 23 26 |able .....LDA #&| 000003d0 42 42 0d 01 ea 0a 4c 44 58 20 23 30 0d 01 f4 0c |BB....LDX #0....| 000003e0 4c 44 59 20 23 26 46 46 0d 01 fe 1b 4a 53 52 20 |LDY #&FF....JSR | 000003f0 6f 73 62 79 74 65 20 5c 20 66 69 6e 64 20 42 41 |osbyte \ find BA| 00000400 53 49 43 0d 02 08 0c 4c 44 41 20 23 26 38 45 0d |SIC....LDA #&8E.| 00000410 02 12 27 4a 4d 50 20 6f 73 62 79 74 65 20 5c 20 |..'JMP osbyte \ | 00000420 73 65 6c 65 63 74 20 42 41 53 49 43 20 6e 6f 20 |select BASIC no | 00000430 72 65 74 75 72 6e 0d 02 1c 0a 2e 65 72 72 6f 72 |return.....error| 00000440 0d 02 26 07 42 52 4b 0d 02 30 07 42 52 4b 0d 02 |..&.BRK..0.BRK..| 00000450 3a 1a 45 51 55 53 20 22 44 69 73 63 20 72 65 61 |:.EQUS "Disc rea| 00000460 64 20 65 72 72 6f 72 22 0d 02 44 07 42 52 4b 0d |d error"..D.BRK.| 00000470 02 4e 0d 2e 6b 65 79 62 6f 61 72 64 0d 02 58 1f |.N..keyboard..X.| 00000480 45 51 55 53 20 22 43 41 4c 4c 20 26 22 2b c3 7e |EQUS "CALL &"+.~| 00000490 28 70 61 67 65 2b 26 31 30 32 29 0d 02 62 17 45 |(page+&102)..b.E| 000004a0 51 55 42 20 26 30 36 20 5c 20 65 6e 61 62 6c 65 |QUB &06 \ enable| 000004b0 20 ef 0d 02 6c 0c 45 51 55 42 20 26 30 44 0d 02 | ...l.EQUB &0D..| 000004c0 76 07 42 52 4b 0d 02 80 0a 2e 62 6c 6f 63 6b 0d |v.BRK.....block.| 000004d0 02 8a 1c 45 51 55 42 20 26 46 46 20 5c 20 63 75 |...EQUB &FF \ cu| 000004e0 72 72 65 6e 74 20 64 72 69 76 65 0d 02 94 24 45 |rrent drive...$E| 000004f0 51 55 44 20 70 61 67 65 2b 26 31 30 30 20 5c 20 |QUD page+&100 \ | 00000500 73 74 61 72 74 20 61 74 20 90 2b 26 31 30 30 0d |start at .+&100.| 00000510 02 9e 1b 45 51 55 42 20 26 30 33 20 5c 20 33 20 |...EQUB &03 \ 3 | 00000520 70 61 72 61 6d 65 74 65 72 73 0d 02 a8 28 45 51 |parameters...(EQ| 00000530 55 42 20 26 35 37 20 5c 20 72 65 61 64 20 64 65 |UB &57 \ read de| 00000540 6c 65 74 65 64 20 6d 75 6c 74 69 2d 73 65 63 74 |leted multi-sect| 00000550 6f 72 0d 02 b2 20 45 51 55 42 20 26 30 31 20 5c |or... EQUB &01 \| 00000560 20 6c 6f 67 69 63 61 6c 20 74 72 61 63 6b 20 26 | logical track &| 00000570 30 31 0d 02 bc 25 45 51 55 42 20 26 30 30 20 5c |01...%EQUB &00 \| 00000580 20 73 74 61 72 74 20 6c 6f 67 69 63 61 6c 20 73 | start logical s| 00000590 65 63 74 6f 72 20 30 0d 02 c6 25 45 51 55 42 20 |ector 0...%EQUB | 000005a0 26 34 32 20 5c 20 32 20 73 65 63 74 6f 72 73 20 |&42 \ 2 sectors | 000005b0 6f 66 20 35 31 32 20 62 79 74 65 73 0d 02 d0 0b |of 512 bytes....| 000005c0 2e 72 65 73 75 6c 74 0d 02 da 1a 45 51 55 42 20 |.result....EQUB | 000005d0 26 30 30 20 5c 20 72 65 73 75 6c 74 20 62 79 74 |&00 \ result byt| 000005e0 65 0d 02 e4 0d 2e 6c 61 73 74 62 79 74 65 0d 02 |e.....lastbyte..| 000005f0 ee 05 5d 0d 02 f8 05 ed 0d 03 02 26 f1 27 22 50 |..]........&.'"P| 00000600 72 65 73 73 20 53 70 61 63 65 20 74 6f 20 73 61 |ress Space to sa| 00000610 76 65 20 21 42 4f 4f 54 20 66 69 6c 65 22 0d 03 |ve !BOOT file"..| 00000620 0c 05 f5 0d 03 16 0a fd 20 a5 3d 33 32 0d 03 20 |........ .=32.. | 00000630 0b 2a 4f 50 54 31 2c 32 0d 03 2a 5b ff 28 22 53 |.*OPT1,2..*[.("S| 00000640 41 56 45 20 24 2e 21 42 4f 4f 54 20 22 2b c3 7e |AVE $.!BOOT "+.~| 00000650 28 6d 63 6f 64 65 29 2b 22 2b 22 2b c3 7e 28 6c |(mcode)+"+"+.~(l| 00000660 61 73 74 62 79 74 65 2d 66 69 72 73 74 62 79 74 |astbyte-firstbyt| 00000670 65 29 2b 22 20 22 2b c3 7e 28 73 74 61 72 74 29 |e)+" "+.~(start)| 00000680 2b 22 20 22 2b c3 7e 28 66 69 72 73 74 62 79 74 |+" "+.~(firstbyt| 00000690 65 29 29 0d 03 34 0b 2a 4f 50 54 31 2c 30 0d ff |e))..4.*OPT1,0..| 000006a0