Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.
Hi all. I solved it temporary, but I faced today an error with the OSDK related with a too high number of #defines. I know this, because I simply commented some I did not need, and it worked.
I am not sure if it is cpp which is producing the error, but I guess so. The error message is:
fa77:no more memory error
Dbug, I guess it is related with the size of an internal table, but anyway it should be changed to something practically unlimited
EDIT: I traced the error in the sources of xa. It is flagged as E_OUT_OF_MEMORY whenever a number of entries (I think) is greater than a constant ANZDEF, defined in xah.h as
The comments are clear in German :
"ANZDEF" = Anzahl der Defines = Number of defines
"mal 14" = multiplication by 14
Else, as workaround I can recommend you to use C pre-processor before XA.
I added permanently "cpp" to my OSDK toolchain and it's called by make.
I use an old version like this one here: https://dev.w3.org/Amaya/cpp/
If you need I can zip and my version of these sources or I can try to compile them for Windows.
Thanks iss, now I understand . My comments are usually even more obscure.
I solved the error for now, but I think it's better to patch this, so it does not become an issue. It is probably a limit of using 16bit signed integers, but visual studio has been using 32 bit integers for quite some time... If I am not mistaken.
iss wrote:Else, as workaround I can recommend you to use C pre-processor before XA.
I added permanently "cpp" to my OSDK toolchain and it's called by make.
I use an old version like this one here: https://dev.w3.org/Amaya/cpp/
If you need I can zip and my version of these sources or I can try to compile them for Windows.
There is a CPP already in the bin folder of the OSDK (It's used before the C compiler is called, and also to apply the macros.)
Did you miss it, or is it that it did not work for what you needed?
cpp.exe -v
GNU CPP version 2.8.1 (80386, BSD syntax)
But now I recall the case...
Because I'm using Linux and cpp's sources are missing in the svn,
I found them (the same version 2.8.1) from somewhere on the net and added them, so I can fully recompile OSDK for Linux.
I guess we could totally have the cpp sources in the osdk source tree on SVN, assuming there's no licencing issues and that it's not a monster that drags 20 billions dependencies?
In any case, XA is not using cpp but it's own preprocessing, and I am not sure they are fully compatible or if there will be any kind of lateral effect.
As I use assembly only, I'd be very grateful if this one is fixed please? <insert begging here>
This new defines are OK by me.
One curious detail: Can you guess what is the maximum usable value for ANZDEF?
It's exactly 89557
I used generated file with 100,000 defines and after some trial-and-error found this limit.
If "#define ANZDEF 89558" the program exits with "Segmentation fault".
Else, for cpp sources - I think it's not worth to bother with them.
What still puzzles me is - from where I've got these sources?!? maybe it was from LCC65...
I was starting to need it badly. A single more #define and I got the error. I found a limit in the number of labels (I think) when developing 1337 and now this... but Dbug came to rescue