Digital Research PL/I-86 Question 
Author Message
 Digital Research PL/I-86 Question

I have used DR PL/I-86 from the beginning and have written a lot of
applications with it.  Finally, the other day I developed an application
where it would have been slicker to use the command line to pass along a
file name.

On page 32 of the original DR PL/I Programming Guide it states:

        "You can also specify $1 or $2 for both the filename and filetype.  $1
gets the first default name from the command line, $2 gets the second
default name."

The above sentences pertain to the discussion of the TITLE option during
file open.

I have tried to use this with no success and have tried several
variations on the theme in case I'm misinterpreting the documentation.
Has anyone every made this work?   Or is this a documented un-feature?



Tue, 07 Sep 2004 08:42:10 GMT  
 Digital Research PL/I-86 Question


Quote:
> I have used DR PL/I-86 from the beginning and have written a lot of
> applications with it.  Finally, the other day I developed an application
> where it would have been slicker to use the command line to pass along a
> file name.

> On page 32 of the original DR PL/I Programming Guide it states:

> "You can also specify $1 or $2 for both the filename and filetype.  $1
> gets the first default name from the command line, $2 gets the second
> default name."

> The above sentences pertain to the discussion of the TITLE option during
> file open.

> I have tried to use this with no success and have tried several
> variations on the theme in case I'm misinterpreting the documentation.
> Has anyone every made this work?   Or is this a documented un-feature?

I revised and extended the runtime and the library to fix some
bugs and add a feature or two. But this work of mine has now
laid dormant for about two years. Fixing the date and time functions,
documenting the interface to the OS, etc. Access to environment
variables was high on the list but never completed.

Although unfinished re-worked OCR'd scans of the manual are
available, online, I've never read through it all, and never had the
docs. So, I was unaware of this method of getting the command
line paramaters.

Here's the test program:

mytest:
    proc(cmdArgs, envBlk) options(main);

dcl
    cmdArgs char(127) var,
    envBlk char(127);

dcl
    (max, i, j) fixed bin,
    base_page_ptr ptr,
    1 base_page based (base_page_ptr),
      2 pad1 (32) fixed bin(15),
      2 psp_seg fixed bin(15);

dcl
    cmdLine_ptr ptr,
    cmdLine char(127) var based (cmdLine_ptr);

dcl
    dateNow char(6),
    timeNow char(9);

dcl
    junk_waffle fixed bin(7) static initial (20);

    dateNow = DATE();
    timeNow = TIME();
    put skip list (dateNow); put skip list (timeNow);
    put skip edit
(substr(dateNow,3,2),'/',substr(dateNow,5,2),'/',substr(dateNow,1,2))
(a(2),a,a(2),a,a(2));
    put skip edit
(substr(timeNow,1,2),':',substr(timeNow,3,2),':',substr(timeNow,5,2),'.',sub
str(timeNow,7,3))
                  (a(2),a,a(2),a,a(2),a,a(3));
    put skip list ('');

    unspec(cmdLine_ptr) = '0080'b4;
    put edit ('command line = ', cmdLine) (a);
    put skip list ('');

    unspec(base_page_ptr) = '0000'b4;
    put edit ('PSP segment = ', unspec(base_page.psp_seg),'h')
             (skip,a,b4(4),a);
    put skip list ('');

    i = length(cmdArgs);
    put edit ('cmdArgs = ', cmdArgs) (a);
    put skip list ('');

    put list ('env = ', envBlk);

    i = '12bc'b4;
    put edit ('i = ',unspec(i),'h') (skip,a,b4(4),a);

    return;

    end;          /* of main program */

The output under a Win2k console is:

C:\PLI86\BIN>mytest abd f g

020322
085608920
03/22/02
08:56:08.920
command line = abd f g

PSP segment = 0538h
cmdArgs = abd f g
env =
 ??? Format Overflow 2?0?

i = 12BCh
End of Execution
C:\PLI86\BIN>

I'd be happy to zip up what I've got and send it to you, but
I'll be unable to answer detailed questions as all my efforts
are focused on development of a simulator of the CDC 6400.

Regards,
-doug q



Tue, 07 Sep 2004 21:59:37 GMT  
 Digital Research PL/I-86 Question

Quote:
> I revised and extended the runtime and the library to fix some
> bugs and add a feature or two. But this work of mine has now
> laid dormant for about two years. Fixing the date and time functions,
> documenting the interface to the OS, etc. Access to environment
> variables was high on the list but never completed.

How can we get the revised runtime?  Do you have a
URL?
Quote:
> Regards,
> -doug q



Wed, 08 Sep 2004 06:45:37 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Digital Research PL/I for CP/M-86

2. Status of Intel PL/M-86 and ASM-86

3. Digital Research PL/1 Compiler

4. Digital research PL/I for DOS

5. WANTED: PL/I-86 compiler

6. how to use PL/I-86 v.1.0 compiler

7. Any PL/M-86 Gurus out there?

8. OT: anyone got PL/M-86

9. Logitech Modula-2/86 ver 3.x questions

10. 8088/86 Embedded Development Question

11. Question about TIP #86

12. *** Looking for CP/M-86 v1.0 (or CCP/M-86) and al. ***

 

 
Powered by phpBB® Forum Software