BBC BASIC for Windows
« BBC Emulators »

Welcome Guest. Please Login or Register.
Apr 6th, 2018, 12:06am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BBC Emulators  (Read 1755 times)
Gareth Lock
Guest
xx Re: BBC Emulators
« Reply #4 on: Oct 23rd, 2008, 7:12pm »

OK... So BB4W understandably is not an emulator, nor should be.

What would be handy though, for me at any rate, coming from BBC BASIC under RISC OS would be a DLL that implemented the simple OS calls such as OS_File 17 (Check for existance of a file.) and OS_File 5 (Return the size of a file in bytes.) without having the extra overhead of API calls being directly exposed to the programmer. I'm sure there are other simple ones like this too, but I can't think of them at the moment.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: BBC Emulators
« Reply #5 on: Oct 24th, 2008, 09:00am »

Quote:
What would be handy though, for me at any rate, coming from BBC BASIC under RISC OS would be a DLL that implemented the simple OS calls such as OS_File 17 (Check for existance of a file.) and OS_File 5 (Return the size of a file in bytes.) without having the extra overhead of API calls being directly exposed to the programmer.

Is there a particular reason why you want this to be a DLL, rather than a BASIC library? In terms of being "exposed to the programmer" I would have thought a simple library would be sufficient to hide the code away from view.

Code:
      DEF FN_fileexists(file$)
      LOCAL dir%, sh%
      DIM dir% LOCAL 317
      SYS "FindFirstFile", file$, dir% TO sh%
      IF sh% = -1 THEN = FALSE
      SYS "FindClose", sh%
      = TRUE
      
      DEF FN_filesize(file$)
      LOCAL dir%, sh%
      DIM dir% LOCAL 317
      SYS "FindFirstFile", file$, dir% TO sh%
      IF sh% = -1 THEN = 0
      SYS "FindClose", sh%
      = dir%!32 

The usual caveats about such things apply. FN_fileexists only tells you that the file existed a short time ago; it might have been deleted by another application before you get a chance to open it. FN_filesize only works correctly if the file size is less than 2 Gbytes.

Richard.
User IP Logged

JGHarston
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 52
xx Re: BBC Emulators
« Reply #6 on: Aug 6th, 2010, 2:42pm »

on Oct 23rd, 2008, 7:12pm, Guest-Gareth Lock wrote:
What would be handy though, for me at any rate, coming from BBC BASIC under RISC OS would be a DLL that implemented the simple OS calls such as OS_File 17 (Check for existance of a file.) and OS_File 5 (Return the size of a file in bytes.)


I wrote generalised versions of libraries I previously used on BBCs and RISC OS to provide the same functions on Windows to do exactly that. For instance, mdfs.net/blib/Generic/FileIO provides the same FNfile(), PROCgpbp(), FNargs(),etc. calls so preexisting code that did, for instance, filetype%=FNfile(path$,5) (which called OS_File 5) or PROCgbpb(out%,write,mem%,num%,ptr%) would perform the same function on Windows.

I think Gordon would make his own life easier if he stopped insisting on refering to some imagingary product called BBC4W, as it's making him think he's using a BBC for Windows, rather than BBC BASIC for Windows.
User IP Logged

GordonSweet
Developer

member is offline

Avatar




PM


Posts: 23
xx Re: BBC Emulators
« Reply #7 on: Aug 6th, 2010, 5:29pm »

Quite correct. But you must accept there are many Amateur programmers like me who delight in the way BBC4W is able to still run many of the hundreds of original BBC Programs. Though the resulting graphics and sounds pale compared with the full capabilities of modern software, the results are often amusing if only for sentimental reasons.

For example not everyone is capable of understanding fully the capabilities of BBC4W. But can see by the success I have had in producing a variety of free software available from my site mostly using BBC4W, and the way a number of distributors have been keen to host much of it. It is obvious many of those continually downloading my efforts take very little interest in any expertise or technicalities of HOW the software is produced, only in the end results.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls