Re: TXTLIB and Stack Question
One does not require a stack pointer register to have a stack. One has to have a convention of how you point to the stack. R13 is the current save area.? If you use a new save area (and put local
By
Drew Derbyshire
·
#430
·
|
Re: TXTLIB and Stack Question
Its called the C calling convention (so you can google it) I think GCCMVS uses either R13 or R14 for the stack pointer. So basically the program defines a bunch of space for its stack at the beginning
By
adriansutherland67
·
#429
·
|
Re: TXTLIB and Stack Question
As the mainframe did not have a stack until fairly late, I am curious as to how that is handled in GCC on VM/370. Simulating a stack without an instruction set to work upon it seems complex, if not to
By
[email protected]
·
#428
·
|
Re: TXTLIB and Stack Question
I guess that makes me a man since about 1982. What does knowing FORTRAN IV since 1977 do for my score? "C combines the power of assembler with the portability of assembler.'' - Anonymous If you want
By
Drew Derbyshire
·
#427
·
|
Re: TXTLIB and Stack Question
Yes - and in C I believe the standard is that the compiler initializes variables for you - this case it was some assembler code (which I consider a dark art!) As you know C uses a stack for local
By
adriansutherland67
·
#426
·
|
Re: TXTLIB and Stack Question
I don¡¯t understand. As I remember, we needed to make sure that for reentrant code, we coded it in a way that there were no storage areas that were not getmained and initialized by our code. You
By
[email protected]
·
#425
·
|
Re: TXTLIB and Stack Question
Its the linker that is the issue. Anyway "all" we have to do is pull out all the globals that BREXX use and put them in a struct. Each call (recursive/reentrant) to BREXX instanciates a struct object,
By
adriansutherland67
·
#424
·
|
Re: TXTLIB and Stack Question
I will need to read the old CMS books, but for MVS you¡¯ll need the list-versions of the macro¡¯s (MF=L) and map a getmained chunk of memory. Mike¡¯s original Rex interpreter code was reentrant
By
[email protected]
·
#423
·
|
Re: TXTLIB and Stack Question
I fear that is me! Local is good - its what I had assumed. Last question for a bit (promise) - does CMS generally load programs to the same address and not clear up memory between program launches? I
By
adriansutherland67
·
#422
·
|
Re: TXTLIB and Stack Question
My guess would be local as I don't see anything in the code to indicate that would be re-entrant or designed to be loaded resident, but I will defer to the current maintainers.? A shared stack is
By
gdblodgett
·
#421
·
|
Re: TXTLIB and Stack Question
I agree that Assembler is harder than most languages, but some would say that "it separates the men from the boys".? As far a C being friendly, I guess that is in the eye of the beholder. BASIC and
By
gdblodgett
·
#420
·
|
Re: TXTLIB and Stack Question
So does this mean that the stack is local to each instance of the program? I.e. if 2 programs link with GCCLIB will they have the same stack, or not? Presumably if the stack was defined as part of the
By
adriansutherland67
·
#419
·
|
Re: TXTLIB and Stack Question
No - it was ARGVARGS - (too similar names - I hate it). Anyway bug fixed :-) So my general policy will be to ignore this file as too hard - but maybe one day replace the parameter bits with some nice
By
adriansutherland67
·
#418
·
|
Re: TXTLIB and Stack Question
Thanks Gary hope you had a good coffee! I am trying the fix now - it is?ARGSTRNG that I need to clear (dyslexia). You are right that ARGVARS is big enough - but ARGSTRNG?needs to hold spaces ... and
By
adriansutherland67
·
#417
·
|
Re: TXTLIB and Stack Question
Hi Adrian, OK, I've had enough coffee and am awake now.? LOL Yes, the MVI & MVC combination is pretty much the norm for clearing/initializing memory.? I've seen other ways, but I'll not cloud the
By
gdblodgett
·
#416
·
|
Re: TXTLIB and Stack Question
Hi Adrian,Assembler can be cryptic at times but so can C.The DS in the MAINSTK statement means Define Storage.? The 32000F states that variable 32000 "F"s in size.? With "F" meaning a full word (4
By
gdblodgett
·
#415
·
|
Re: TXTLIB and Stack Question
OK - So I understand the issue now with PLIST, basically I would need to add after line 253. This makes sure that the proper end of the token is found even is some preexisting junk is there in the
By
adriansutherland67
·
#414
·
|
TXTLIB and Stack Question
Hello I am chasing down a bug in CMSLIB whereby (TBC) the last argument to main() is not properly null terminated if it is 8 chars long and a previous C command had a longer program name (note that
By
adriansutherland67
·
#413
·
|
Re: CTCE on the same host with unique ports
Please note that my personal development fork ( https://github.com/Peter-J-Jansen/spinhawk ) of the spinhawk repository ( https://github.com/rbowler/spinhawk ) is available for anyone who wishes to
By
Peter Jansen
·
#412
·
|
Re: CTCE on the same host with unique ports
If you point me at your next CTCE Spinhawk version when it's public (github?), I'll beta test.? :-) -- Drew Derbyshire "A hobbit will get you through times of no bagels better than bagels will get
By
Drew Derbyshire
·
#411
·
|