Home » Archimedes archive » Acorn User » AU 1993-11.adf » !StarInfo_StarInfo » PokeSerial
PokeSerial
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 » Archimedes archive » Acorn User » AU 1993-11.adf » !StarInfo_StarInfo |
Filename: | PokeSerial |
Read OK: | ✔ |
File size: | 0665 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1REM >PokeSerial 2REM By Nick Craig-Wood 3 4CLS 5 6*RMEnsure UtilityModule 3.10 Error This only works on RISCOS 3.10+ 7 8PRINT "This pokes the serial device driver module to" 9PRINT " 1) Fix problems with the 65C51 serial driver for old machines" 10PRINT " IE A300/A400/A3000/A540" 11PRINT " 2) Allow newer machines with 82C710 other baud rates" 12PRINT " IE A5000/A4/A3010/A3020/A4000" 13PRINT 14 15REPEAT 16 INPUT "RMSaved module file : "in$ 17 in%=OPENINin$ 18UNTIL in%<>0 19size%=EXT#in% 20DIM module% size%+1024 21CLOSE#in% 22SYS "OS_File",16,in$,module%,0 23PRINT 24 25PRINT "For A300/A400/A3000/A540 only" 26PRINT "=============================" 27PRINT 28PRINT "Poking 65C51 code ... "; 29a%=module%!&B60 30CASE a% OF 31 WHEN &E33FF3C2 32 PRINT "Module already poked" 33 WHEN &E33FF003 34 module%!&B60=&E33FF3C2 35 PRINT "Done" 36 OTHERWISE 37 ERROR 1,"Not the correct version of the module" 38ENDCASE 39PRINT 40 41 42freq=24E6/13/16 43baudtable%=module%+&1100 44REPEAT 45 PRINT "For A5000/A4/A3010/A3020/A4000 only" 46 PRINT "===================================" 47 PRINT 48 PRINT "Baud rates for baud number (eg *fx 7) are" 49 FOR i%=0 TO 15 50 PRINT ;i%;TAB(16); 51 @%="f10.1" 52 PRINT freq/(!(baudtable%+4*i%)) 53 @%=0 54 NEXT i% 55 PRINT 56 57 INPUT "Number to change (-1 to end) : "p% 58 IF p%>=0 THEN 59 REPEAT 60 INPUT "New baud rate : "b 61 a%=INT(freq/b+0.5) 62 IF a%=0 THEN PRINT "Baud rate too high" 63 UNTIL a%<>0 64 @%="f10.1" 65 PRINT "Nearest baud rate is : ";freq/a% 66 @%=0 67 !(baudtable%+4*p%)=a% 68 ENDIF 69 PRINT 70UNTIL p%<0 71 72INPUT "File for output : "out$ 73SYS "OS_File",10,out$,&FFA,0,module%,module%+size% 74 75
� >PokeSerial � By Nick Craig-Wood � F*RMEnsure UtilityModule 3.10 Error This only works on RISCOS 3.10+ 5� "This pokes the serial device driver module to" F� " 1) Fix problems with the 65C51 serial driver for old machines" #� " IE A300/A400/A3000/A540" =� " 2) Allow newer machines with 82C710 other baud rates" )� " IE A5000/A4/A3010/A3020/A4000" � � # � "RMSaved module file : "in$ in%=�in$ � in%<>0 size%=�#in% � module% size%+1024 �#in% !ș "OS_File",16,in$,module%,0 � %� "For A300/A400/A3000/A540 only" %� "=============================" � � "Poking 65C51 code ... "; a%=module%!&B60 Ȏ a% � � &E33FF3C2 � "Module already poked" ! � &E33FF003 " module%!&B60=&E33FF3C2 # � "Done" $ %3 � 1,"Not the correct version of the module" &� '� ( ) *freq=24E6/13/16 +baudtable%=module%+&1100 ,� -- � "For A5000/A4/A3010/A3020/A4000 only" .- � "===================================" / � 03 � "Baud rates for baud number (eg *fx 7) are" 1 � i%=0 � 15 2 � ;i%;�16); 3 @%="f10.1" 4# � freq/(!(baudtable%+4*i%)) 5 @%=0 6 � i% 7 � 8 9+ � "Number to change (-1 to end) : "p% : � p%>=0 � ; � <. � "New baud rate : "b = a%=�(freq/b+0.5) >) � a%=0 � � "Baud rate too high" ? � a%<>0 @ @%="f10.1" A3 � "Nearest baud rate is : ";freq/a% B @%=0 C !(baudtable%+4*p%)=a% D � E � F � p%<0 G H"� "File for output : "out$ I5ș "OS_File",10,out$,&FFA,0,module%,module%+size% J K �
00000000 0d 00 01 11 f4 20 3e 50 6f 6b 65 53 65 72 69 61 |..... >PokeSeria| 00000010 6c 0d 00 02 18 f4 20 42 79 20 4e 69 63 6b 20 43 |l..... By Nick C| 00000020 72 61 69 67 2d 57 6f 6f 64 0d 00 03 04 0d 00 04 |raig-Wood.......| 00000030 05 db 0d 00 05 04 0d 00 06 46 2a 52 4d 45 6e 73 |.........F*RMEns| 00000040 75 72 65 20 55 74 69 6c 69 74 79 4d 6f 64 75 6c |ure UtilityModul| 00000050 65 20 33 2e 31 30 20 45 72 72 6f 72 20 54 68 69 |e 3.10 Error Thi| 00000060 73 20 6f 6e 6c 79 20 77 6f 72 6b 73 20 6f 6e 20 |s only works on | 00000070 52 49 53 43 4f 53 20 33 2e 31 30 2b 0d 00 07 04 |RISCOS 3.10+....| 00000080 0d 00 08 35 f1 20 22 54 68 69 73 20 70 6f 6b 65 |...5. "This poke| 00000090 73 20 74 68 65 20 73 65 72 69 61 6c 20 64 65 76 |s the serial dev| 000000a0 69 63 65 20 64 72 69 76 65 72 20 6d 6f 64 75 6c |ice driver modul| 000000b0 65 20 74 6f 22 0d 00 09 46 f1 20 22 20 31 29 20 |e to"...F. " 1) | 000000c0 46 69 78 20 70 72 6f 62 6c 65 6d 73 20 77 69 74 |Fix problems wit| 000000d0 68 20 74 68 65 20 36 35 43 35 31 20 73 65 72 69 |h the 65C51 seri| 000000e0 61 6c 20 64 72 69 76 65 72 20 66 6f 72 20 6f 6c |al driver for ol| 000000f0 64 20 6d 61 63 68 69 6e 65 73 22 0d 00 0a 23 f1 |d machines"...#.| 00000100 20 22 20 20 20 20 49 45 20 41 33 30 30 2f 41 34 | " IE A300/A4| 00000110 30 30 2f 41 33 30 30 30 2f 41 35 34 30 22 0d 00 |00/A3000/A540"..| 00000120 0b 3d f1 20 22 20 32 29 20 41 6c 6c 6f 77 20 6e |.=. " 2) Allow n| 00000130 65 77 65 72 20 6d 61 63 68 69 6e 65 73 20 77 69 |ewer machines wi| 00000140 74 68 20 38 32 43 37 31 30 20 6f 74 68 65 72 20 |th 82C710 other | 00000150 62 61 75 64 20 72 61 74 65 73 22 0d 00 0c 29 f1 |baud rates"...).| 00000160 20 22 20 20 20 20 49 45 20 41 35 30 30 30 2f 41 | " IE A5000/A| 00000170 34 2f 41 33 30 31 30 2f 41 33 30 32 30 2f 41 34 |4/A3010/A3020/A4| 00000180 30 30 30 22 0d 00 0d 05 f1 0d 00 0e 04 0d 00 0f |000"............| 00000190 05 f5 0d 00 10 23 20 20 e8 20 22 52 4d 53 61 76 |.....# . "RMSav| 000001a0 65 64 20 6d 6f 64 75 6c 65 20 66 69 6c 65 20 3a |ed module file :| 000001b0 20 22 69 6e 24 0d 00 11 0e 20 20 69 6e 25 3d 8e | "in$.... in%=.| 000001c0 69 6e 24 0d 00 12 0c fd 20 69 6e 25 3c 3e 30 0d |in$..... in%<>0.| 000001d0 00 13 0f 73 69 7a 65 25 3d a2 23 69 6e 25 0d 00 |...size%=.#in%..| 000001e0 14 18 de 20 6d 6f 64 75 6c 65 25 20 73 69 7a 65 |... module% size| 000001f0 25 2b 31 30 32 34 0d 00 15 09 d9 23 69 6e 25 0d |%+1024.....#in%.| 00000200 00 16 21 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c |..!.. "OS_File",| 00000210 31 36 2c 69 6e 24 2c 6d 6f 64 75 6c 65 25 2c 30 |16,in$,module%,0| 00000220 0d 00 17 05 f1 0d 00 18 04 0d 00 19 25 f1 20 22 |............%. "| 00000230 46 6f 72 20 41 33 30 30 2f 41 34 30 30 2f 41 33 |For A300/A400/A3| 00000240 30 30 30 2f 41 35 34 30 20 6f 6e 6c 79 22 0d 00 |000/A540 only"..| 00000250 1a 25 f1 20 22 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |.%. "===========| 00000260 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| 00000270 3d 3d 22 0d 00 1b 05 f1 0d 00 1c 1f f1 20 22 50 |==".......... "P| 00000280 6f 6b 69 6e 67 20 36 35 43 35 31 20 63 6f 64 65 |oking 65C51 code| 00000290 20 2e 2e 2e 20 22 3b 0d 00 1d 13 61 25 3d 6d 6f | ... ";....a%=mo| 000002a0 64 75 6c 65 25 21 26 42 36 30 0d 00 1e 0b c8 8e |dule%!&B60......| 000002b0 20 61 25 20 ca 0d 00 1f 11 20 20 c9 20 26 45 33 | a% ..... . &E3| 000002c0 33 46 46 33 43 32 0d 00 20 20 20 20 20 20 f1 20 |3FF3C2.. . | 000002d0 22 4d 6f 64 75 6c 65 20 61 6c 72 65 61 64 79 20 |"Module already | 000002e0 70 6f 6b 65 64 22 0d 00 21 11 20 20 c9 20 26 45 |poked"..!. . &E| 000002f0 33 33 46 46 30 30 33 0d 00 22 1e 20 20 20 20 6d |33FF003..". m| 00000300 6f 64 75 6c 65 25 21 26 42 36 30 3d 26 45 33 33 |odule%!&B60=&E33| 00000310 46 46 33 43 32 0d 00 23 10 20 20 20 20 f1 20 22 |FF3C2..#. . "| 00000320 44 6f 6e 65 22 0d 00 24 07 20 20 7f 0d 00 25 33 |Done"..$. ...%3| 00000330 20 20 20 20 85 20 31 2c 22 4e 6f 74 20 74 68 65 | . 1,"Not the| 00000340 20 63 6f 72 72 65 63 74 20 76 65 72 73 69 6f 6e | correct version| 00000350 20 6f 66 20 74 68 65 20 6d 6f 64 75 6c 65 22 0d | of the module".| 00000360 00 26 05 cb 0d 00 27 05 f1 0d 00 28 06 20 20 0d |.&....'....(. .| 00000370 00 29 04 0d 00 2a 13 66 72 65 71 3d 32 34 45 36 |.)...*.freq=24E6| 00000380 2f 31 33 2f 31 36 0d 00 2b 1c 62 61 75 64 74 61 |/13/16..+.baudta| 00000390 62 6c 65 25 3d 6d 6f 64 75 6c 65 25 2b 26 31 31 |ble%=module%+&11| 000003a0 30 30 0d 00 2c 05 f5 0d 00 2d 2d 20 20 f1 20 22 |00..,....-- . "| 000003b0 46 6f 72 20 41 35 30 30 30 2f 41 34 2f 41 33 30 |For A5000/A4/A30| 000003c0 31 30 2f 41 33 30 32 30 2f 41 34 30 30 30 20 6f |10/A3020/A4000 o| 000003d0 6e 6c 79 22 0d 00 2e 2d 20 20 f1 20 22 3d 3d 3d |nly"...- . "===| 000003e0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| * 00000400 22 0d 00 2f 07 20 20 f1 0d 00 30 33 20 20 f1 20 |"../. ...03 . | 00000410 22 42 61 75 64 20 72 61 74 65 73 20 66 6f 72 20 |"Baud rates for | 00000420 62 61 75 64 20 6e 75 6d 62 65 72 20 28 65 67 20 |baud number (eg | 00000430 2a 66 78 20 37 29 20 61 72 65 22 0d 00 31 11 20 |*fx 7) are"..1. | 00000440 20 e3 20 69 25 3d 30 20 b8 20 31 35 0d 00 32 13 | . i%=0 . 15..2.| 00000450 20 20 20 20 f1 20 3b 69 25 3b 8a 31 36 29 3b 0d | . ;i%;.16);.| 00000460 00 33 12 20 20 20 20 40 25 3d 22 66 31 30 2e 31 |.3. @%="f10.1| 00000470 22 0d 00 34 23 20 20 20 20 f1 20 66 72 65 71 2f |"..4# . freq/| 00000480 28 21 28 62 61 75 64 74 61 62 6c 65 25 2b 34 2a |(!(baudtable%+4*| 00000490 69 25 29 29 0d 00 35 0c 20 20 20 20 40 25 3d 30 |i%))..5. @%=0| 000004a0 0d 00 36 0a 20 20 ed 20 69 25 0d 00 37 07 20 20 |..6. . i%..7. | 000004b0 f1 0d 00 38 04 0d 00 39 2b 20 20 e8 20 22 4e 75 |...8...9+ . "Nu| 000004c0 6d 62 65 72 20 74 6f 20 63 68 61 6e 67 65 20 28 |mber to change (| 000004d0 2d 31 20 74 6f 20 65 6e 64 29 20 3a 20 22 70 25 |-1 to end) : "p%| 000004e0 0d 00 3a 0f 20 20 e7 20 70 25 3e 3d 30 20 8c 0d |..:. . p%>=0 ..| 000004f0 00 3b 09 20 20 20 20 f5 0d 00 3c 2e 20 20 20 20 |.;. ...<. | 00000500 20 20 e8 20 22 4e 65 77 20 62 61 75 64 20 72 61 | . "New baud ra| 00000510 74 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |te | 00000520 20 20 3a 20 22 62 0d 00 3d 1a 20 20 20 20 20 20 | : "b..=. | 00000530 61 25 3d a8 28 66 72 65 71 2f 62 2b 30 2e 35 29 |a%=.(freq/b+0.5)| 00000540 0d 00 3e 29 20 20 20 20 20 20 e7 20 61 25 3d 30 |..>) . a%=0| 00000550 20 8c 20 f1 20 22 42 61 75 64 20 72 61 74 65 20 | . . "Baud rate | 00000560 74 6f 6f 20 68 69 67 68 22 0d 00 3f 0f 20 20 20 |too high"..?. | 00000570 20 fd 20 61 25 3c 3e 30 0d 00 40 12 20 20 20 20 | . a%<>0..@. | 00000580 40 25 3d 22 66 31 30 2e 31 22 0d 00 41 33 20 20 |@%="f10.1"..A3 | 00000590 20 20 f1 20 22 4e 65 61 72 65 73 74 20 62 61 75 | . "Nearest bau| 000005a0 64 20 72 61 74 65 20 69 73 20 20 20 20 20 20 20 |d rate is | 000005b0 20 20 3a 20 22 3b 66 72 65 71 2f 61 25 0d 00 42 | : ";freq/a%..B| 000005c0 0c 20 20 20 20 40 25 3d 30 0d 00 43 1d 20 20 20 |. @%=0..C. | 000005d0 20 21 28 62 61 75 64 74 61 62 6c 65 25 2b 34 2a | !(baudtable%+4*| 000005e0 70 25 29 3d 61 25 0d 00 44 07 20 20 cd 0d 00 45 |p%)=a%..D. ...E| 000005f0 07 20 20 f1 0d 00 46 0a fd 20 70 25 3c 30 0d 00 |. ...F.. p%<0..| 00000600 47 06 20 20 0d 00 48 22 e8 20 22 46 69 6c 65 20 |G. ..H". "File | 00000610 66 6f 72 20 6f 75 74 70 75 74 20 20 20 20 20 3a |for output :| 00000620 20 22 6f 75 74 24 0d 00 49 35 c8 99 20 22 4f 53 | "out$..I5.. "OS| 00000630 5f 46 69 6c 65 22 2c 31 30 2c 6f 75 74 24 2c 26 |_File",10,out$,&| 00000640 46 46 41 2c 30 2c 6d 6f 64 75 6c 65 25 2c 6d 6f |FFA,0,module%,mo| 00000650 64 75 6c 65 25 2b 73 69 7a 65 25 0d 00 4a 04 0d |dule%+size%..J..| 00000660 00 4b 04 0d ff |.K...| 00000665