GetPage J.G.Harston 1/8/1990 B/B+/M/C/E with ATS, DFS/ADFS/NFS Even though the BBC no longer transmits telesoftware programs, a teletext adapter isn't completely useless. There are lots of pages of information transmitted by the BBC and ITV teletext services. A lot of the pages transmitted are carousels made up from many sub-pages. These usually have the sub-page number and the total number of sub-pages displayed in the top right-hand corner. The program here lets you download one of these carousels so that you can use it in a teletext editor and include it in your own carousels. (Bear in mind though that most transmitted teletext is copyrighted.) Type in the listing and check it with Get it Right! When run, the program asks you for the channel, the page number and the filename to save the carousel in. Once you have entered these three details, the program waits for each sub-page of the carousel to be transmitted, and copies it to disk. As the program is waiting, it shows its progress so far with white blocks indicating the sub-pages not yet captured and green blocks showing those that have. The sub-pages don't have to be transmitted in the correct order, the program slots them into the file in the correct place. Once all the sub-pages have been captured, the program finishes. How it Works The program first turns the header on, then asks for the channel, page and name to save the pages in. After setting the page and channel, the programs waits for a page to arrive. This is then examined to check that it has an index on it, and gets the total number of sub-pages from this index. Two places are looked at _ the top right-hand corner and the bottom right-hand corner. If it can't find an index, the program stops. The program then attempts to save a dummy file long enough for all the pages to check that there's enough disk space for it. The short piece of machine code that is assembled wipes off the top bit from all the characters on screen, except for the teletext control characters and the '#', '`' and '_' characters. This is called by PROCsave. The file is opened and the captured sub-page is output to it. The program then enters a loop waiting until all the sub-pages have been captured. Within this loop, while waiting the coloured blocks are shown to show the current progress. Once a sub-page has been captured, the program finds the sub-page number and if this sub-page has not already been saved, it is saved. pf%() holds flags indicating which sub-pages have been saved. If at least one of the entries of pf%() is zero, then there are still more sub-pages to capture, the loop is repeated. Otherwise, the output file is closed and the program ends. PROCsave() sends the captured sub-page into the file. First, the characters on the screen are converted by calling the machine code assembled earlier. OSGBPB is then used to send 920 bytes from the screen into the file, and then 104 padding bytes after. Using OSGBPB is much faster and efficient then using multiple BPUTs. Each sub-page captured is stored as 1024 bytes in the file. The first 920 bytes contain the 23 lines of text, and the final 104 bytes are padding. This is the format most commonly used in the teletext editing programs that I have come across, with the padding bytes being used for any extra data specific to the program. This program was originally written for use with the Acorn teletext adapter and the ATS Rom, but it can be very easily changed for other adapters. The critical parts are the *TRANSFER and *DISPLAY commands. These together wait for the next sub-page of the page set with *PAGE to arrive, and then display it on the screen. Any replacement would have to do the same. If you as using Basic version 1, then upgrade to Basic version 2. Alternatively, replace all the occurances of OSCLI with PROCoscli (...) and add the line 775DEFPROCoscli($&700):LOCAL X%,Y%:X%=0:Y%=7:CALL&FFF7:E.