[net.micro] UCSD P-System: Info needed on GETCMD interface and chain.

rik@uf-csg.UUCP (Rik Faith [guest]) (09/10/84)

In an attempt to write a customized SYSTEM.MENU, I found CHAINing
to a SYSTEM.xxx file results in an 'illegal filename' error, which seems
to be returned by some routine in the GETCMD unit.

I need information about getting around this restriction (patches?)
or a copy of the user interface section to GETCMD and an outline of
how it sets up the environment and calls the program.

The P-System (ver 4.1) is being run on a SAGE IV (68k).  I have the sources
from Sage, but not the proprietary P-System sources.  Does anyone
know if the interface section to the units that run the P-System are
copyright restricted or where I might obtain them?

Thanks in advance,
-- 

			Rik Faith
			University of Florida, Gainesville
			(UUCP: ..!akgua!uf-csv!uf-csg!rik)

julian@ecsvax.UUCP (09/21/84)

>In an attempt to write a customized SYSTEM.MENU, I found CHAINing
>to a SYSTEM.xxx file results in an 'illegal filename' error, which seems
>to be returned by some routine in the GETCMD unit.
>
>I need information about getting around this restriction (patches?)
>or a copy of the user interface section to GETCMD and an outline of
>how it sets up the environment and calls the program.
>
>The P-System (ver 4.1) is being run on a SAGE IV (68k).  I have the sources
>from Sage, but not the proprietary P-System sources.  Does anyone
>know if the interface section to the units that run the P-System are
>copyright restricted or where I might obtain them?
====================================================

The UCSD utility DECODE will do the trick -- it dumps the interface section of
any Unit.  Find it in your Sage utilities, assuming you have a complete system.
You may need LIBRARY.CODE to extract GETCMD from the SYSTEM.LIBRARY.

Phil Julian             mcnc!ecsvax!julian

allyn@sdcsvax.UUCP (Allyn Fratkin) (09/24/84)

In article <uf-csg.159>, an unknown author writes:
> >In an attempt to write a customized SYSTEM.MENU, I found CHAINing
> >to a SYSTEM.xxx file results in an 'illegal filename' error, which seems
> >to be returned by some routine in the GETCMD unit.
> >
> >I need information about getting around this restriction (patches?)
> >or a copy of the user interface section to GETCMD and an outline of
> >how it sets up the environment and calls the program.
> >
> >The P-System (ver 4.1) is being run on a SAGE IV (68k).  I have the sources
> >from Sage, but not the proprietary P-System sources.  Does anyone
> >know if the interface section to the units that run the P-System are
> >copyright restricted or where I might obtain them?
> ====================================================

In article <3282@ecsvax.UUCP>, julian@ecsvax.UUCP writes:
> 
> The UCSD utility DECODE will do the trick -- it dumps the interface section of
> any Unit.  Find it in your Sage utilities, assuming you have a complete system.
> You may need LIBRARY.CODE to extract GETCMD from the SYSTEM.LIBRARY.
> 
> Phil Julian             mcnc!ecsvax!julian

This was did the answer the question.  The "decode" utility will only
"do the trick" if the unit *has* an interface section in the code file.
Operating system units do not.  (By the way, GETCMD is in SYSTEM.PASCAL,
not SYSTEM.LIBRARY, and LIBRARY.CODE is not needed.)

In any case, the reason GETCMD is complaining in the first place is that
after you give it a command name (e.g., SYSTEM.EDITOR), it attempts to
add the .CODE suffix.  SYSTEM.EDITOR.CODE is longer than 15 letters,
so it is an illegal filename.  To get around this, simply append a "."
to the name (e.g., SYSTEM.EDITOR.) and GETCMD will not add the .CODE
suffix.

To answer your other question, I doubt that interface sections for most
of the units would be available.  And setting up the operating environment
is very complicated, and I doubt that you would want to do it yourself.

You will never be able to chain to the compiler, if that is one of the things
you are after.  The operating system itself sets up a lot of the variables
including the input files, so the compiler doesn't (and can't) do that itself.

Send me mail if you have any more questions.
-- 
 From the virtual mind of Allyn Fratkin           sdcsvax!allyn@Nosc
                          UCSD Pascal Project     {ucbvax, decvax, ihnp4}
                          U.C. San Diego                    !sdcsvax!allyn

