¿ªÔÆÌåÓý

GCCLIB Build Update and Questions


 

The current state of play is @ (note in the feature/no-dostran branch).

  1. 0.6 version code and changes for NO DOSTRAN
  2. CMSStdIo - CMSConsoleWrite had the wrong number of params (?!)
  3. Fixed build scripts - it builds on CMSUSER - Disk F Source, Disk E Target
  4. Added the new assemble files to the build script and vtable
  5. Note that there were no changes to c code in the NODOSTRAN source ??
  6. Note that there were no updated build scripts in the NODOSTRAN source ??
  7. It builds but does not really run - missing symbols - see below
  8. I believe that we have some missing source code changes. I have scan reviewed that ASSEMBLE. The NODOSTRAN changes seem to have been applied to all. Just feels that there is something wrong - for example why did I need to fix cmsstdio ... looking at the missing symbols - my theory is I am missing some c files ...

This is the binaries from the tape

GCCLIB?? MACLIB?? E1? F??? 80??? 436???? 44? 2012-05-08 17:30? CMS193
GCCLIB?? TEXT???? E1? F??? 80?? 1623??? 163? 2012-05-08 17:34? CMS193
GCCLIB?? TXTLIB?? E1? F??? 80?? 1218??? 122? 2012-05-08 17:34? CMS193
GCCLIB_S TXTLIB?? E1? F??? 80?? 1640??? 164? 2012-05-08 17:34? CMS193

This is the binaries from my build

GCCLIB?? MACLIB?? E1? F??? 80??? 434???? 44? 2020-01-06 11:35? CMS193
GCCLIB?? TXTLIB?? E1? F??? 80?? 1514??? 152? 2020-01-06 11:36? CMS193
GCCRES?? TXTLIB?? E1? F??? 80?? 1207??? 121? 2020-01-06 11:36? CMS193
GCCLIB?? TEXT???? E1? F??? 80?? 1510??? 151? 2020-01-06 11:36? CMS193

Mine are smaller ....

Why is the file name different - is it just a question of renaming GCCRES to GCCLIB_S - why the change?

Look at the output when I try and load it

GLOBAL TXTLIB GCCLIB
Ready; T=0.01/0.01 14:31:49
RESLIB LOAD GCCLIB (NAME GCCLIB
THE FOLLOWING NAMES ARE UNDEFINED:
?CMSINI?? FGETPO?? FREE???? FSEEK??? FSETPO?? FSPOIN?? LOCALC?? MALLOC
?REWIND?? STRICM?? STRLWR?? STRUPR
Ready(00004); T=0.01/0.03 14:31:57
???
GLOBAL TXTLIB GCCLIB? GCCRES
Ready; T=0.01/0.01 14:33:56
RESLIB LOAD GCCLIB (NAME GCCLIB
THE FOLLOWING NAMES ARE UNDEFINED:
?CMSINI?? FGETPO?? FSETPO?? FSPOIN?? LOCALC?? STRICM?? MAIN
Ready(00004); T=0.02/0.03 14:34:08

I think I am missing something ... or (and this is very possible) I am being stupid! :-)

Finally, In STDIO I mostly see some lines like
__asm__(LOADCRAB : "=d" (theCRAB));
but there is one like
__asm__("L %0,72(13)" : "=d" (theCRAB));???
Is this just a bug do folks think?


 

The new assemble files kind of needed a new c file too - kind of - so

If we look at free for example in stdlib.c
// Note:? free is implemented as a macro.? See stdlib.h.
// void free(void * ptr)
// /***/
// /* void free(void * ptr)????????????????????????????????????????????????????????????????????????? */
// /*??????????????????????????????????????????????????????????????????????????????????????????????? */
// /* Frees the previously allocated memory pointed to by 'ptr'.???????????????????????????????????? */
// /***/
// {
// if (ptr != NULL) CMSmemoryFree(ptr);
// return;
// }???????????????????????????????????????????????????????????????????????????????????? // end of free

but in stdlib.h there is just a normal function prototype!

In cmssys.h we have: #define CMSmemoryFree(s1) (__dmsfrt((s1)))

And in CMSSYS ASSEMBLE we do find it
?*
?* @@DMSFRT? Entry Point?????????????????????????????????????????????? *
?* Release allocated memory.?????????????????????????????????????????? *
?*???????????????????????????????????????????????????????????????????? *

But I am guessing - do I just add a macro to stdlib.h or uncomment in the code in stdlib.c - what was the plan?

Does anyone have a copy of the c code or header files .... please!


 

OK you asked what happens. Well what should happen is that the SYSPROF calls RESLIB which loads "GCCLIB TEXT" into memory. This contains the real "C" library.?
It then patches the CMS Nucleus to point to the jump table at the start of the code....

... CMSLIB TXTLIB should contain the assembler stubs and gets loaded with the program.?

?Dave
P.S. Not keeping up with this as I am doing my year end clean up....?

On Mon, 6 Jan 2020 at 18:17, adriansutherland67 <adrian@...> wrote:
The new assemble files kind of needed a new c file too - kind of - so

If we look at free for example in stdlib.c
// Note:? free is implemented as a macro.? See stdlib.h.
// void free(void * ptr)
// /***/
// /* void free(void * ptr)????????????????????????????????????????????????????????????????????????? */
// /*??????????????????????????????????????????????????????????????????????????????????????????????? */
// /* Frees the previously allocated memory pointed to by 'ptr'.???????????????????????????????????? */
// /***/
// {
// if (ptr != NULL) CMSmemoryFree(ptr);
// return;
// }???????????????????????????????????????????????????????????????????????????????????? // end of free

but in stdlib.h there is just a normal function prototype!

In cmssys.h we have: #define CMSmemoryFree(s1) (__dmsfrt((s1)))

And in CMSSYS ASSEMBLE we do find it
?*
?* @@DMSFRT? Entry Point?????????????????????????????????????????????? *
?* Release allocated memory.?????????????????????????????????????????? *
?*???????????????????????????????????????????????????????????????????? *

But I am guessing - do I just add a macro to stdlib.h or uncomment in the code in stdlib.c - what was the plan?

Does anyone have a copy of the c code or header files .... please!


 

On Mon, Jan 6, 2020 at 06:43 PM, Dave Wade wrote:
my year end clean up....?
Enjoy!


 

On Mon, Jan 6, 2020 at 06:17 PM, adriansutherland67 wrote:
But I am guessing - do I just add a macro to stdlib.h or uncomment in the code in stdlib.c - what was the plan?
After thought, the guys would not have added the stubs if they intended to carry on using define/macro so I am reenabling the c code.

Works with free and malloc - so I will continue :-)??