Home » CEEFAX disks » telesoftware9.adl » 18-09-88/ENCODE
18-09-88/ENCODE
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/ENCODE |
Read OK: | ✔ |
File size: | 049B bytes |
Load address: | 0800 |
Exec address: | 8023 |
File contents
10REM: ENCODE 20DIM mcode &100 25page=PAGE 30osrdch=&FFE0 40oswrch=&FFEE 50osword=&FFF1 60FORpass=4 TO 6 STEP 2 70O%=mcode 80P%=page 90[OPT pass 100.firstbyte 110EQUW &FF0D \ OF the BASIC program 120.start 130LDX #&00 140.loop 150LDA message,X 160BEQ end 170JSR oswrch 180INX 190BNE loop 200.end 210JSR osrdch 220BCC save 230BRK 240BRK 250EQUS "Escape" 260BRK 270.save 280LDA #&7F 290LDX #block MOD 256 300LDY #block DIV 256 310JSR osword \ write deleted data 320LDA result \ load result byte 330AND #&1E \ isolate error code 340BNE error 350BRK 360BRK 370EQUS "Write OK" 380.error 390BRK 400BRK 410EQUS "Write failed" 420BRK 430.block 440EQUB &FF \ current drive 450EQUD page+&100 \ start at PAGE+&100 460EQUB &03 \ 3 parameters 470EQUB &4F \ write deleted multi-sector 480EQUB &01 \ logical track &01 490EQUB &00 \ start logical sector &00 500EQUB &42 \ 2 sectors of 512 bytes 510.result 520EQUB &00 \ result byte 530.message 540EQUS "Press Space to save data on current disc" 550BRK 560.lastbyte 570] 580NEXT 590INPUT'"Save filename = "filename$ 600IF filename$ = "" THEN END 610*OPT1,2 620OSCLI("SAVE "+filename$+" "+STR$~(mcode)+"+"+STR$~(lastbyte-firstbyte)+" "+STR$~(start)+" "+STR$~(firstbyte)) 630*OPT1,0 640END
�: ENCODE � mcode &100 page=� osrdch=&FFE0 (oswrch=&FFEE 2osword=&FFF1 <�pass=4 � 6 � 2 FO%=mcode PP%=page Z [OPT pass d.firstbyte n$EQUW &FF0D \ � the BASIC program x .start �LDX #&00 � .loop �LDA message,X �BEQ end �JSR oswrch �INX �BNE loop �.end �JSR osrdch �BCC save �BRK �BRK �EQUS "Escape" BRK .save LDA #&7F "LDX #block � 256 ,LDY #block � 256 6#JSR osword \ write deleted data @!LDA result \ load result byte J� #&1E \ isolate error code T BNE error ^BRK hBRK rEQUS "Write OK" | .error �BRK �BRK �EQUS "Write failed" �BRK � .block �EQUB &FF \ current drive �$EQUD page+&100 \ start at �+&100 �EQUB &03 \ 3 parameters �)EQUB &4F \ write deleted multi-sector � EQUB &01 \ logical track &01 �'EQUB &00 \ start logical sector &00 �%EQUB &42 \ 2 sectors of 512 bytes �.result EQUB &00 \ result byte .message 3EQUS "Press Space to save data on current disc" &BRK 0 .lastbyte :] D� N!�'"Save filename = "filename$ X� filename$ = "" � � b*OPT1,2 la�("SAVE "+filename$+" "+�~(mcode)+"+"+�~(lastbyte-firstbyte)+" "+�~(start)+" "+�~(firstbyte)) v*OPT1,0 �� �
00000000 0d 00 0a 0d f4 3a 20 45 4e 43 4f 44 45 0d 00 14 |.....: ENCODE...| 00000010 10 de 20 6d 63 6f 64 65 20 26 31 30 30 0d 00 19 |.. mcode &100...| 00000020 0a 70 61 67 65 3d 90 0d 00 1e 10 6f 73 72 64 63 |.page=.....osrdc| 00000030 68 3d 26 46 46 45 30 0d 00 28 10 6f 73 77 72 63 |h=&FFE0..(.oswrc| 00000040 68 3d 26 46 46 45 45 0d 00 32 10 6f 73 77 6f 72 |h=&FFEE..2.oswor| 00000050 64 3d 26 46 46 46 31 0d 00 3c 13 e3 70 61 73 73 |d=&FFF1..<..pass| 00000060 3d 34 20 b8 20 36 20 88 20 32 0d 00 46 0c 4f 25 |=4 . 6 . 2..F.O%| 00000070 3d 6d 63 6f 64 65 0d 00 50 0b 50 25 3d 70 61 67 |=mcode..P.P%=pag| 00000080 65 0d 00 5a 0d 5b 4f 50 54 20 70 61 73 73 0d 00 |e..Z.[OPT pass..| 00000090 64 0e 2e 66 69 72 73 74 62 79 74 65 0d 00 6e 24 |d..firstbyte..n$| 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 78 0a 2e 73 74 61 72 74 0d 00 82 0c 4c 44 |..x..start....LD| 000000d0 58 20 23 26 30 30 0d 00 8c 09 2e 6c 6f 6f 70 0d |X #&00.....loop.| 000000e0 00 96 11 4c 44 41 20 6d 65 73 73 61 67 65 2c 58 |...LDA message,X| 000000f0 0d 00 a0 0b 42 45 51 20 65 6e 64 0d 00 aa 0e 4a |....BEQ end....J| 00000100 53 52 20 6f 73 77 72 63 68 0d 00 b4 07 49 4e 58 |SR oswrch....INX| 00000110 0d 00 be 0c 42 4e 45 20 6c 6f 6f 70 0d 00 c8 08 |....BNE loop....| 00000120 2e 65 6e 64 0d 00 d2 0e 4a 53 52 20 6f 73 72 64 |.end....JSR osrd| 00000130 63 68 0d 00 dc 0c 42 43 43 20 73 61 76 65 0d 00 |ch....BCC save..| 00000140 e6 07 42 52 4b 0d 00 f0 07 42 52 4b 0d 00 fa 11 |..BRK....BRK....| 00000150 45 51 55 53 20 22 45 73 63 61 70 65 22 0d 01 04 |EQUS "Escape"...| 00000160 07 42 52 4b 0d 01 0e 09 2e 73 61 76 65 0d 01 18 |.BRK.....save...| 00000170 0c 4c 44 41 20 23 26 37 46 0d 01 22 14 4c 44 58 |.LDA #&7F..".LDX| 00000180 20 23 62 6c 6f 63 6b 20 83 20 32 35 36 0d 01 2c | #block . 256..,| 00000190 14 4c 44 59 20 23 62 6c 6f 63 6b 20 81 20 32 35 |.LDY #block . 25| 000001a0 36 0d 01 36 23 4a 53 52 20 6f 73 77 6f 72 64 20 |6..6#JSR osword | 000001b0 5c 20 77 72 69 74 65 20 64 65 6c 65 74 65 64 20 |\ write deleted | 000001c0 64 61 74 61 0d 01 40 21 4c 44 41 20 72 65 73 75 |data..@!LDA resu| 000001d0 6c 74 20 5c 20 6c 6f 61 64 20 72 65 73 75 6c 74 |lt \ load result| 000001e0 20 62 79 74 65 0d 01 4a 1f 80 20 23 26 31 45 20 | byte..J.. #&1E | 000001f0 5c 20 69 73 6f 6c 61 74 65 20 65 72 72 6f 72 20 |\ isolate error | 00000200 63 6f 64 65 0d 01 54 0d 42 4e 45 20 65 72 72 6f |code..T.BNE erro| 00000210 72 0d 01 5e 07 42 52 4b 0d 01 68 07 42 52 4b 0d |r..^.BRK..h.BRK.| 00000220 01 72 13 45 51 55 53 20 22 57 72 69 74 65 20 4f |.r.EQUS "Write O| 00000230 4b 22 0d 01 7c 0a 2e 65 72 72 6f 72 0d 01 86 07 |K"..|..error....| 00000240 42 52 4b 0d 01 90 07 42 52 4b 0d 01 9a 17 45 51 |BRK....BRK....EQ| 00000250 55 53 20 22 57 72 69 74 65 20 66 61 69 6c 65 64 |US "Write failed| 00000260 22 0d 01 a4 07 42 52 4b 0d 01 ae 0a 2e 62 6c 6f |"....BRK.....blo| 00000270 63 6b 0d 01 b8 1c 45 51 55 42 20 26 46 46 20 5c |ck....EQUB &FF \| 00000280 20 63 75 72 72 65 6e 74 20 64 72 69 76 65 0d 01 | current drive..| 00000290 c2 24 45 51 55 44 20 70 61 67 65 2b 26 31 30 30 |.$EQUD page+&100| 000002a0 20 5c 20 73 74 61 72 74 20 61 74 20 90 2b 26 31 | \ start at .+&1| 000002b0 30 30 0d 01 cc 1b 45 51 55 42 20 26 30 33 20 5c |00....EQUB &03 \| 000002c0 20 33 20 70 61 72 61 6d 65 74 65 72 73 0d 01 d6 | 3 parameters...| 000002d0 29 45 51 55 42 20 26 34 46 20 5c 20 77 72 69 74 |)EQUB &4F \ writ| 000002e0 65 20 64 65 6c 65 74 65 64 20 6d 75 6c 74 69 2d |e deleted multi-| 000002f0 73 65 63 74 6f 72 0d 01 e0 20 45 51 55 42 20 26 |sector... EQUB &| 00000300 30 31 20 5c 20 6c 6f 67 69 63 61 6c 20 74 72 61 |01 \ logical tra| 00000310 63 6b 20 26 30 31 0d 01 ea 27 45 51 55 42 20 26 |ck &01...'EQUB &| 00000320 30 30 20 5c 20 73 74 61 72 74 20 6c 6f 67 69 63 |00 \ start logic| 00000330 61 6c 20 73 65 63 74 6f 72 20 26 30 30 0d 01 f4 |al sector &00...| 00000340 25 45 51 55 42 20 26 34 32 20 5c 20 32 20 73 65 |%EQUB &42 \ 2 se| 00000350 63 74 6f 72 73 20 6f 66 20 35 31 32 20 62 79 74 |ctors of 512 byt| 00000360 65 73 0d 01 fe 0b 2e 72 65 73 75 6c 74 0d 02 08 |es.....result...| 00000370 1a 45 51 55 42 20 26 30 30 20 5c 20 72 65 73 75 |.EQUB &00 \ resu| 00000380 6c 74 20 62 79 74 65 0d 02 12 0c 2e 6d 65 73 73 |lt byte.....mess| 00000390 61 67 65 0d 02 1c 33 45 51 55 53 20 22 50 72 65 |age...3EQUS "Pre| 000003a0 73 73 20 53 70 61 63 65 20 74 6f 20 73 61 76 65 |ss Space to save| 000003b0 20 64 61 74 61 20 6f 6e 20 63 75 72 72 65 6e 74 | data on current| 000003c0 20 64 69 73 63 22 0d 02 26 07 42 52 4b 0d 02 30 | disc"..&.BRK..0| 000003d0 0d 2e 6c 61 73 74 62 79 74 65 0d 02 3a 05 5d 0d |..lastbyte..:.].| 000003e0 02 44 05 ed 0d 02 4e 21 e8 27 22 53 61 76 65 20 |.D....N!.'"Save | 000003f0 66 69 6c 65 6e 61 6d 65 20 3d 20 22 66 69 6c 65 |filename = "file| 00000400 6e 61 6d 65 24 0d 02 58 18 e7 20 66 69 6c 65 6e |name$..X.. filen| 00000410 61 6d 65 24 20 3d 20 22 22 20 8c 20 e0 0d 02 62 |ame$ = "" . ...b| 00000420 0b 2a 4f 50 54 31 2c 32 0d 02 6c 61 ff 28 22 53 |.*OPT1,2..la.("S| 00000430 41 56 45 20 22 2b 66 69 6c 65 6e 61 6d 65 24 2b |AVE "+filename$+| 00000440 22 20 22 2b c3 7e 28 6d 63 6f 64 65 29 2b 22 2b |" "+.~(mcode)+"+| 00000450 22 2b c3 7e 28 6c 61 73 74 62 79 74 65 2d 66 69 |"+.~(lastbyte-fi| 00000460 72 73 74 62 79 74 65 29 2b 22 20 22 2b c3 7e 28 |rstbyte)+" "+.~(| 00000470 73 74 61 72 74 29 2b 22 20 22 2b c3 7e 28 66 69 |start)+" "+.~(fi| 00000480 72 73 74 62 79 74 65 29 29 0d 02 76 0b 2a 4f 50 |rstbyte))..v.*OP| 00000490 54 31 2c 30 0d 02 80 05 e0 0d ff |T1,0.......| 0000049b