[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1596.0. "Basic STACK command question" by VTHRAX::KIP (No Dukes.) Mon Aug 15 1988 20:21

    I've heard that when one is issuing commands from a CLI, that each
    command uses the same stack as is used by that CLI.  I've also heard
    that each command gets its own stack, separate from the CLI's. 
    Which is true?
    
    Given the answer to the above, when one issues, say, "STACK 10000"
    from a CLI, does the CLI's stack grow?  What stack size do any
    subsequent commands get when issued from the same CLI?
    
    I realize this sounds like a simple question yet I can't find a
    clear explanation of it anywhere.
    
    Thanks.
T.RTitleUserPersonal
Name
DateLines
1596.1STACK only affects what the CLI runsSTAR::BANKSIn Search of MediocrityMon Aug 15 1988 21:0618
    When you say "STACK 10000", nothing happens to the CLI's stack.
    The change comes when you actually run something from the CLI after
    issuing that command.
    
    When you run something under the CLI (usually by typing its program
    name), the CLI will create a stack containing as many bytes as
    specified by the STACK command (the last time it was issued), and
    call the application using that stack.  (Actually, I'm fibbing a
    bit as some of this is hidden in the EXECUTE call and/or RUN command,
    as well as other obscure and undocumented routines in dos.library.)
    
    Thus, if you're running one of those memory monitor programs and
    type "STACK {very large}", you'll note that the memory monitor will
    show about the same memory usage as it did before you typed the
    command (allowing for the memory used while "STACK" was running,
    and released when STACK exits).  Then when you actually run something,
    you'll see the loss of memory indicating the size of the program
    loaded as well as the size of the stack you asked for.