BBC Basic Question
Paul Dunning (1545) 26 posts |
Hi, I’ve been trying to find some way of doing this, but I can’t find anything. we know that data can be sent to and fro because of browsers, FTP apps etc.. Is there a module that needs to be loaded so I can use * commands or SWI calls? |
Steve Pampling (1551) 8170 posts |
My question is about accessing the internet using BASIC – specifically sending POST or GET data to a server and receiving data back. You might want to study the runimage of http://www.apts04.dsl.pipex.com/Progs/Antispam.htm Off to the London place shortly (Kensington Olympia, building a beer festival not that sporting stuff) |
Matthew Phillips (473) 721 posts |
Programmers Reference Manual volume 5a covers internet stuff. The tutorial section is written from the point of view of developing in C, but everything is translatable into BASIC. In particular each library call has a corresponding SWI in the Socket module. See http://foundation.riscos.com/Private/manuals/PRMs/PRM5a.pdf You will also probably need to use the Resolver module. I guess that is also covered in PRM 5a, but the section on the Resolver is also available at http://select.riscos.com/prm/networking/resolver.html |
Andrew Flegg (1574) 28 posts |
There are modules, available for download from ROOL, which can talk HTTP and return the data (specifically As an example of them, have a look at the Artistic-licenced TVGuide which uses BASIC (albeit in WimpWorks) to download data over HTTP from bleb.org. |
Paul Dunning (1545) 26 posts |
Hi, all |
Paul Dunning (1545) 26 posts |
Hmm – unfortunately, not much to go on. The TVGuide application appears to be compiled machine code, so no chance of picking that apart. I can’t find any documentation for the AcornHTTP module. There appear to be some commands available when I load the module into Edit, but when it’s RMLoaded and running, those commands appear to just cause File Not Found errors. I’ll persevere, but if someone can point me to documentation on how to use this module, it may help. Thanks. |
Andrew Flegg (1574) 28 posts |
TVGuide contains the source inside the It’d be a bit mean to licence something under the Artistic License and then force you to ask for the source ;-) |
Paul Dunning (1545) 26 posts |
Ah – that’s interesting. I hadn’t looked at the file – from the name, I thought it was used as a database file for the app. I should be more curious ;-) There certainly seems enough there to point me in the right direction. Basically it seems that you set up a connection, grab data from a URL, wait for the data to download, writing to a file along the way, and then close files & connections. The WimpWorks environment looks interesting too. I may have to investigate that more too. |
Ben Avison (25) 445 posts |
I’m no expert on that module, but there do seem to be a few bits of documentation inside its source directory |