Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"Irrationality is the square root of all evil" -- Douglas Hofstadter


devel / comp.os.cpm / Re: PL/1 on CPM

SubjectAuthor
* PL/1 on CPMrwd...@gmail.com
`* PL/1 on CPMPhil G
 +* PL/1 on CPMUdo Munk
 |`* PL/1 on CPMPhil G
 | `* PL/1 on CPMPhil G
 |  `* PL/1 on CPMPhil G
 |   `- PL/1 on CPMPhil G
 `- PL/1 on CPMrwd...@gmail.com

1
Re: PL/1 on CPM

<7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4574&group=comp.os.cpm#4574

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ac8:57d3:0:b0:31d:2522:53bd with SMTP id w19-20020ac857d3000000b0031d252253bdmr11235723qta.173.1657472618169;
Sun, 10 Jul 2022 10:03:38 -0700 (PDT)
X-Received: by 2002:a9d:6344:0:b0:61c:18cb:5f18 with SMTP id
y4-20020a9d6344000000b0061c18cb5f18mr5805566otk.197.1657472617814; Sun, 10
Jul 2022 10:03:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 10:03:37 -0700 (PDT)
In-Reply-To: <t74d43$1nmg$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c6:e205:4e01:6133:aca9:d9b:2ffc;
posting-account=QRaRpQoAAAAAa6T9BMU2_8duN2L8AmC_
NNTP-Posting-Host: 2a00:23c6:e205:4e01:6133:aca9:d9b:2ffc
References: <t74d43$1nmg$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
Subject: Re: PL/1 on CPM
From: rwdeane@gmail.com (rwd...@gmail.com)
Injection-Date: Sun, 10 Jul 2022 17:03:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 294
 by: rwd...@gmail.com - Sun, 10 Jul 2022 17:03 UTC

On Tuesday, 31 May 2022 at 07:37:59 UTC+1, Paul Richards wrote:
> I'm running Digital Research PL/1-80 compiler on CP/M 2.2 in the SIMH
> Altair Z80 simulator. I have typed in a sample program from the DR PL/1
> Language Programmers Guide. I've typed it in accurately - as far as I
> can see - but I keep getting an error on the last line of the program.
> Can anyone provide an explanation please? Thanks in advance.
>
> ....
>
> Program code:
>
> B>type sample.pli
> sample:
> procedure options(main);
> declare
> c character(10) varying;
>
> do;
> put skip list('Input: ');
> get list(c);
> c = upper(c); /* function reference */
> put skip list('Output: ',c);
> end;
>
> begin;
> declare
> c float binary;
>
> put skip list('Input ');
> get list(c);
> call output(c); /* subroutine invocation */
> end;
>
> upper:
> procedure(c) returns(character(10) varying);
> declare
> c character(10) varying;
>
> return(translate(c,'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
> 'abcdefghijklmnopqrstuvwxyz'));
> end upper;
>
> output:
> procedure(c);
> declare
> c float binary;
>
> put skip edit(c) (column(20),e(10,2));
> end output;
>
> end sample;
> B>
>
> Compilation output:
>
> B>pli sample.pli
>
>
>
> PL/I-80 V1.0, COMPILATION OF: SAMPLE
>
>
> 39 b end sample;
> SYNTAX ?
> UNEXPECTED EOF
> B>
=============================================================================================================================================================================For anyone interested in PLI-80 I attach a sample simple hexdump program, it uses a lot of features of the language, including on-error blocks. It is not the best hexdump program, just something to practice with PLI.

enjoy
Richard

hexd-101.pli

