# > BLib.Version 0.02 18Nov2020 C Read titles and versions of installed firmware on 8-bit hosts ; Will read MOS on RISC OS, but firmware list incorrect (: 2&A%=0:X%=1:os%=((&FFF4)&FF00)256 < ver_Scan F( "Operating system:"'" ";ver_mos$ P "Firmware:" Z N%=0 ver_num% d$ -(N%<10));N%;" ";ver_ttl$(N%) n x : :  PROCver_Scan  ------------  Scans installed firmware  Returns: = ver_num% = number of installed firmware titles minus 1 $ ver_mos$ = MOS version string F ver_ttl$() = array of firmware title strings, DIM'd to ver_num% : %ver_Scan: tmp$,in%:ver_mos$="" /:tmp$="tmp"+Ñ,4):in%=(tmp$): in%:#in% > in%=0: "Spool "+tmp$: "FX3,70": "HELP": "FX3":*Spool 4in%=(tmp$): A%=0 1: A%: ver_ttl$(ver_num%) I#in%=0:ver_num%=-1::A$=rd(in%): A$,1)=")":A$=A$,A$+"(","(")-1) p A$>2: A$<>32:ver_num%=ver_num%+1: A%:ver_ttl$(ver_num%)=A$: A$,3)="OS " A$,4)="MOS ":ver_mos$=A$ "* #in%::#in%:in%=0: "Delete "+tmp$ ,V os%=6 ș "XOS_Byte" A%:ș "OS_WriteN",A%+4 A$:ver_mos$=A$,A$+" ("," (")-1) 6 @: J$ > BLib.StringIO 1.01 12Apr2005 T9ݤrd(i%):A%,B%,A$::A%=#i%:A%<>10A%<>13:A$=A$+A% ^GA%=10A%=13#i%:#i%:B%=#i%:A%=B%(B%<>13B%<>10):#i%=#i%-1 h=A$