¿ªÔÆÌåÓý

Re: TXTLIB and Stack Question
OK, so here's a small C program I found on the sixpack, a variant of the common hello world program: #include <stdio.h> int main(int argc, char * argv[]) { printf("Good morning... from HELLO!\n"); }
By Steven Fosdick · #469 ·
Re: TXTLIB and Stack Question
When a small small child first learns to read, when each letter is mouthed out slowly, every now and then a word is recognised, sometimes even correctly! Like that child I recognise that there is
By adriansutherland67 · #468 ·
Re: TXTLIB and Stack Question
What he said. First off, you can have more than one base register; a reentrant module generally will have at least two: One for the code and one for data. Secondly, you can always load/compute the
By Drew Derbyshire · #467 ·
Re: TXTLIB and Stack Question
Do not speculate on that which can be known for certain. (Benchmark it.) -- Drew Derbyshire "What if they had a <flame> war and nobody came?" -- The Grey-eyed Elf
By Drew Derbyshire · #466 ·
Re: TXTLIB and Stack Question
Folks, The assembler output from the ¡°C¡± compiler is not like the assembler that you normally write. If I remember properly it uses lots of tricks so you don¡¯t hit the 4K addressability limit,
By Dave Wade · #465 ·
Re: TXTLIB and Stack Question
I don¡¯t think you do. Look at the generated code Dave Sent: 28 February 2020 11:55 To: [email protected] Subject: Re: [h390-vm] TXTLIB and Stack Question
By Dave Wade · #464 ·
Re: TXTLIB and Stack Question
To be honest my ability with s/370 assembler is less than hopeless! Remember a pointer (the address) of a local variable is passed around. Presumably absolutely as the stack pointer is not constant.
By adriansutherland67 · #463 ·
Re: TXTLIB and Stack Question
Why? I think it just loads the address into a register and uses a zero offset¡­. ¡­ look at the generated code¡­ Dave Sent: 28 February 2020 07:01 To: [email protected] Subject: Re: [h390-vm]
By Dave Wade · #462 ·
Re: TXTLIB and Stack Question
Sounds very slow! :-) Anyway, for VM/370 I will be kind of up for making the stack size configurable (on a per module basis) and dynamically allocated from the heap. Dynamically growing the stack is
By adriansutherland67 · #461 ·
Re: TXTLIB and Stack Question
Refer to page 21-22 of http://www.bitsavers.org/pdf/ibm/370/princOps/GA22-7000-4_370_Principles_Of_Operation_Sep75.pdf; the short answer is because any instruction using a base register and a
By Drew Derbyshire · #460 ·
Re: TXTLIB and Stack Question
Thanks - I was not aware that I had a 4k limit for local variables in a function, so useful!
By adriansutherland67 · #459 ·
Re: TXTLIB and Stack Question
Windows did something similar too. I am not aware of any implementation of such a scheme where, in a language such as C, it remains hidden from the programmer by the compiler. That means both user
By Steven Fosdick · #458 ·
Re: TXTLIB and Stack Question
<adrian@...> wrote: 360/370 instructions that access memory are base register+displacement or base register+index register+displacement. The displacement is 12 bits so can only
By Steven Fosdick · #457 ·
Re: TXTLIB and Stack Question
Thanks for the details David, useful. One correction, in the updated version of GCCLiB, the guys determined the base address of the table by dynamically asking RESLIB on startup which is much more
By adriansutherland67 · #456 ·
Re: TXTLIB and Stack Question
To do this GCC would need to be using a base register for all memory access (I.e an offset from a register). I don't know if it does, I suspect not.? Interestingly (?) the classic Mac had a complex
By adriansutherland67 · #455 ·
Re: TXTLIB and Stack Question
Can you please explain the 4k addressability point, I don't know what that means. Thank you. As for the overhead, the big problem is having a really efficient way to determine (each time you move the
By adriansutherland67 · #454 ·
Re: TXTLIB and Stack Question
On 2/27/20 9:53 AM, Dave Wade wrote: > >> -----Original Message----- >> From: [email protected] <[email protected]> On Behalf Of Drew >> Derbyshire >> Sent: 27 February 2020 01:05 >> To:
By Drew Derbyshire · #453 ·
Re: TXTLIB and Stack Question
I should all the stuff in the non-resident GCCLIB is to get around TXTLIB restrictions. The way we normally use CMS is to issue a "LOAD" command which loads a TEXT deck or decks and resolves missing
By Dave Wade · #452 ·
Re: TXTLIB and Stack Question
Dave,?The "getmain" usage in this thread is my fault. I had a senior moment and couldn't recall the native macro name and used "getmain" instead as I felt that it is a widely recognized for
By gdblodgett · #451 ·
Re: TXTLIB and Stack Question
By Dave Wade · #450 ·