/*
This program has been inspired by hexdump.pas in COMPLETE TURBO PASCAL 5.0
by Jeff Duntemann (1988)
Converted to PLI-80 by Richard Deane (2019) and openly offered to the public domain
I ported it across to PLI-80 as an exercise in relearning PLI
It is offered as is, with no claim to follow good programming practice, nor any guarantee
of correct behaviour.

The hex to display-text conversion is performed using an in-built PLI formatting
capability on the "put edit" statement; however this only works for bit string output.

I find PLI-80 to be a very powerful, flexible and complete language, especially with
respect to conversion of data types.

I converted hexdump.pas between several versions of pascal and attempted a conversion to
Modula2 but got blocked by the inability to convert from string to text. I did not have
these problems with PLI-80 (update FTL HISOFT Modula 2 is much better than the ones i tried back then)

Some comments on features used in the program:

1) $1.$1 and $2.$2 are very useful pseudo constants that can be passed from command line
to file open statements; you can't access them in between in other pli-80 language statements.

2) Any error in the command line parameters to select file handling can be picked up by
"on error" blocks activated by file open.
Initially I had these tidily at the end of the program but they didn't work as expected.
By placing them just before the code that might cause an "on error" condition,
I found that they did work, but I have not properly deduced the rules yet.
I experimented with containing "begin end" blocks but was not able to come to a firm conclusion.

I expected to enhance this program to detect the "space" key so that I could pause the display
but discovered that one cannot mix direct cp/m bios/bdos console commands (status, char-in
and char-out) with pli-80 useage of "List" stream, so I reverted to just using the "List" stream

If you wish to use PLI-80 there are pdf's available of the language reference and programmer's guide
and very relevant notes in the pli-80 v1.4 distribution. You may need pli-80 v1.3 for additional examples.
The Digital Research Link-80 guide is also essential.

If you are experienced in Pascal and using PLI-80 then be cautious of your "begin end" statements,
it is so easy to forget to put the ";" after "begin"

To build this program you need to run (under either CP/M 2.2 or CP/M 3):
rmac cpmdio
pli hexdump
link hexdump,cpmdio

*/
/********************************************************************************/
hexdump: proc options(main);
%replace
false by '0'b,
true by '1'b;

%replace max_args by 4;
%replace arg_length by 16;

dcl
EOF bit(1) static initial(false),
processdata bit(1),
(I,J,K) fixed binary,
ch char,
(dumpfile, listing) file,
diskdata(128) bit(8);

%include 'diomod.dcl';

dcl
c char(1),
blank char(16) static initial(''),
v char(254) varying;
dcl
(dfcb0v, dfcb1v, dbuffv) pointer,
command char(127) varying based (dbuffv),
1 fcb0 based(dfcb0v),
2 drive fixed(7),
2 name char(8),
2 type char(3),
2 extnt fixed(7),
2 space (19) bit(8),
2 cr fixed(7),
1 fcb1 based(dfcb1v),
2 drive fixed(7),
2 name char(8),
2 type char(3),
2 extnt fixed(7),
2 space (19) bit(8),
2 cr fixed(7);

disp128:proc (cpmfilerecord);
dcl
(I,J,K) fixed binary,
ch character,
cpmfilerecord(128) bit(8);
Do I=0 TO 7; /* Do a hexdump of 8 lines of 16 chars */
Do J=0 TO 15; /* Show hex values */
put file(listing) edit(cpmfilerecord((I*16)+J+1))(x(1),b4(2));
END;
put file(listing) edit(' |')(a); /* Bar to separate hex & ASCII */
Do J=0 TO 15; /* Show printable chars or '.' */
unspec(ch)=cpmfilerecord((I*16)+J+1);
IF ((RANK(ch)<127) & (RANK(ch)>31)) THEN
put file(listing) edit(ch)(a);
ELSE put file(listing) edit('.')(a);
END;
put file(listing) edit('|')(a);
put file(listing) skip;
END;
Do I=0 TO 1;
put file(listing) skip;
END;
end disp128;

/* Main Program */
dfcb0v = dfcb0();
dfcb1v = dfcb1();
dbuffv = dbuff();
/* ************************* debug ************************
put edit ('Command Tail: ',command) (a);
put edit ('First Default File:',
fcb0.name,'.',fcb0.type) (skip,4a);
put edit ('Second Default File:',
fcb1.name,'.',fcb1.type) (skip,4a);
put edit ('dfcb0 ',unspec(dfcb0v),
'dfcb1 ',unspec(dfcb1v),
'dbuff ',unspec(dbuffv))
(5(skip,a(7),b4),skip,a(7),f(6));
********************************************************** */

