home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / z3shell / shells.msx < prev    next >
Encoding:
Text File  |  1993-06-08  |  4.5 KB  |  100 lines

  1. The following is a series of conversations that took place
  2. on the subject of ZCPR3 Shells, a powerful UNIX-like utility
  3. that seems much under-utilized. These messages were taken
  4. from the Ladera Z-Node using the ZCPR3 RECORD function.
  5.  
  6. Date: 15 Feb 86 18:55:16 PST
  7. From: JOHN POPLETT
  8. To:   AL HAWLEY
  9. Re:   SHELL GAMES
  10. Al,
  11.      I recently fooled with a program called LUP.PAS (a Turbo-
  12. Pascal version of LUX) that seemed to me to have the right idea
  13. in that it uses existing RCP/M utilities (LDIR, TYPEL, XMODEM/
  14. KMD) to do its job.  It doesn't require it's own versions of 
  15. these programs and that amounts to a considerably saving in cod
  16. e size.  LUP.PAS uses the command line buffer to create its 
  17. "menu" effects.  But wouldn't this work more effectively as a 
  18. shell?  And in any case, how do I begin writing programs that
  19. take advantage of these sort of goodies.  ZCPR3, I can see,
  20. presents a ripe opportunity to eliminate a lot of redundancy.
  21. What files do you recommend that I get to further my efforts?
  22. I'd like to be able to stick to 'C' and to MAC if possible.
  23. What do you recommend?
  24.  
  25.                          John Poplett (PPR MBBS)
  26.  
  27.  
  28. Date: 18 Feb 86 12:46:15 PST
  29. From: FRED HAINES
  30. To:   JOHN POPLETT
  31. Re:   Z3 shells
  32. John, 
  33.    I'm not quite sure what you are loking for from your
  34. message, but, if you're willing to run your program under
  35. the ZCPR3 OS, you can designate any *.COM file whatever as
  36. a shell with the Z utility SHSET.  What this does, essentially,
  37. is, when you leave program A, which you've designated as 
  38. your shell, to run program B, the minute you finish with B,
  39. A will reload automatically.  Beyond this, you can nest shells
  40. to several levels, and you can pass variables from one shell to
  41. another with SHVAR.  One of the glories of the Z environment is
  42. a fabulous flexibility to maintain and manipulate shells, and I
  43. doubt whether any of us have even begun to explore the vast
  44. range of possibilities of this.
  45.    If you're thinking about doing it in MS-DOS, I don't really
  46. know how you'd go about it, but you might be able to write a
  47. program that creates a shell stack, which is the feature of Z
  48. that makes all this possible.  You would want to set it up more
  49. or less like any normal stack, except - if I'm not mistaken -
  50. you would want to store not addresses in it, but the actual
  51. name of the program.  I guess that means storing the name
  52. upside down, pushing the last letter first, so when you popped
  53. the shell stack it would come out in the right order.  It would
  54. have to be a very complicated program though....
  55.  
  56.  
  57. Date: 22 Feb 86 18:38:44 PST
  58. From: SYSOP
  59. To:   JOHN POPLETT
  60. Re:   CHAINING/Z3 CMD BUF
  61. The documentation and code for chaining to another command on
  62. exit from BYE is contained in the file BYEMOD.LBR in the
  63. MODEM directory. It describes the modification to BYE, and
  64. contains a listing of the alias BYE chains to in my system.
  65. I'll try to u/l the file to you. The principle used is
  66. applicable to other programs as well, although the facilities
  67. of ZCPR3 are usually adequate to accomplish successive
  68. execution of programs without this kind of modification. The
  69. factor that makes this technique important with BYE is that
  70. BYE effectively 'cleans up' ZCPR3 buffers before exit in the
  71. cause of system integrity. That clean-up interferes with, for
  72. example, invoking BYE as a shell. If you have any questions,
  73. I'll try to answer intelligently..
  74.  
  75.  
  76. Date: 26 Feb 86 23:03:14 PST
  77. From: JOHN POPLETT
  78. To:   SYSOP
  79. Re:   Z3 SHELLS
  80. Al,
  81.      I wrote a provisional/experimental Z3shell this evening, a
  82. very simple matter. The prgm checks the shell stack and if no
  83. shell is active installs itself and prints a message to that
  84. effect (i.e. "Shell installed" a la SH.COM).  Then, I go to a
  85. endless loop which prints a command line prompt, gets the
  86. command line, stuffs it in the Z3 cmd buffer and executes.
  87. If a control-c is entered from the command line, the shell
  88. uninstalls itself and returns to CP/M.  You're BYEMOD code
  89. fragment was a big help.  I wrote a 'C' function in ASM with
  90. the fragment as a model.  Now here's a question: how do you 
  91. think I could leave the shell to execute the Z3 cmd buffer
  92. without a warmboot in between?  Right now, I'm playing it
  93. safe and jumping to warmboot at the end of the chain function.
  94. But I'd like to avoid the warmboot if possible. Is there a plac
  95. e in Z3 I can jump to simply to "load and go"???  
  96.  
  97.                     J. Poplett
  98. P.S.-If you want to see my code, I'll be happy to send it u
  99.  
  100.