Hi,
does anyone know why a C68 or QDOS-GCC generated program just returns doing nothing on a 128 KB QL?
Even a primitive "Hello world" program. Or even a program completely without console and only $64 dataspace that just POKES to the screen for test.
I also tried -codemodel=small and -datamodel=small without using the C library, which should avoid runtime relocation. Also didn't help.
Couldn't find something in the documentation saying a 128 KB QL was not a legitimate target.
All the best
Peter
Using C68 for 128 KB QL
Re: Using C68 for 128 KB QL
Does a "crespr"-linked file run?
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
-
- Font of All Knowledge
- Posts: 4655
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Using C68 for 128 KB QL
Hi
If you look in the C68 manual:
If you look in the C68 manual:
HARDWARE REQUIREMENTS
The one drawback of the C68 Compilation System is that it will not run on an unexpanded QL. The minimum requirements are 256Kb of memory and at least one 720Kb floppy disk drive. Additional memory and/or disk drives are highly desirable.
Regards,
Derek
Derek
Re: Using C68 for 128 KB QL
Derek, I don't run the compilation system on an unexpanded QL.
Just trying to run a minimal C68 or QDOS-GCC compiled executable.
But I might have found the issue:
For reasons beyond me, the empty code is 10 KB.
On top of that, C68 defaults to 4 KB stack + 4 KB minimum heap incrementing in steps of 4 KB + 20 KB.
Total at least 38 KB. That seems too much with TK2 and a 8 MB SD card image.
(I noticed mysterious dependencies on TK2 with my original application, that's why it is loaded.)
Just trying to run a minimal C68 or QDOS-GCC compiled executable.
But I might have found the issue:
For reasons beyond me, the empty code is 10 KB.
On top of that, C68 defaults to 4 KB stack + 4 KB minimum heap incrementing in steps of 4 KB + 20 KB.
Total at least 38 KB. That seems too much with TK2 and a 8 MB SD card image.
(I noticed mysterious dependencies on TK2 with my original application, that's why it is loaded.)
Re: Using C68 for 128 KB QL
My reason for asking whether a crespr version works was to find out where the executable fails - if a crespr version works, that means the program does not fail somewhere in the libraries, but rather in the crt startup code. It's likely then that the code that is exiting is somewhere in "crtjob.x", the main part that differs when you build a resident vs. a job executable.
If you start the offending job with EXEC_W instead of EXEC, do you get any meaningful error message?
If you start the offending job with EXEC_W instead of EXEC, do you get any meaningful error message?
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
-
- Font of All Knowledge
- Posts: 4655
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Using C68 for 128 KB QL
My apologies for misunderstaning your question.Peter wrote: Sat Dec 30, 2023 5:01 pm Derek, I don't run the compilation system on an unexpanded QL.
Just trying to run a minimal C68 or QDOS-GCC compiled executable.
But I might have found the issue:
For reasons beyond me, the empty code is 10 KB.
On top of that, C68 defaults to 4 KB stack + 4 KB minimum heap incrementing in steps of 4 KB + 20 KB.
Total at least 38 KB. That seems too much with TK2 and a 8 MB SD card image.
(I noticed mysterious dependencies on TK2 with my original application, that's why it is loaded.)
A 128K QL has only 96K of ram left, without Toolkit 2.
The 8 MB SD Card, needs ram for the drive map, there will not be much ram left for the user programme.
Regards,
Derek
Derek
Re: Using C68 for 128 KB QL
No. But one can set _stack, _mneed, _memincr and _memqdos global variables to control memory allocation.tofro wrote: Sat Dec 30, 2023 5:05 pm If you start the offending job with EXEC_W instead of EXEC, do you get any meaningful error message?
Adjusting these allowed my program to run - now even with text window.
Unfortunately it runs significantly slower than with memory expansion, probably due to the slow internal RAM.