I can't get Multiwin to run in 0.26a, as it results in a DIM Space error. This happens even in a 2-line program containing the relevant INSTALL and PROC commands.
I can continue using 0.21a which I backed up before upgrading, but I'd really like to see if the compile feature makes my program faster! For those who might be interested, I've been writing a DEC PDP-8 emulator.
Multiwin not working in 0.26a
Re: Multiwin not working in 0.26a
What platform? The supplied example program 'multidem.bbc' (in the examples/general folder) works for me, does it work for you? How many windows are you trying to create?
If you have a sample program that illustrates a problem (whether two lines or several) it would be enormously helpful to see it! This forum has good facilities for listing code within posts (put it in [code] tags).This happens even in a 2-line program containing the relevant INSTALL and PROC commands.
-
- Posts: 29
- Joined: Thu 05 Apr 2018, 21:41
Re: Multiwin not working in 0.26a
The Multidem.bbc works for me on 2 different computers using 26a and on Windows 10 platform
-
- Posts: 3
- Joined: Thu 22 Nov 2018, 23:43
Re: Multiwin not working in 0.26a
Many thanks for the reply! I'm running Linux, specifically Linux Mint 18.3 64-bit. Multidem.bbc doesn't run, generating the same error (see below). I'm trying to create one window.
This code:If you have a sample program that illustrates a problem (whether two lines or several) it would be enormously helpful to see it!
Code: Select all
INSTALL @lib$+"multiwin.bbc"
PROC_multiwin(1)
Code: Select all
DIM space in module /home/zeem/bbcsdl/lib/multiwin.bbc
Code: Select all
DIM Vdu{(Q%)}=@vdu{},Win{(Q%) hwnd%%,hdc%%,cmc&,cx%,cy%}
Thanks again.
Re: Multiwin not working in 0.26a
OK, I understand. It's not a problem with 'multiwin.bbc' at all, but arises because you are running 64-bit Linux. 32-bit BBC BASIC assumes that 'user memory' is allocated in the bottom half of the memory map (that is, addresses below &80000000) because in Windows that is guaranteed: higher addresses are reserved for the Operating System. 64-bit Linux does not make that guarantee and I expect that if you run 'about.bbc' (in the examples folder) you will find that either the heap or the static integer variables (or both) are allocated above that address; the consequence is that the addresses appear to be 'negative' and you receive the DIM space error.
Your best bet is not to try to run 32-bit BBCSDL on 64-bit Linux, but to run the 'experimental' 64-bit edition instead. It can be downloaded from the usual place, or via this direct download link. Many Linux users do not like to - and often will not - install the 'multiarch' support necessary to run 32-bit applications on 64-bit Linux, so before too long I expect the 64-bit Linux edition of BBCSDL to become the 'standard' edition.
-
- Posts: 3
- Joined: Thu 22 Nov 2018, 23:43
Re: Multiwin not working in 0.26a
Many thanks for that - it's now running, with the small change that I had to change the variable for the window handle to a 64-bit one.
I understand that this is an experimental version, but I'm having problems with the debug window and compiling. Should I open new threads about these in the appropriate subforums?
I understand that this is an experimental version, but I'm having problems with the debug window and compiling. Should I open new threads about these in the appropriate subforums?
Re: Multiwin not working in 0.26a
I don't think that would achieve anything. The dependence of the debugger/profiler (and some other features) on there being an assembler has been discussed at length previously; the view was expressed by somebody that BBC BASIC no longer needs an assembler, but the loss of those features is a high price to pay (I know that in principle it might be possible to compile a position-independent 'binary blob' in something like C, but I don't have the experience to know how to do it).
The problem is well understood, but solutions are hard to find.