Code: Select all
OSCLI "LOAD """+file$+""" "+STR$~addr%%+" +"+STR$~max%
Also, why are ther 3 consecutive " before and after +file$+, other than it says address out of range if there arent?
Code: Select all
OSCLI "LOAD """+file$+""" "+STR$~addr%%+" +"+STR$~max%
That depends on whether you are talking about BB4W or BBCSDL, because the code will be different. In BB4W you will probably be wanting your assembler code to call the Windows ReadFile function and in BBCSDL the SDL_RWread function.Ric wrote: ↑Wed 07 Jan 2026, 16:19 Could some one point me in the right direction to convertinto assembly?Code: Select all
OSCLI "LOAD """+file$+""" "+STR$~addr%%+" +"+STR$~max%
What I always suggest when that kind of question is asked is to replace OSCLI with PRINT so you can see exactly what command is being issued. So in this specific case:Also, why are ther 3 consecutive " before and after +file$+, other than it says address out of range if there arent?
Code: Select all
PRINT "LOAD """+file$+""" "+STR$~addr%%+" +"+STR$~max%
Bear in mind that, unless the files are very short, it's likely that calling ReadFile from assembler code won't be significantly faster than *LOAD in BASIC, because the time will be dominated by the actual file read operation. So if the motivation for writing it in assembler code is solely speed, it probably won't be worth the effort.
Nevertheless the more you write in assembler code the less portable it will be. If you use BASIC code it will work without modification in all the supported OSes (Windows, MacOS, Linux etc.) and all the supported CPUs (x86, ARM, WASM). So I would say that expending effort on shaving off the last microsecond is a misplaced priority.
No, the channel number is a BBC BASIC concept which the Operating System knows nothing about. The API function needs the native file handle, which in BASIC you would usually obtain from @hfile%(channel). If your assembler code is opening the file using the CreateFile API (which as I mentioned is quite messy) it will return the required native file handle.
I wonder if the split between CPU code and GPU (shader) code is non-optimum. What does the profiler have to say about where the time is being spent in the BASIC + shader version? Could you perhaps move some of the time-consuming computation into the vertex shader?Most of the graphics/rendering is already writen in ASM, without it the frames per second would be unacceptably slow, around 37
I think you missed the part of my previous post which confirmed that SDL 2.0 is fully compatible with Direct3D, indeed Direct3D is the default back-end when SDL is running in Windows. So your conclusion that being reliant on D3D makes porting impossible is quite wrong.as discussed, it is reliant on D3D, so at this juncture porting isnt possible anyway.
The proof!Richard Russell wrote: ↑Wed 07 Jan 2026, 22:48 I think you missed the part of my previous post which confirmed that SDL 2.0 is fully compatible with Direct3D...