on undefinedfile(dumpfile)
begin;
put skip list('ERROR: Incorrect filename for sourcefile');
put skip list('usage: hexdump filename.typ');
put skip list(' or hexdump filename.typ /C for output to
console');
put skip list(' or hexdump filename.typ /P for output to
printer (LST: device)');
put skip list(' or hexdump filename.typ filename.lst');
stop;
end;

on endfile(dumpfile)
begin;
EOF = true;
goto next;
end;

open file (dumpfile) record input sequential env(b(8192)) title('$1.$1');

on undefinedfile(listing)
begin;
put skip list('ERROR: Incorrect filename for listing');
put skip list('usage: hexdump filename.typ');
put skip list(' or hexdump filename.typ /C for output to
console');
put skip list(' or hexdump filename.typ /P for output to
printer (LST: device)');
put skip list(' or hexdump filename.typ filename.lst');
stop;
end;
if (fcb1.name = '/C' | fcb1.name = '/c' | fcb1.name= blank) then
begin;
open file (listing) print env(Locked,Buff(128))
TITLE('$CON') LINESIZE(80) PAGESIZE(0);
goto readloop;
end;
if (fcb1.name = '/L' | fcb1.name = '/P' | fcb1.name = '/l' |
fcb1.name = '/p') then
begin;
open file (listing) print env(Locked,Buff(128))
TITLE('$LST') LINESIZE(80) PAGESIZE(0);
goto readloop;
end;
open file (listing) print env(Locked,Buff(128))
TITLE('$2.$2') LINESIZE(80) PAGESIZE(0);
readloop:
do while(EOF = false);
read file(dumpfile) into (diskdata);
call disp128(diskdata);
next:
end;
on endfile(listing)
begin;
put skip list('ERROR: disk is full');
stop;
end;
end hexdump;


Click here to read the complete article
Re: PL/1 on CPM

<001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4575&group=comp.os.cpm#4575

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:620a:2992:b0:6ae:e8ff:b086 with SMTP id r18-20020a05620a299200b006aee8ffb086mr9694486qkp.494.1657487041623;
Sun, 10 Jul 2022 14:04:01 -0700 (PDT)
X-Received: by 2002:a4a:864b:0:b0:425:71ed:ada7 with SMTP id
w11-20020a4a864b000000b0042571edada7mr5456168ooh.92.1657487041299; Sun, 10
Jul 2022 14:04:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 14:04:01 -0700 (PDT)
In-Reply-To: <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c7:c289:b201:1910:a661:ceef:a78f;
posting-account=Z3G0ewoAAADQeHVqclO-pbZadEHNyq4R
NNTP-Posting-Host: 2a00:23c7:c289:b201:1910:a661:ceef:a78f
References: <t74d43$1nmg$1@gioia.aioe.org> <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com>
Subject: Re: PL/1 on CPM
From: philg@talk21.com (Phil G)
Injection-Date: Sun, 10 Jul 2022 21:04:01 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1460
 by: Phil G - Sun, 10 Jul 2022 21:04 UTC

Interesting, by chance do you have the two files cpmdio.mac and diomod.dcl please? (I'd like to compare diomod with philslib!)
Udo, in years of programming in PL/I I never realised all those years ago that it had been used by DR to create CP/M tools!
We live and learn!
Phil

Re: PL/1 on CPM

<7ce129bf-abe0-4b1c-95d5-bb40490a8ae4n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4576&group=comp.os.cpm#4576

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a0c:8cce:0:b0:473:26e3:8973 with SMTP id q14-20020a0c8cce000000b0047326e38973mr11503351qvb.24.1657489060194;
Sun, 10 Jul 2022 14:37:40 -0700 (PDT)
X-Received: by 2002:a05:6870:37c1:b0:10b:d3f0:3061 with SMTP id
p1-20020a05687037c100b0010bd3f03061mr237231oai.0.1657489060017; Sun, 10 Jul
2022 14:37:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 14:37:39 -0700 (PDT)
In-Reply-To: <001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=87.122.15.85; posting-account=RHtB3AoAAABZlu_FJY7ySUmJrtfW41bO
NNTP-Posting-Host: 87.122.15.85
References: <t74d43$1nmg$1@gioia.aioe.org> <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
<001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7ce129bf-abe0-4b1c-95d5-bb40490a8ae4n@googlegroups.com>
Subject: Re: PL/1 on CPM
From: udo.munk@freenet.de (Udo Munk)
Injection-Date: Sun, 10 Jul 2022 21:37:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3879
 by: Udo Munk - Sun, 10 Jul 2022 21:37 UTC

ph...@talk21.com schrieb am Sonntag, 10. Juli 2022 um 23:04:02 UTC+2:
> Interesting, by chance do you have the two files cpmdio.mac and diomod.dcl please? (I'd like to compare diomod with philslib!)
> Udo, in years of programming in PL/I I never realised all those years ago that it had been used by DR to create CP/M tools!
> We live and learn!
> Phil
I don't know what cpmdio.mac is, contents of diomode.dcl below.

dcl
memptr entry returns (ptr),
memsiz entry returns (fixed(15)),
memwds entry returns (fixed(15)),
dfcb0 entry returns (ptr),
dfcb1 entry returns (ptr),
dbuff entry returns (ptr),
reboot entry,
rdcon entry returns (char(1)),
wrcon entry (char(1)),
rdrdr entry returns (char(1)),
wrpun entry (char(1)),
wrlst entry (char(1)),
coninp entry returns (char(1)),
conout entry (char(1)),
rdstat entry returns (bit(1)),
getio entry returns (bit(8)),
setio entry (bit(8)),
wrstr entry (ptr),
rdbuf entry (ptr),
break entry returns (bit(1)),
vers entry returns (bit(16)),
reset entry,
select entry (fixed(7)) returns (bit(16)),
open entry (ptr) returns (bit(16)),
close entry (ptr) returns (bit(16)),
sear entry (ptr) returns (bit(16)),
searn entry returns (bit(16)),
delete entry (ptr) returns (bit(16)),
rdseq entry (ptr) returns (bit(16)),
wrseq entry (ptr) returns (bit(16)),
make entry (ptr) returns (bit(16)),
rename entry (ptr) returns (bit(16)),
logvec entry returns (bit(16)),
curdsk entry returns (fixed(7)),
setdma entry (ptr),
allvec entry returns (ptr),
wpdisk entry,
rovec entry returns (bit(16)),
filatt entry (ptr),
getdpb entry returns (ptr),
getusr entry returns (fixed(7)),
setusr entry (fixed(7)),
rdran entry (ptr) returns (bit(16)),
wrran entry (ptr) returns (bit(16)),
filsiz entry (ptr),
setrec entry (ptr),
resdrv entry (bit(16)) returns (bit(16)),
wrranz entry (ptr) returns (bit(16)),
testwr entry (ptr) returns (bit(16)),
lock entry (ptr) returns (fixed(7)),
unlock entry (ptr) returns (fixed(7)),
multis entry (fixed(7)) returns (fixed(7)),
ermode entry (bit(1)),
freesp entry (fixed(7)) returns (bit(16)),
chain entry returns (bit(16)),
flush entry returns (fixed(7)),
setlbl entry (ptr) returns (bit(16)),
getlbl entry (fixed(7)) returns (bit(8)),
rdxfcb entry (ptr) returns (bit(16)),
wrxfcb entry (ptr) returns (bit(16)),
settod entry (ptr),
gettod entry (ptr),
dfpswd entry (ptr),
sgscb entry (ptr) returns(bit(8));

Re: PL/1 on CPM

<10ff56f2-9b91-4175-a2d8-2df98c7be28en@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4577&group=comp.os.cpm#4577

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:622a:50b:b0:31e:b559:b36c with SMTP id l11-20020a05622a050b00b0031eb559b36cmr1787376qtx.323.1657490020609;
Sun, 10 Jul 2022 14:53:40 -0700 (PDT)
X-Received: by 2002:a05:6808:2381:b0:335:c94f:43ba with SMTP id
bp1-20020a056808238100b00335c94f43bamr5793379oib.158.1657490020312; Sun, 10
Jul 2022 14:53:40 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 14:53:40 -0700 (PDT)
In-Reply-To: <001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c6:e205:4e01:6133:aca9:d9b:2ffc;
posting-account=QRaRpQoAAAAAa6T9BMU2_8duN2L8AmC_
NNTP-Posting-Host: 2a00:23c6:e205:4e01:6133:aca9:d9b:2ffc
References: <t74d43$1nmg$1@gioia.aioe.org> <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
<001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <10ff56f2-9b91-4175-a2d8-2df98c7be28en@googlegroups.com>
Subject: Re: PL/1 on CPM
From: rwdeane@gmail.com (rwd...@gmail.com)
Injection-Date: Sun, 10 Jul 2022 21:53:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 24561
 by: rwd...@gmail.com - Sun, 10 Jul 2022 21:53 UTC

On Sunday, 10 July 2022 at 22:04:02 UTC+1, ph...@talk21.com wrote:
> Interesting, by chance do you have the two files cpmdio.mac and diomod.dcl please? (I'd like to compare diomod with philslib!)
> Udo, in years of programming in PL/I I never realised all those years ago that it had been used by DR to create CP/M tools!
> We live and learn!
> Phil

CPMDIO.ASM (not in MAC form, but assembles ok with rmac); it is on pli 1.4 disk 2
DIOMOD.DCL is further down this page:
note: please ensure that the data is terminated with a final CR or LF at end otherwise I find compilers often bork.
note: The doc for dr link80 is essential. Do not confuse with MS link-80
Cheers
Richard

<< CPMDIO.ASM >>
name 'CPMDIO'
title 'Direct CP/M Calls From PL/I-80'
; ;***********************************************************
;* *
;* CP/M calls from PL/I for direct i/o *
;* *
;***********************************************************
public memptr ;return pointer to base of free mem
public memsiz ;return size of memory in bytes
public memwds ;return size of memory in words
public dfcb0 ;return address of default fcb 0
public dfcb1 ;return address of default fcb 1
public dbuff ;return address of default buffer
public reboot ;system reboot (#0)
public rdcon ;read console character (#1)
public wrcon ;write console character(#2)
public rdrdr ;read reader character (#3)
public wrpun ;write punch character (#4)
public wrlst ;write list character (#5)
public coninp ;direct console input (#6a)
public conout ;direct console output (#6b)
public rdstat ;read console status (#6c)
public getio ;get io byte (#7)
public setio ;set i/o byte (#8)
public wrstr ;print string (#9)
public rdbuf ;read console buffer (#10)
public break ;get console status (#11)
public vers ;get version number (#12)
public reset ;reset disk system (#13)
public select ;select disk (#14)
public open ;open file (#15)
public close ;close file (#16)
public sear ;search for file (#17)
public searn ;search for next (#18)
public delete ;delete file (#19)
public rdseq ;read file sequential mode (#20)
public wrseq ;write file sequential mode (#21)
public make ;create file (#22)
public rename ;rename file (#23)
public logvec ;return login vector (#24)
public curdsk ;return current disk number (#25)
public setdma ;set DMA address (#26)
public allvec ;return address of alloc vector (#27)
public wpdisk ;write protect disk (#28)
public rovec ;return read/only vector (#29)
public filatt ;set file attributes (#30)
public getdpb ;get base of disk parm block (#31)
public getusr ;get user code (#32a)
public setusr ;set user code (#32b)
public rdran ;read random (#33)
public wrran ;write random (#34)
public filsiz ;random file size (#35)
public setrec ;set random record pos (#36)
public resdrv ;reset drive (#37)
public wrranz ;write random, zero fill (#40)
; ;
extrn ?begin ;beginning of free list
extrn ?boot ;system reboot entry point
extrn ?bdos ;bdos entry point
extrn ?dfcb0 ;default fcb 0
extrn ?dfcb1 ;default fcb 1
extrn ?dbuff ;default buffer
; ;***********************************************************
;* *
;* equates for interface to cp/m bdos *
;* *
;***********************************************************
cr equ 0dh ;carriage return
lf equ 0ah ;line feed
eof equ 1ah ;end of file
; readc equ 1 ;read character from console
writc equ 2 ;write console character
rdrf equ 3 ;reader input
punf equ 4 ;punch output
listf equ 5 ;list output function
diof equ 6 ;direct i/o, version 2.0
getiof equ 7 ;get i/o byte
setiof equ 8 ;set i/o byte
printf equ 9 ;print string function
rdconf equ 10 ;read console buffer
statf equ 11 ;return console status
versf equ 12 ;get version number
resetf equ 13 ;system reset
seldf equ 14 ;select disk function
openf equ 15 ;open file function
closef equ 16 ;close file
serchf equ 17 ;search for file
serchn equ 18 ;search next
deletf equ 19 ;delete file
readf equ 20 ;read next record
writf equ 21 ;write next record
makef equ 22 ;make file
renamf equ 23 ;rename file
loginf equ 24 ;get login vector
cdiskf equ 25 ;get current disk number
setdmf equ 26 ;set dma function
getalf equ 27 ;get allocation base
wrprof equ 28 ;write protect disk
getrof equ 29 ;get r/o vector
setatf equ 30 ;set file attributes
getdpf equ 31 ;get disk parameter block
userf equ 32 ;set/get user code
rdranf equ 33 ;read random
wrranf equ 34 ;write random
filszf equ 35 ;compute file size
setrcf equ 36 ;set random record position
rsdrvf equ 37 ;reset drive function
wrrnzf equ 40 ;write random zero fill
; ; utility functions
;***********************************************************
;* *
;* general purpose routines used upon entry *
;* *
;***********************************************************
; getp1: ;get single byte parameter to register e
mov e,m ;low (addr)
inx h
mov d,m ;high(addr)
xchg ;hl = .char
mov e,m ;to register e
ret
; getp2: ;get single word value to DE
getp2i: ;(equivalent to getp2)
call getp1
inx h
mov d,m ;get high byte as well
ret
; getver: ;get cp/m or mp/m version number
push h ;save possible data adr
mvi c,versf
call ?bdos
pop h ;recall data addr
ret
; chkv20: ;check for version 2.0 or greater
call getver
cpi 20
rnc ;return if > 2.0
; error message and stop
jmp vererr ;version error
; chkv22: ;check for version 2.2 or greater
call getver
cpi 22h
rnc ;return if >= 2.2
vererr:
;version error, report and terminate
lxi d,vermsg
mvi c,printf
call ?bdos ;write message
jmp ?boot ;and reboot
vermsg: db cr,lf,'Later CP/M or MP/M Version Required$'
; ;***********************************************************
;* *
;***********************************************************
memptr: ;return pointer to base of free storage
lhld ?begin
ret
; ;***********************************************************
;* *
;***********************************************************
memsiz: ;return size of free memory in bytes
lhld ?bdos+1 ;base of bdos
xchg ;de = .bdos
lhld ?begin ;beginning of free storage
mov a,e ;low(.bdos)
sub l ;-low(begin)
mov l,a ;back to l
mov a,d ;high(.bdos)
sbb h
mov h,a ;hl = mem size remaining
ret
; ;***********************************************************
;* *
;***********************************************************
memwds: ;return size of free memory in words
call memsiz ;hl = size in bytes
mov a,h ;high(size)
ora a ;cy = 0
rar ;cy = ls bit
mov h,a ;back to h
mov a,l ;low(size)
rar ;include ls bit
mov l,a ;back to l
ret ;with wds in hl
; ;***********************************************************
;* *
;***********************************************************
dfcb0: ;return address of default fcb 0
lxi h,?dfcb0
ret
; ;***********************************************************
;* *
;***********************************************************
dfcb1: ;return address of default fcb 1
lxi h,?dfcb1
ret
; ;***********************************************************
;* *
;***********************************************************
dbuff: ;return address of default buffer
lxi h,?dbuff
ret
; ;***********************************************************
;* *
;***********************************************************
reboot: ;system reboot (#0)
jmp ?boot
; ;***********************************************************
;* *
;***********************************************************
rdcon: ;read console character (#1)
;return character value to stack
mvi c,readc
jmp chrin ;common code to read char
; ;***********************************************************
;* *
;***********************************************************
wrcon: ;write console character(#2)
;1->char(1)
mvi c,writc ;console write function
jmp chrout ;to write the character
; ;***********************************************************
;* *
;***********************************************************
rdrdr: ;read reader character (#3)
mvi c,rdrf ;reader function
chrin:
;common code for character input
call ?bdos ;value returned to A
pop h ;return address
push psw ;character to stack
inx sp ;delete flags
mvi a,1 ;character length is 1
pchl ;back to calling routine
;
Click here to read the complete article

Re: PL/1 on CPM

<43f438e5-f039-49c6-acee-6864c63e767an@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4578&group=comp.os.cpm#4578

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:622a:551:b0:31d:c3da:fdd3 with SMTP id m17-20020a05622a055100b0031dc3dafdd3mr12104976qtx.559.1657490165871;
Sun, 10 Jul 2022 14:56:05 -0700 (PDT)
X-Received: by 2002:a05:6830:6618:b0:61c:4d55:dc9e with SMTP id
cp24-20020a056830661800b0061c4d55dc9emr795638otb.302.1657490165527; Sun, 10
Jul 2022 14:56:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!2.eu.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 14:56:05 -0700 (PDT)
In-Reply-To: <7ce129bf-abe0-4b1c-95d5-bb40490a8ae4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c7:c289:b201:1910:a661:ceef:a78f;
posting-account=Z3G0ewoAAADQeHVqclO-pbZadEHNyq4R
NNTP-Posting-Host: 2a00:23c7:c289:b201:1910:a661:ceef:a78f
References: <t74d43$1nmg$1@gioia.aioe.org> <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
<001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com> <7ce129bf-abe0-4b1c-95d5-bb40490a8ae4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <43f438e5-f039-49c6-acee-6864c63e767an@googlegroups.com>
Subject: Re: PL/1 on CPM
From: philg@talk21.com (Phil G)
Injection-Date: Sun, 10 Jul 2022 21:56:05 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 15
 by: Phil G - Sun, 10 Jul 2022 21:56 UTC

On Sunday, July 10, 2022 at 10:37:40 PM UTC+1, Udo Munk wrote:
>I don't know what cpmdio.mac is...

cpmdio.mac is the assembler file that does all the low level stuff that PL/I cant, it will have an assembler routine for every entry in the cpmdio.dcl declare file.
Effectively, its doing all the work and all the PPL/I part does is fancy formatting - which it was very good at, its main use during my time at BT.
The build sequence:
rmac cpmdio
pli hexdump
link hexdump,cpmdio

rmac is the relocating macro assembler which produces cpmdio.obj
pli hexdump compiles hexdump.pli to hexdump.obj, and
link hexdump,cpmdio creates the .com file by linking the two obj modules and resolving 'real' addresses.

Cheers
Phil

Re: PL/1 on CPM

<9ae19258-f2da-4ec4-ade7-f3159e14139dn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4579&group=comp.os.cpm#4579

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:620a:400c:b0:6a6:f8e6:92cc with SMTP id h12-20020a05620a400c00b006a6f8e692ccmr9677192qko.561.1657490418585;
Sun, 10 Jul 2022 15:00:18 -0700 (PDT)
X-Received: by 2002:a05:6870:65ac:b0:10b:e0b4:6b8 with SMTP id
fp44-20020a05687065ac00b0010be0b406b8mr33143oab.1.1657490418361; Sun, 10 Jul
2022 15:00:18 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 15:00:18 -0700 (PDT)
In-Reply-To: <43f438e5-f039-49c6-acee-6864c63e767an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c7:c289:b201:1910:a661:ceef:a78f;
posting-account=Z3G0ewoAAADQeHVqclO-pbZadEHNyq4R
NNTP-Posting-Host: 2a00:23c7:c289:b201:1910:a661:ceef:a78f
References: <t74d43$1nmg$1@gioia.aioe.org> <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
<001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com> <7ce129bf-abe0-4b1c-95d5-bb40490a8ae4n@googlegroups.com>
<43f438e5-f039-49c6-acee-6864c63e767an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9ae19258-f2da-4ec4-ade7-f3159e14139dn@googlegroups.com>
Subject: Re: PL/1 on CPM
From: philg@talk21.com (Phil G)
Injection-Date: Sun, 10 Jul 2022 22:00:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1701
 by: Phil G - Sun, 10 Jul 2022 22:00 UTC

On Sunday, July 10, 2022 at 10:56:06 PM UTC+1, Phil G wrote:
>a reply...

Ah we crossed posts, I see Richard has posted the library. Its more comprehensive than my own library but uses similar code, albeit in 8080 rather than the Z80 i used in philslib...
Interesting stuff after being dormant in my mind for nearly 40 years!
Cheers
Phil

Re: PL/1 on CPM

<9da4a1f8-740f-41cf-bdea-dfbd0f3dcdb1n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4580&group=comp.os.cpm#4580

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ad4:5ba7:0:b0:473:6526:f6e6 with SMTP id 7-20020ad45ba7000000b004736526f6e6mr2790059qvq.90.1657490582676;
Sun, 10 Jul 2022 15:03:02 -0700 (PDT)
X-Received: by 2002:a05:6820:513:b0:425:a794:50ba with SMTP id
m19-20020a056820051300b00425a79450bamr5619149ooj.68.1657490582429; Sun, 10
Jul 2022 15:03:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 15:03:02 -0700 (PDT)
In-Reply-To: <9ae19258-f2da-4ec4-ade7-f3159e14139dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c7:c289:b201:1910:a661:ceef:a78f;
posting-account=Z3G0ewoAAADQeHVqclO-pbZadEHNyq4R
NNTP-Posting-Host: 2a00:23c7:c289:b201:1910:a661:ceef:a78f
References: <t74d43$1nmg$1@gioia.aioe.org> <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
<001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com> <7ce129bf-abe0-4b1c-95d5-bb40490a8ae4n@googlegroups.com>
<43f438e5-f039-49c6-acee-6864c63e767an@googlegroups.com> <9ae19258-f2da-4ec4-ade7-f3159e14139dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9da4a1f8-740f-41cf-bdea-dfbd0f3dcdb1n@googlegroups.com>
Subject: Re: PL/1 on CPM
From: philg@talk21.com (Phil G)
Injection-Date: Sun, 10 Jul 2022 22:03:02 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1850
 by: Phil G - Sun, 10 Jul 2022 22:03 UTC

On Sunday, July 10, 2022 at 11:00:19 PM UTC+1, Phil G wrote:
> On Sunday, July 10, 2022 at 10:56:06 PM UTC+1, Phil G wrote:
>rmac is the relocating macro assembler which produces cpmdio.obj
>pli hexdump compiles hexdump.pli to hexdump.obj, and
>link hexdump,cpmdio creates the .com file by linking the two obj modules and resolving 'real' addresses.

Actually, thinking about it, they may be .rel rather than .obj , I cant remember...

Re: PL/1 on CPM

<5d25d771-7726-4f64-ba74-1647b7e5a669n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4581&group=comp.os.cpm#4581

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:620a:4902:b0:6af:2766:45e8 with SMTP id ed2-20020a05620a490200b006af276645e8mr9139400qkb.689.1657491634663;
Sun, 10 Jul 2022 15:20:34 -0700 (PDT)
X-Received: by 2002:a05:6808:18a9:b0:339:f77f:9e30 with SMTP id
bi41-20020a05680818a900b00339f77f9e30mr2593992oib.125.1657491634384; Sun, 10
Jul 2022 15:20:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 10 Jul 2022 15:20:34 -0700 (PDT)
In-Reply-To: <9da4a1f8-740f-41cf-bdea-dfbd0f3dcdb1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c7:c289:b201:1910:a661:ceef:a78f;
posting-account=Z3G0ewoAAADQeHVqclO-pbZadEHNyq4R
NNTP-Posting-Host: 2a00:23c7:c289:b201:1910:a661:ceef:a78f
References: <t74d43$1nmg$1@gioia.aioe.org> <7834f914-db6a-45a6-a55b-f489f55497c5n@googlegroups.com>
<001fa8b0-5589-4ee7-ac66-036d19869678n@googlegroups.com> <7ce129bf-abe0-4b1c-95d5-bb40490a8ae4n@googlegroups.com>
<43f438e5-f039-49c6-acee-6864c63e767an@googlegroups.com> <9ae19258-f2da-4ec4-ade7-f3159e14139dn@googlegroups.com>
<9da4a1f8-740f-41cf-bdea-dfbd0f3dcdb1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5d25d771-7726-4f64-ba74-1647b7e5a669n@googlegroups.com>
Subject: Re: PL/1 on CPM
From: philg@talk21.com (Phil G)
Injection-Date: Sun, 10 Jul 2022 22:20:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 1
 by: Phil G - Sun, 10 Jul 2022 22:20 UTC

Richard: > I keep getting an error on the last line of the program.
Another reason can be the 'padding' making up the file to a 128-byte boundary for CP/M if the control-Z EOF is missing, often happens when transferring between CP/M & a PC

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor