dos_compilers/Digital Research PLI-86 v1/ALLTST.PLI
2024-06-30 12:01:25 -07:00

35 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*****************************************************/
/* This program tests the TOTWDS, MAXWDS, and ALLWDS */
/* functions from the Run-time Subroutine Library. */
/*****************************************************/
alltst:
procedure options(main);
declare
totwds returns(fixed(15)),
maxwds returns(fixed(15)),
allwds entry(fixed(15)) returns(pointer);
declare
allreq fixed(15),
memptr ptr,
meminx fixed(15),
memory (0:0) bit(16) based(memptr);
do while('1'b);
put edit (totwds(),' Total Words Available',
maxwds(),' Maximum Segment Size',
'Allocation Size? ') (2(skip,f(6),a),skip,a);
get list(allreq);
memptr = allwds(allreq);
put edit('Allocated',allreq,' Words at ',unspec(memptr))
(skip,a,f(6),a,b4);
/* clear memory as example */
do meminx = 0 to allreq-1;
memory(meminx) = '0000'b4;
end;
end;
end alltst;