"Generally you don't see that kind of behavior in a major appliance."

milne@UCI-750A.ARPA (09/29/84)

From:  Alastair Milne <milne@UCI-750A.ARPA>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

In an attempt to write a customized SYSTEM.MENU, I found CHAINing
to a SYSTEM.xxx file results in an 'illegal filename' error, which seems
to be returned by some routine in the GETCMD unit.

I need information about getting around this restriction (patches?)
or a copy of the user interface section to GETCMD and an outline of
how it sets up the environment and calls the program.

The P-System (ver 4.1) is being run on a SAGE IV (68k).  I have the sources
from Sage, but not the proprietary P-System sources.  Does anyone
know if the interface section to the units that run the P-System are
copyright restricted or where I might obtain them?

Thanks in advance,
-- 

			Rik Faith
			University of Florida, Gainesville
			(UUCP: ..!akgua!uf-csv!uf-csg!rik)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

     I don't think you need the GETCMD interface, unless you need more 
from it than your message says.

     I suspect this is your problem:

     When a code file is specified for execution, either from the command 
line or by CommandIO's procedure Chain, GETCMD automatically appends the 
suffix '.CODE' to it, since almost all code files end in .CODE.  To execute
files whose name don't end in .CODE (such as SYSTEM.xxxx files), append 
a period to the name.  The period will be removed, and the extension .CODE 
will be suppressed.

     Example:     USES .., CommandIO, ..;
                     ....
                  BEGIN
                     ......
                     Chain('*SYSTEM.FILER.');
                                         ^  Note the period.

       Also, Chain, like the command line, executes from the PREFIXED 
volume, not the ROOT volume, unless a prefix is given as part of the 
file name.   Hence the "*" in the example above.

      I tried chaining without the dot (just before writing this message, 
so I could be sure I was right), and, as you say, it says "illegal filename".
I added the dot, and all was well.

      A final note, possibly trivial, possibly not.  I also tried doing this 
on the IBM PC with NCI's system IV.1B4h (Sage's is IV.12A)  Under IV.1B4h
I got the message "no such file as *system.filer.CODE".  Obviously the 
algorithm for finding files has been changed.  Who knows what else is 
different.
				
					Good luck

					Alastair Milne,
					Educational Technology Centre,
					University of California, Irvine

milne@UCI-750A.ARPA (09/29/84)

From:  Alastair Milne <milne@UCI-750A.ARPA>


   The p-System utility DECODE is a very useful tool.  I have used it 
extensively, and would not do without it.  Nevertheless, it can only show 
the interface of a unit which has its interface text included with it.
None of the units in SYSTEM.PASCAL has its interface (or God knows how big 
the system would be).  DECODE is therefore no good for showing them (unless
you want to look at the p-code of the unit itself, which is possible, but VERY
time consuming).

    Another thing only just occurred to me: I believe that GetCmd is just a 
segment procedure within the unit Kernel.  It therefore has no interface, and 
in fact cannot even appear in the Kernel's interface, since units cannot 
export segment routines.

    In any case, the original problem was to get CommandIO's routine 
Chain to chain to system files, and my previous message answered that.

    As a matter of general interest, the interfaces of several units in 
SYSTEM.PASCAL which may be useful for user programs (eg. ScreenOps, 
CommandIO, Kernel, etc.)  are available in a separate library, in case 
a user wants to compile with them.  (At least, this is true of NCI's release
for the IBM, and also of Sage's release, I think.  I don't know about anybody 
else).  The running program then uses the copy in SYSTEM.PASCAL.  I don't 
remember offhand just which units have interfaces available for them.

				Alastair Milne

				Educational Technology Center
				University of California, Irvine

rik@uf-csg.UUCP (Rik Faith [guest]) (10/04/84)

<>
DECODE will not provide the interface section of units which have had
the interface section removed, as has my GETCMD.  My request for the
interface section still stands.

To chain to system files, either chain('*SYSTEM.xxx[*]') or
chain('*SYSTEM.xxx.'), depending on the system you are using.

-- 

Rik Faith at the University of Florida, Gainesville
UUCP: ..!akgua!uf-csv!uf-csg!rik
[...bid Stars to shine, Vines to bear grapes, Water to seek its level...]