New laptop

Here you can talk about anything related to BBC BASIC, not covered in another category
Richard Russell
Posts: 540
Joined: Tue 18 Jun 2024, 09:32

Re: New laptop

Post by Richard Russell »

Ric wrote: Fri 09 Jan 2026, 12:53 Sounds like such a silly question, but how do i message you directly Richard, I can not find a way on this forum
Are PMs not working? Maybe Michael disabled them over concerns about the Online Safety Act implications.
nor an email anywhere?
:lol: :lol: :lol: :lol: :lol: :lol: :lol:
Ric
Posts: 261
Joined: Tue 17 Apr 2018, 21:03

Re: New laptop

Post by Ric »

That doesn't really answer the question. How do I contact you regarding bb4w reissue?
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Richard Russell
Posts: 540
Joined: Tue 18 Jun 2024, 09:32

Re: New laptop

Post by Richard Russell »

Ric wrote: Fri 09 Jan 2026, 13:54 That doesn't really answer the question. How do I contact you regarding bb4w reissue?
If PMs aren't working use email! My email address is everywhere: on the web site, in the Help menu of both BB4W and BBCSDL, at the bottom of every page of the manual etc. It's not altogether desirable to have one's email address so widely available, as it can significantly increase the amount of spam received, but as a software vendor it's unavoidable.
Ric
Posts: 261
Joined: Tue 17 Apr 2018, 21:03

Re: New laptop

Post by Ric »

Thank you Richard, I now have BB4W running on my new laptop. Woo Hoo.
I still have problems with @hwndc%.
I know you dont want to supply code for the answers, but please, do i CALL or SYS the API and in what format.
The reason i am writing the game is so that i can teach my son how to code( he is writing in c++) and is laerning quickly, i need to stay ahead of him which is difficult because he is young and absorbs info like a sponge, but when we look things up on google/stack overflow there are always answers in the form of example code which is easy to convert to what we want. I find the resistance to divulge code examples difficult to comprehend and frustrating as a result i am struggling to keep faith in bb4w(sdl). You give your reasins, but would it not be better to share your knowlwdge rather than let it go to waste.
I love BBC BASIC, i have programmed in it since i was 10, but in the modern world, I like others of the genre, need help keeping up with the changing world. Please can you change your mind and give us examples when asked.
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Richard Russell
Posts: 540
Joined: Tue 18 Jun 2024, 09:32

Re: New laptop

Post by Richard Russell »

Ric wrote: Fri 09 Jan 2026, 23:43 do i CALL or SYS the API and in what format.
CALL is (usually) for calling machine code that you have created yourself, typically - but not necessarily - using the built-in assembler. Crucially, it doesn't use a standard ABI but passes its parameters in a block of memory, the contents of which are documented here.

SYS is (usually) for calling code in an external shared library, such as a dll in Windows or a .so ('shared object') in most other OSes. Crucially, it uses the standard ABI defined for the relevant platform, so parameters are passed in the way the called routine expects (which may be in registers and/or on the stack).

I say "usually" in both cases because you can use SYS to call your own machine code if you prefer (for example if the ABI is more convenient) and you may - although it's less likely - be able to call a shared library routine using CALL if it takes no parameters.

Although there are occasionally situations when it's not straightforward to translate the 'C style' documentation of an API that you will typically find online into equivalent BBC BASIC code, SDL_GetWindowWMInfo() is not one of them and the conversion is direct:

C style:

Code: Select all

 SDL_bool SDL_GetWindowWMInfo(SDL_Window * window, SDL_SysWMinfo * info);
BBC BASIC style:

Code: Select all

 SYS "SDL_GetWindowWMInfo", window%%, info{} TO bool%
would it not be better to share your knowlwdge rather than let it go to waste.
Everything I knew I have long since shared, either in the main Help documentation, in the Wiki or here. In the case of the SYS statement, which you seem to be struggling with, there are dozens of examples of its use in the supplied sample programs and libraries. I would particularly point you to the Accessing the SDL 2.0 API section of the manual.

Sadly I no longer have knowledge to share. In 99% of cases I do not know (or have forgotten) the answer to questions asked here, and the answers I provide most commonly come from Google. That was the case when you asked about @hwnd%, I asked Google "how to find the native window handle in SDL2" and it told me about SDL_GetWindowWMInfo(). You could have done the same!

Once upon a time there were several BBC BASIC users just as knowledgeable as I was (more so in respect of some specialised areas such as COM); I would mention Jon Ripley and Malcolm Marten as key examples but they were far from alone. Unfortunately for reasons of their own (I think possibly because at the time BB4W was becoming stagnant and BBCSDL was not yet foreseen) they have 'moved on' to other languages.

But what is essential, especially given my prognosis, is that people learn to stand on their own feet and not be dependant on me to solve their problems. Otherwise, BBC BASIC will die when I do. :cry: